diff options
author | Victor Stinner <vstinner@python.org> | 2023-08-24 20:02:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-24 20:02:09 (GMT) |
commit | a071ecb4d13595f3580cf82061dcd7b39cd475c5 (patch) | |
tree | c744a2942c27476f0cd5c71faf336ad64142756a /Modules | |
parent | 26893016a7f204b2e7138fc9ce04525a651c202e (diff) | |
download | cpython-a071ecb4d13595f3580cf82061dcd7b39cd475c5.zip cpython-a071ecb4d13595f3580cf82061dcd7b39cd475c5.tar.gz cpython-a071ecb4d13595f3580cf82061dcd7b39cd475c5.tar.bz2 |
gh-106320: Remove private _PySys functions (#108452)
Move private functions to the internal C API (pycore_sysmodule.h):
* _PySys_GetAttr()
* _PySys_GetSizeOf()
No longer export most of these functions.
Fix also a typo in Include/cpython/optimizer.h: add a missing space.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_io/bytesio.c | 2 | ||||
-rw-r--r-- | Modules/_pickle.c | 3 | ||||
-rw-r--r-- | Modules/_threadmodule.c | 1 | ||||
-rw-r--r-- | Modules/faulthandler.c | 1 |
4 files changed, 6 insertions, 1 deletions
diff --git a/Modules/_io/bytesio.c b/Modules/_io/bytesio.c index 3ab503c..f307420 100644 --- a/Modules/_io/bytesio.c +++ b/Modules/_io/bytesio.c @@ -1,5 +1,7 @@ #include "Python.h" #include "pycore_object.h" +#include "pycore_sysmodule.h" // _PySys_GetSizeOf() + #include <stddef.h> // offsetof() #include "_iomodule.h" diff --git a/Modules/_pickle.c b/Modules/_pickle.c index 4f26ffe..b975248 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -17,10 +17,11 @@ #include "pycore_pystate.h" // _PyThreadState_GET() #include "pycore_runtime.h" // _Py_ID() #include "pycore_setobject.h" // _PySet_NextEntry() - +#include "pycore_sysmodule.h" // _PySys_GetAttr() #include <stdlib.h> // strtol() + PyDoc_STRVAR(pickle_module_doc, "Optimized C implementation for the Python pickle module."); diff --git a/Modules/_threadmodule.c b/Modules/_threadmodule.c index 229abfb..2cf866c 100644 --- a/Modules/_threadmodule.c +++ b/Modules/_threadmodule.c @@ -9,6 +9,7 @@ #include "pycore_moduleobject.h" // _PyModule_GetState() #include "pycore_pylifecycle.h" #include "pycore_pystate.h" // _PyThreadState_SetCurrent() +#include "pycore_sysmodule.h" // _PySys_GetAttr() #include "pycore_weakref.h" // _PyWeakref_GET_REF() #include <stddef.h> // offsetof() diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c index d8cfc13..5ec34d4 100644 --- a/Modules/faulthandler.c +++ b/Modules/faulthandler.c @@ -3,6 +3,7 @@ #include "pycore_pyerrors.h" // _Py_DumpExtensionModules #include "pycore_pystate.h" // _PyThreadState_GET() #include "pycore_signal.h" // Py_NSIG +#include "pycore_sysmodule.h" // _PySys_GetAttr() #include "pycore_traceback.h" // _Py_DumpTracebackThreads #include <object.h> |