aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/import.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-08-22 20:17:25 +0200
committerGitHub <noreply@github.com>2023-08-22 18:17:25 +0000
commit615f6e946db6d7eae66b8de9a75a6c58a84516a6 (patch)
treed94d9365566defdedf9f2cf0deffa8f53b6ae587 /Python/import.c
parent0cb0c238d520a8718e313b52cffc356a5a7561bf (diff)
downloadcpython-615f6e946db6d7eae66b8de9a75a6c58a84516a6.tar.gz
cpython-615f6e946db6d7eae66b8de9a75a6c58a84516a6.zip
gh-106320: Remove _PyDict_GetItemStringWithError() function (#108313)
Remove private _PyDict_GetItemStringWithError() function of the public C API: the new PyDict_GetItemStringRef() can be used instead. * Move private _PyDict_GetItemStringWithError() to the internal C API. * _testcapi get_code_extra_index() uses PyDict_GetItemStringRef(). Avoid using private functions in _testcapi which tests the public C API.
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c
index 56b2dc1a4ad..4abb2f6a06b 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1,7 +1,7 @@
/* Module definition and import implementation */
#include "Python.h"
-
+#include "pycore_dict.h" // _PyDict_GetItemStringWithError()
#include "pycore_hashtable.h" // _Py_hashtable_new_full()
#include "pycore_import.h" // _PyImport_BootstrapImp()
#include "pycore_initconfig.h" // _PyStatus_OK()
@@ -15,6 +15,7 @@
#include "pycore_pystate.h" // _PyInterpreterState_GET()
#include "pycore_sysmodule.h" // _PySys_Audit()
#include "pycore_weakref.h" // _PyWeakref_GET_REF()
+
#include "marshal.h" // PyMarshal_ReadObjectFromString()
#include "importdl.h" // _PyImport_DynLoadFiletab
#include "pydtrace.h" // PyDTrace_IMPORT_FIND_LOAD_START_ENABLED()