gh-105927: Limit PyWeakref_GetRef() to limited C API 3.13 (#117091)

This commit is contained in:
Victor Stinner 2024-03-20 23:52:23 +01:00 committed by GitHub
parent 8ad8898420
commit 104602a607
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -28,7 +28,10 @@ PyAPI_FUNC(PyObject *) PyWeakref_NewRef(PyObject *ob,
PyAPI_FUNC(PyObject *) PyWeakref_NewProxy(PyObject *ob, PyAPI_FUNC(PyObject *) PyWeakref_NewProxy(PyObject *ob,
PyObject *callback); PyObject *callback);
Py_DEPRECATED(3.13) PyAPI_FUNC(PyObject *) PyWeakref_GetObject(PyObject *ref); 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); PyAPI_FUNC(int) PyWeakref_GetRef(PyObject *ref, PyObject **pobj);
#endif
#ifndef Py_LIMITED_API #ifndef Py_LIMITED_API