Skip to content

Commit 104602a

Browse files
authored
gh-105927: Limit PyWeakref_GetRef() to limited C API 3.13 (#117091)
1 parent 8ad8898 commit 104602a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Include/weakrefobject.h

+3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ PyAPI_FUNC(PyObject *) PyWeakref_NewRef(PyObject *ob,
2828
PyAPI_FUNC(PyObject *) PyWeakref_NewProxy(PyObject *ob,
2929
PyObject *callback);
3030
Py_DEPRECATED(3.13) PyAPI_FUNC(PyObject *) PyWeakref_GetObject(PyObject *ref);
31+
32+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030D0000
3133
PyAPI_FUNC(int) PyWeakref_GetRef(PyObject *ref, PyObject **pobj);
34+
#endif
3235

3336

3437
#ifndef Py_LIMITED_API

0 commit comments

Comments
 (0)