Skip to content

Commit d9ea5ca

Browse files
authored
bpo-40268: Remove unused pycore_pymem.h includes (GH-19531)
1 parent 4a21e57 commit d9ea5ca

21 files changed

+13
-26
lines changed

Modules/_functoolsmodule.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#include "Python.h"
2-
#include "pycore_pymem.h"
32
#include "pycore_pystate.h" // _PyThreadState_GET()
43
#include "pycore_tupleobject.h"
54
#include "structmember.h" // PyMemberDef

Modules/gcmodule.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include "pycore_object.h"
3131
#include "pycore_pyerrors.h"
3232
#include "pycore_pystate.h" // _PyThreadState_GET()
33-
#include "pycore_pymem.h"
3433
#include "frameobject.h" // PyFrame_ClearFreeList
3534
#include "pydtrace.h"
3635
#include "pytime.h" // _PyTime_GetMonotonicClock()

Modules/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include "pycore_interp.h" // _PyInterpreterState.sysdict
66
#include "pycore_pathconfig.h"
77
#include "pycore_pylifecycle.h"
8-
#include "pycore_pymem.h"
98
#include "pycore_pystate.h" // _PyInterpreterState_GET()
109

1110
/* Includes for exit_sigint() */

Objects/bytearrayobject.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include "pycore_abstract.h" // _PyIndex_Check()
66
#include "pycore_bytes_methods.h"
77
#include "pycore_object.h"
8-
#include "pycore_pymem.h"
98
#include "bytesobject.h"
109
#include "pystrhex.h"
1110

Objects/bytesobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
#define PY_SSIZE_T_CLEAN
44

55
#include "Python.h"
6-
#include "pycore_abstract.h" // _PyIndex_Check()
6+
#include "pycore_abstract.h" // _PyIndex_Check()
77
#include "pycore_bytes_methods.h"
88
#include "pycore_object.h"
9-
#include "pycore_pymem.h"
9+
#include "pycore_pymem.h" // PYMEM_CLEANBYTE
1010

1111
#include "pystrhex.h"
1212
#include <stddef.h>

Objects/cellobject.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#include "Python.h"
44
#include "pycore_object.h"
5-
#include "pycore_pymem.h"
65

76
PyObject *
87
PyCell_New(PyObject *obj)

Objects/classobject.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#include "Python.h"
44
#include "pycore_object.h"
55
#include "pycore_pyerrors.h"
6-
#include "pycore_pymem.h"
76
#include "pycore_pystate.h" // _PyThreadState_GET()
87
#include "structmember.h" // PyMemberDef
98

Objects/exceptions.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include <Python.h>
99
#include "pycore_initconfig.h"
1010
#include "pycore_object.h"
11-
#include "pycore_pymem.h"
1211
#include "structmember.h" // PyMemberDef
1312
#include "osdefs.h"
1413

Objects/funcobject.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#include "Python.h"
55
#include "pycore_object.h"
6-
#include "pycore_pymem.h"
76
#include "pycore_tupleobject.h"
87
#include "code.h"
98
#include "structmember.h" // PyMemberDef

Objects/iterobject.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#include "Python.h"
44
#include "pycore_object.h"
5-
#include "pycore_pymem.h"
65

