summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2023-08-22 18:17:25 (GMT)
committerGitHub <noreply@github.com>2023-08-22 18:17:25 (GMT)
commit615f6e946db6d7eae66b8de9a75a6c58a84516a6 (patch)
treed94d9365566defdedf9f2cf0deffa8f53b6ae587 /Include
parent0cb0c238d520a8718e313b52cffc356a5a7561bf (diff)
downloadcpython-615f6e946db6d7eae66b8de9a75a6c58a84516a6.zip
cpython-615f6e946db6d7eae66b8de9a75a6c58a84516a6.tar.gz
cpython-615f6e946db6d7eae66b8de9a75a6c58a84516a6.tar.bz2
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 'Include')
-rw-r--r--Include/cpython/dictobject.h1
-rw-r--r--Include/internal/pycore_dict.h1
2 files changed, 1 insertions, 1 deletions
diff --git a/Include/cpython/dictobject.h b/Include/cpython/dictobject.h
index 2a42794..470f594 100644
--- a/Include/cpython/dictobject.h
+++ b/Include/cpython/dictobject.h
@@ -36,7 +36,6 @@ PyAPI_FUNC(PyObject *) _PyDict_GetItem_KnownHash(PyObject *mp, PyObject *key,
Py_hash_t hash);
PyAPI_FUNC(PyObject *) _PyDict_GetItemIdWithError(PyObject *dp,
_Py_Identifier *key);
-PyAPI_FUNC(PyObject *) _PyDict_GetItemStringWithError(PyObject *, const char *);
PyAPI_FUNC(PyObject *) PyDict_SetDefault(
PyObject *mp, PyObject *key, PyObject *defaultobj);
PyAPI_FUNC(int) _PyDict_SetItem_KnownHash(PyObject *mp, PyObject *key,
diff --git a/Include/internal/pycore_dict.h b/Include/internal/pycore_dict.h
index df7bc7e..8e9c27e 100644
--- a/Include/internal/pycore_dict.h
+++ b/Include/internal/pycore_dict.h
@@ -13,6 +13,7 @@ extern "C" {
// Unsafe flavor of PyDict_GetItemWithError(): no error checking
extern PyObject* _PyDict_GetItemWithError(PyObject *dp, PyObject *key);
+extern PyObject* _PyDict_GetItemStringWithError(PyObject *, const char *);
extern int _PyDict_Contains_KnownHash(PyObject *, PyObject *, Py_hash_t);