From 52f91c642b72003c57fc1fb855beab6dfab155b7 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Tue, 8 Nov 2022 10:03:03 -0700 Subject: 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 --- Python/pylifecycle.c | 1 + Python/suggestions.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'Python') diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index e64849296c..f3b64fe6d7 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -10,6 +10,7 @@ #include "pycore_fileutils.h" // _Py_ResetForceASCII() #include "pycore_floatobject.h" // _PyFloat_InitTypes() #include "pycore_genobject.h" // _PyAsyncGen_Fini() +#include "pycore_global_objects_fini_generated.h" // "_PyStaticObjects_CheckRefcnt() #include "pycore_import.h" // _PyImport_BootstrapImp() #include "pycore_initconfig.h" // _PyStatus_OK() #include "pycore_list.h" // _PyList_Fini() diff --git a/Python/suggestions.c b/Python/suggestions.c index 239245d73d..eee61b2604 100644 --- a/Python/suggestions.c +++ b/Python/suggestions.c @@ -1,6 +1,7 @@ #include "Python.h" #include "pycore_frame.h" -#include "pycore_runtime_init.h" // _Py_ID() +#include "pycore_runtime.h" // _PyRuntime +#include "pycore_global_objects.h" // _Py_ID() #include "pycore_pyerrors.h" #include "pycore_code.h" // _PyCode_GetVarnames() -- cgit v1.2.1