76
typedef struct {
87
PyObject_HEAD

Objects/memoryobject.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include "Python.h"
1414
#include "pycore_abstract.h" // _PyIndex_Check()
1515
#include "pycore_object.h"
16-
#include "pycore_pymem.h"
1716
#include "pystrhex.h"
1817
#include <stddef.h>
1918

Objects/methodobject.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
66
#include "pycore_object.h"
77
#include "pycore_pyerrors.h"
8-
#include "pycore_pymem.h"
98
#include "pycore_pystate.h" // _PyThreadState_GET()
109
#include "structmember.h" // PyMemberDef
1110

Objects/obmalloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include "Python.h"
2-
#include "pycore_pymem.h"
2+
#include "pycore_pymem.h" // _PyTraceMalloc_Config
33

44
#include <stdbool.h>
55

Objects/sliceobject.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ this type and there is exactly one in existence.
1616
#include "Python.h"
1717
#include "pycore_abstract.h" // _PyIndex_Check()
1818
#include "pycore_object.h"
19-
#include "pycore_pymem.h"
2019
#include "structmember.h" // PyMemberDef
2120

2221
static PyObject *

Python/import.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "pycore_pyerrors.h"
99
#include "pycore_pyhash.h"
1010
#include "pycore_pylifecycle.h"
11-
#include "pycore_pymem.h"
11+
#include "pycore_pymem.h" // _PyMem_SetDefaultAllocator()
1212
#include "pycore_interp.h" // _PyInterpreterState_ClearModules()
1313
#include "pycore_pystate.h" // _PyInterpreterState_GET()
1414
#include "pycore_sysmodule.h"

Python/initconfig.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include "pycore_pathconfig.h"
88
#include "pycore_pyerrors.h"
99
#include "pycore_pylifecycle.h"
10-
#include "pycore_pymem.h"
10+
#include "pycore_pymem.h" // _PyMem_SetDefaultAllocator()
1111
#include "pycore_pystate.h" // _PyThreadState_GET()
1212
#include <locale.h> // setlocale()
1313
#ifdef HAVE_LANGINFO_H

Python/pathconfig.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "pycore_initconfig.h"
66
#include "pycore_fileutils.h"
77
#include "pycore_pathconfig.h"
8-
#include "pycore_pymem.h"
8+
#include "pycore_pymem.h" // _PyMem_SetDefaultAllocator()
99
#include <wchar.h>
1010
#ifdef MS_WINDOWS
1111
# include <windows.h> // GetFullPathNameW(), MAX_PATH

Python/preconfig.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#include "Python.h"
22
#include "pycore_getopt.h"
33
#include "pycore_initconfig.h"
4-
#include "pycore_pymem.h" // _PyMem_GetAllocatorName()
5-
#include "pycore_runtime.h" // _PyRuntime_Initialize()
6-
#include <locale.h> // setlocale()
4+
#include "pycore_pymem.h" // _PyMem_GetAllocatorName()
5+
#include "pycore_runtime.h" // _PyRuntime_Initialize()
6+
#include <locale.h> // setlocale()
77

88

99
#define DECODE_LOCALE_ERR(NAME, LEN) \

Python/pylifecycle.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include "pycore_pathconfig.h"
1515
#include "pycore_pyerrors.h"
1616
#include "pycore_pylifecycle.h"
17-
#include "pycore_pymem.h"
1817
#include "pycore_pystate.h" // _PyThreadState_GET()
1918
#include "pycore_sysmodule.h"
2019
#include "pycore_traceback.h"

Python/pystate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include "pycore_initconfig.h"
77
#include "pycore_pyerrors.h"
88
#include "pycore_pylifecycle.h"
9-
#include "pycore_pymem.h"
9+
#include "pycore_pymem.h" // _PyMem_SetDefaultAllocator()
1010
#include "pycore_pystate.h" // _PyThreadState_GET()
1111
#include "pycore_sysmodule.h"
1212

Python/sysmodule.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ Data members:
1717
#include "Python.h"
1818
#include "code.h"
1919
#include "frameobject.h"
20-
#include "pycore_ceval.h" // _Py_RecursionLimitLowerWaterMark()
20+
#include "pycore_ceval.h" // _Py_RecursionLimitLowerWaterMark()
2121
#include "pycore_initconfig.h"
2222
#include "pycore_object.h"
2323
#include "pycore_pathconfig.h"
2424
#include "pycore_pyerrors.h"
2525
#include "pycore_pylifecycle.h"
26-
#include "pycore_pymem.h"
27-
#include "pycore_pystate.h" // _PyThreadState_GET()
26+
#include "pycore_pymem.h" // _PyMem_SetDefaultAllocator()
27+
#include "pycore_pystate.h" // _PyThreadState_GET()
2828
#include "pycore_tupleobject.h"
2929
#include "pydtrace.h"
3030

0 commit comments

Comments
 (0)