summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2020-10-19 22:47:37 (GMT)
committerGitHub <noreply@github.com>2020-10-19 22:47:37 (GMT)
commit1438c2ac773e87d1f9c97fc22f2346e16bf48773 (patch)
tree71d6951fede352740b6dd0eba6b2c1c9c67101b1 /Include
parentf85658a09878c658ae0e0590bfa30e4ce51c9a04 (diff)
downloadcpython-1438c2ac773e87d1f9c97fc22f2346e16bf48773.zip
cpython-1438c2ac773e87d1f9c97fc22f2346e16bf48773.tar.gz
cpython-1438c2ac773e87d1f9c97fc22f2346e16bf48773.tar.bz2
bpo-41845: Move PyObject_GenericGetDict() back into the limited API (GH22646)
It was moved out of the limited API in 7d95e4072169911b228c9e42367afb5f17fd3db0. This change re-enables it from 3.10, to avoid generating invalid extension modules for earlier versions.
Diffstat (limited to 'Include')
-rw-r--r--Include/cpython/dictobject.h1
-rw-r--r--Include/dictobject.h3
2 files changed, 3 insertions, 1 deletions
diff --git a/Include/cpython/dictobject.h b/Include/cpython/dictobject.h
index ffe0e97..5a15630 100644
--- a/Include/cpython/dictobject.h
+++ b/Include/cpython/dictobject.h
@@ -41,7 +41,6 @@ PyAPI_FUNC(int) _PyDict_DelItem_KnownHash(PyObject *mp, PyObject *key,
PyAPI_FUNC(int) _PyDict_DelItemIf(PyObject *mp, PyObject *key,
int (*predicate)(PyObject *value));
PyDictKeysObject *_PyDict_NewKeysForClass(void);
-PyAPI_FUNC(PyObject *) PyObject_GenericGetDict(PyObject *, void *);
PyAPI_FUNC(int) _PyDict_Next(
PyObject *mp, Py_ssize_t *pos, PyObject **key, PyObject **value, Py_hash_t *hash);
diff --git a/Include/dictobject.h b/Include/dictobject.h
index c88b0aa..da5a36b 100644
--- a/Include/dictobject.h
+++ b/Include/dictobject.h
@@ -57,6 +57,9 @@ PyAPI_FUNC(int) PyDict_MergeFromSeq2(PyObject *d,
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 >= 0x030A0000
+PyAPI_FUNC(PyObject *) PyObject_GenericGetDict(PyObject *, void *);
+#endif
/* Dictionary (keys, values, items) views */