bpo-40268: Remove unused osdefs.h includes (GH-19532)
When the include is needed, add required symbol in a comment.
This commit is contained in:
parent
d9ea5cae1d
commit
361dcdcefc
|
@ -4,7 +4,6 @@
|
||||||
#include "pycore_traceback.h"
|
#include "pycore_traceback.h"
|
||||||
#include "hashtable.h"
|
#include "hashtable.h"
|
||||||
#include "frameobject.h"
|
#include "frameobject.h"
|
||||||
#include "osdefs.h"
|
|
||||||
|
|
||||||
#include "clinic/_tracemalloc.c.h"
|
#include "clinic/_tracemalloc.c.h"
|
||||||
/*[clinic input]
|
/*[clinic input]
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
#include "pycore_fileutils.h"
|
#include "pycore_fileutils.h"
|
||||||
#include "pycore_initconfig.h"
|
#include "pycore_initconfig.h"
|
||||||
#include "pycore_pathconfig.h"
|
#include "pycore_pathconfig.h"
|
||||||
#include "osdefs.h"
|
#include "osdefs.h" // DELIM
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -312,11 +312,11 @@ extern char *ctermid_r(char *);
|
||||||
#ifndef IO_REPARSE_TAG_MOUNT_POINT
|
#ifndef IO_REPARSE_TAG_MOUNT_POINT
|
||||||
#define IO_REPARSE_TAG_MOUNT_POINT (0xA0000003L)
|
#define IO_REPARSE_TAG_MOUNT_POINT (0xA0000003L)
|
||||||
#endif
|
#endif
|
||||||
#include "osdefs.h"
|
#include "osdefs.h" // SEP
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <shellapi.h> /* for ShellExecute() */
|
#include <shellapi.h> // ShellExecute()
|
||||||
#include <lmcons.h> /* for UNLEN */
|
#include <lmcons.h> // UNLEN
|
||||||
#define HAVE_SYMLINK
|
#define HAVE_SYMLINK
|
||||||
#endif /* _MSC_VER */
|
#endif /* _MSC_VER */
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ Revision history:
|
||||||
/* syslog module */
|
/* syslog module */
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "osdefs.h"
|
#include "osdefs.h" // SEP
|
||||||
|
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include "pycore_initconfig.h"
|
#include "pycore_initconfig.h"
|
||||||
#include "pycore_object.h"
|
#include "pycore_object.h"
|
||||||
#include "structmember.h" // PyMemberDef
|
#include "structmember.h" // PyMemberDef
|
||||||
#include "osdefs.h"
|
#include "osdefs.h" // SEP
|
||||||
|
|
||||||
|
|
||||||
/* Compatibility aliases */
|
/* Compatibility aliases */
|
||||||
|
@ -1435,11 +1435,13 @@ my_basename(PyObject *name)
|
||||||
size = PyUnicode_GET_LENGTH(name);
|
size = PyUnicode_GET_LENGTH(name);
|
||||||
offset = 0;
|
offset = 0;
|
||||||
for(i=0; i < size; i++) {
|
for(i=0; i < size; i++) {
|
||||||
if (PyUnicode_READ(kind, data, i) == SEP)
|
if (PyUnicode_READ(kind, data, i) == SEP) {
|
||||||
offset = i + 1;
|
offset = i + 1;
|
||||||
}
|
}
|
||||||
if (offset != 0)
|
}
|
||||||
|
if (offset != 0) {
|
||||||
return PyUnicode_Substring(name, offset, size);
|
return PyUnicode_Substring(name, offset, size);
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
Py_INCREF(name);
|
Py_INCREF(name);
|
||||||
return name;
|
return name;
|
||||||
|
|
|
@ -80,9 +80,9 @@
|
||||||
|
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "pycore_initconfig.h" /* PyStatus */
|
#include "pycore_initconfig.h" // PyStatus
|
||||||
#include "pycore_pathconfig.h" /* _PyPathConfig */
|
#include "pycore_pathconfig.h" // _PyPathConfig
|
||||||
#include "osdefs.h"
|
#include "osdefs.h" // SEP, ALTSEP
|
||||||
#include <wchar.h>
|
#include <wchar.h>
|
||||||
|
|
||||||
#ifndef MS_WINDOWS
|
#ifndef MS_WINDOWS
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "pycore_fileutils.h"
|
#include "pycore_fileutils.h"
|
||||||
#include "osdefs.h"
|
#include "osdefs.h" // SEP
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
||||||
#ifdef MS_WINDOWS
|
#ifdef MS_WINDOWS
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
#include "marshal.h"
|
#include "marshal.h"
|
||||||
#include "code.h"
|
#include "code.h"
|
||||||
#include "frameobject.h"
|
#include "frameobject.h"
|
||||||
#include "osdefs.h"
|
|
||||||
#include "importdl.h"
|
#include "importdl.h"
|
||||||
#include "pydtrace.h"
|
#include "pydtrace.h"
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* Path configuration like module_search_path (sys.path) */
|
/* Path configuration like module_search_path (sys.path) */
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
#include "osdefs.h"
|
#include "osdefs.h" // DELIM
|
||||||
#include "pycore_initconfig.h"
|
#include "pycore_initconfig.h"
|
||||||
#include "pycore_fileutils.h"
|
#include "pycore_fileutils.h"
|
||||||
#include "pycore_pathconfig.h"
|
#include "pycore_pathconfig.h"
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
#include "symtable.h"
|
#include "symtable.h"
|
||||||
#include "ast.h"
|
#include "ast.h"
|
||||||
#include "marshal.h"
|
#include "marshal.h"
|
||||||
#include "osdefs.h"
|
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
||||||
#ifdef HAVE_SIGNAL_H
|
#ifdef HAVE_SIGNAL_H
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
#include "symtable.h"
|
#include "symtable.h"
|
||||||
#include "ast.h"
|
#include "ast.h"
|
||||||
#include "marshal.h"
|
#include "marshal.h"
|
||||||
#include "osdefs.h"
|
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
||||||
#ifdef HAVE_SIGNAL_H
|
#ifdef HAVE_SIGNAL_H
|
||||||
|
|
|
@ -26,9 +26,9 @@ Data members:
|
||||||
#include "pycore_pymem.h" // _PyMem_SetDefaultAllocator()
|
#include "pycore_pymem.h" // _PyMem_SetDefaultAllocator()
|
||||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||||
#include "pycore_tupleobject.h"
|
#include "pycore_tupleobject.h"
|
||||||
#include "pydtrace.h"
|
|
||||||
|
|
||||||
#include "osdefs.h"
|
#include "pydtrace.h"
|
||||||
|
#include "osdefs.h" // DELIM
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
||||||
#ifdef MS_WINDOWS
|
#ifdef MS_WINDOWS
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include "code.h"
|
#include "code.h"
|
||||||
#include "frameobject.h"
|
#include "frameobject.h"
|
||||||
#include "structmember.h" // PyMemberDef
|
#include "structmember.h" // PyMemberDef
|
||||||
#include "osdefs.h"
|
#include "osdefs.h" // SEP
|
||||||
#ifdef HAVE_FCNTL_H
|
#ifdef HAVE_FCNTL_H
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue