diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2022-11-08 17:03:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-08 17:03:03 (GMT) |
commit | 52f91c642b72003c57fc1fb855beab6dfab155b7 (patch) | |
tree | 051abac024b2749d6e54c7c933a5c46fea3e2b63 /Modules | |
parent | d45cc80452b11d5ffc5c9721f74a3e3df8ecad8b (diff) | |
download | cpython-52f91c642b72003c57fc1fb855beab6dfab155b7.zip cpython-52f91c642b72003c57fc1fb855beab6dfab155b7.tar.gz cpython-52f91c642b72003c57fc1fb855beab6dfab155b7.tar.bz2 |
gh-90868: Adjust the Generated Objects (gh-99223)
We do the following:
* move the generated _PyUnicode_InitStaticStrings() to its own file
* move the generated _PyStaticObjects_CheckRefcnt() to its own file
* include pycore_global_objects.h in extension modules instead of pycore_runtime_init.h
These changes help us avoid including things that aren't needed.
https://github.com/python/cpython/issues/90868
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_asynciomodule.c | 9 | ||||
-rw-r--r-- | Modules/_ctypes/callbacks.c | 5 | ||||
-rw-r--r-- | Modules/_ctypes/callproc.c | 3 | ||||
-rw-r--r-- | Modules/_json.c | 9 |
4 files changed, 15 insertions, 11 deletions
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c index 530fb7b..c99a78f 100644 --- a/Modules/_asynciomodule.c +++ b/Modules/_asynciomodule.c @@ -3,10 +3,11 @@ #endif #include "Python.h" -#include "pycore_pyerrors.h" // _PyErr_ClearExcState() -#include "pycore_pystate.h" // _PyThreadState_GET() -#include "pycore_runtime_init.h" // _Py_ID() -#include <stddef.h> // offsetof() +#include "pycore_pyerrors.h" // _PyErr_ClearExcState() +#include "pycore_pystate.h" // _PyThreadState_GET() +#include "pycore_runtime.h" // _PyRuntime +#include "pycore_global_objects.h" // _Py_ID() +#include <stddef.h> // offsetof() /*[clinic input] diff --git a/Modules/_ctypes/callbacks.c b/Modules/_ctypes/callbacks.c index 76d1ae5..88b1c1a 100644 --- a/Modules/_ctypes/callbacks.c +++ b/Modules/_ctypes/callbacks.c @@ -8,8 +8,9 @@ # include <windows.h> #endif -#include "pycore_call.h" // _PyObject_CallNoArgs() -#include "pycore_runtime_init.h" // _Py_ID() +#include "pycore_call.h" // _PyObject_CallNoArgs() +#include "pycore_runtime.h" // _PyRuntime +#include "pycore_global_objects.h" // _Py_ID() #include <stdbool.h> diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index dce5f26..136f114 100644 --- a/Modules/_ctypes/callproc.c +++ b/Modules/_ctypes/callproc.c @@ -96,7 +96,8 @@ #define DONT_USE_SEH #endif -#include "pycore_runtime_init.h" +#include "pycore_runtime.h" // _PyRuntime +#include "pycore_global_objects.h" // _Py_ID() #define CTYPES_CAPSULE_NAME_PYMEM "_ctypes pymem" diff --git a/Modules/_json.c b/Modules/_json.c index fe86951..82f960f 100644 --- a/Modules/_json.c +++ b/Modules/_json.c @@ -9,10 +9,11 @@ #endif #include "Python.h" -#include "pycore_ceval.h" // _Py_EnterRecursiveCall() -#include "structmember.h" // PyMemberDef -#include "pycore_runtime_init.h" // _Py_ID() -#include <stdbool.h> // bool +#include "pycore_ceval.h" // _Py_EnterRecursiveCall() +#include "pycore_runtime.h" // _PyRuntime +#include "structmember.h" // PyMemberDef +#include "pycore_global_objects.h" // _Py_ID() +#include <stdbool.h> // bool typedef struct _PyScannerObject { |