diff options
author | Victor Stinner <vstinner@python.org> | 2024-03-20 22:52:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-20 22:52:23 (GMT) |
commit | 104602a6078564765b7b8f42888f8eaa37b129b1 (patch) | |
tree | 244bd4b8259bc211dff1bb5dd9400d1b7009cd31 | |
parent | 8ad88984200b2ccddc0a08229dd2f4c14d1a71fc (diff) | |
download | cpython-104602a6078564765b7b8f42888f8eaa37b129b1.zip cpython-104602a6078564765b7b8f42888f8eaa37b129b1.tar.gz cpython-104602a6078564765b7b8f42888f8eaa37b129b1.tar.bz2 |
gh-105927: Limit PyWeakref_GetRef() to limited C API 3.13 (#117091)
-rw-r--r-- | Include/weakrefobject.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/weakrefobject.h b/Include/weakrefobject.h index 727ba69..a6e71eb 100644 --- a/Include/weakrefobject.h +++ b/Include/weakrefobject.h @@ -28,7 +28,10 @@ PyAPI_FUNC(PyObject *) PyWeakref_NewRef(PyObject *ob, PyAPI_FUNC(PyObject *) PyWeakref_NewProxy(PyObject *ob, PyObject *callback); Py_DEPRECATED(3.13) PyAPI_FUNC(PyObject *) PyWeakref_GetObject(PyObject *ref); + +#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030D0000 PyAPI_FUNC(int) PyWeakref_GetRef(PyObject *ref, PyObject **pobj); +#endif #ifndef Py_LIMITED_API |