diff options
author | Victor Stinner <vstinner@python.org> | 2023-07-24 14:02:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-24 14:02:03 (GMT) |
commit | fd66baf34a73871c651326a41886240bf6f986d7 (patch) | |
tree | c59b1d1e1987f1c1b0c4e0a2831deebf0eab0870 /Modules | |
parent | 0a9b339363a59be1249189c767ed6f46fd71e1c7 (diff) | |
download | cpython-fd66baf34a73871c651326a41886240bf6f986d7.zip cpython-fd66baf34a73871c651326a41886240bf6f986d7.tar.gz cpython-fd66baf34a73871c651326a41886240bf6f986d7.tar.bz2 |
gh-106320: Remove private _PyDict C API (#107145)
Move private _PyDict functions to the internal C API (pycore_dict.h):
* _PyDict_Contains_KnownHash()
* _PyDict_DebugMallocStats()
* _PyDict_DelItemIf()
* _PyDict_GetItemWithError()
* _PyDict_HasOnlyStringKeys()
* _PyDict_MaybeUntrack()
* _PyDict_MergeEx()
No longer export these functions.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_weakref.c | 1 | ||||
-rw-r--r-- | Modules/gcmodule.c | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/Modules/_weakref.c b/Modules/_weakref.c index b5d80cb..dcb2984 100644 --- a/Modules/_weakref.c +++ b/Modules/_weakref.c @@ -1,4 +1,5 @@ #include "Python.h" +#include "pycore_dict.h" // _PyDict_DelItemIf() #include "pycore_object.h" // _PyObject_GET_WEAKREFS_LISTPTR #include "pycore_weakref.h" // _PyWeakref_IS_DEAD() diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index 97644a7..246c0a9 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -25,12 +25,13 @@ #include "Python.h" #include "pycore_context.h" +#include "pycore_dict.h" // _PyDict_MaybeUntrack() #include "pycore_initconfig.h" -#include "pycore_interp.h" // PyInterpreterState.gc +#include "pycore_interp.h" // PyInterpreterState.gc #include "pycore_object.h" #include "pycore_pyerrors.h" -#include "pycore_pystate.h" // _PyThreadState_GET() -#include "pycore_weakref.h" // _PyWeakref_ClearRef() +#include "pycore_pystate.h" // _PyThreadState_GET() +#include "pycore_weakref.h" // _PyWeakref_ClearRef() #include "pydtrace.h" typedef struct _gc_runtime_state GCState; |