summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-07-24 14:02:03 (GMT)
committerGitHub <noreply@github.com>2023-07-24 14:02:03 (GMT)
commitfd66baf34a73871c651326a41886240bf6f986d7 (patch)
treec59b1d1e1987f1c1b0c4e0a2831deebf0eab0870 /Python
parent0a9b339363a59be1249189c767ed6f46fd71e1c7 (diff)
downloadcpython-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 'Python')
-rw-r--r--Python/_warnings.c1
-rw-r--r--Python/bltinmodule.c1
-rw-r--r--Python/getargs.c3
-rw-r--r--Python/sysmodule.c1
4 files changed, 5 insertions, 1 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c
index 82e6212..40ec5f6 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -1,4 +1,5 @@
#include "Python.h"
+#include "pycore_dict.h" // _PyDict_GetItemWithError()
#include "pycore_frame.h"
#include "pycore_initconfig.h"
#include "pycore_interp.h" // PyInterpreterState.warnings
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 7d77fd5..9baf233 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -6,6 +6,7 @@
#include "pycore_call.h" // _PyObject_CallNoArgs()
#include "pycore_ceval.h" // _PyEval_Vector()
#include "pycore_compile.h" // _PyAST_Compile()
+#include "pycore_dict.h" // _PyDict_GetItemWithError()
#include "pycore_long.h" // _PyLong_CompactValue
#include "pycore_modsupport.h" // _PyArg_NoKwnames()
#include "pycore_object.h" // _Py_AddToAllObjects()
diff --git a/Python/getargs.c b/Python/getargs.c
index 45befab..efcf2e3 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -2,8 +2,9 @@
/* New getargs implementation */
#include "Python.h"
-#include "pycore_tuple.h" // _PyTuple_ITEMS()
+#include "pycore_dict.h" // _PyDict_HasOnlyStringKeys()
#include "pycore_pylifecycle.h" // _PyArg_Fini
+#include "pycore_tuple.h" // _PyTuple_ITEMS()
#include <ctype.h>
#include <float.h>
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index fb033a6..be026d9 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -17,6 +17,7 @@ Data members:
#include "Python.h"
#include "pycore_call.h" // _PyObject_CallNoArgs()
#include "pycore_ceval.h" // _PyEval_SetAsyncGenFinalizer()
+#include "pycore_dict.h" // _PyDict_GetItemWithError()
#include "pycore_frame.h" // _PyInterpreterFrame
#include "pycore_initconfig.h" // _PyStatus_EXCEPTION()
#include "pycore_long.h" // _PY_LONG_MAX_STR_DIGITS_THRESHOLD