diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2023-07-25 18:48:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-25 18:48:07 (GMT) |
commit | 2b1a81e2cfa740609d48ad82627ae251262e6470 (patch) | |
tree | 7116c9480b22deb622a4ba1da77f34bc2efcf393 /Include/dictobject.h | |
parent | 6a43cce32b66e0f66992119dd82959069b6f324a (diff) | |
download | cpython-2b1a81e2cfa740609d48ad82627ae251262e6470.zip cpython-2b1a81e2cfa740609d48ad82627ae251262e6470.tar.gz cpython-2b1a81e2cfa740609d48ad82627ae251262e6470.tar.bz2 |
gh-106004: PyDict_GetItemRef() should only be in the limited API 3.13 (GH-107229)
Diffstat (limited to 'Include/dictobject.h')
-rw-r--r-- | Include/dictobject.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/dictobject.h b/Include/dictobject.h index 26434e4..1bbeec1 100644 --- a/Include/dictobject.h +++ b/Include/dictobject.h @@ -58,6 +58,7 @@ PyAPI_FUNC(PyObject *) PyDict_GetItemString(PyObject *dp, const char *key); PyAPI_FUNC(int) PyDict_SetItemString(PyObject *dp, const char *key, PyObject *item); PyAPI_FUNC(int) PyDict_DelItemString(PyObject *dp, const char *key); +#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030D0000 // Return the object from dictionary *op* which has a key *key*. // - If the key is present, set *result to a new strong reference to the value // and return 1. @@ -65,6 +66,7 @@ PyAPI_FUNC(int) PyDict_DelItemString(PyObject *dp, const char *key); // - On error, raise an exception and return -1. PyAPI_FUNC(int) PyDict_GetItemRef(PyObject *mp, PyObject *key, PyObject **result); PyAPI_FUNC(int) PyDict_GetItemStringRef(PyObject *mp, const char *key, PyObject **result); +#endif #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030A0000 PyAPI_FUNC(PyObject *) PyObject_GenericGetDict(PyObject *, void *); |