mirror of https://github.com/python/cpython
gh-114329: Fix PyList_GetItemRef() limited C API definition (#117520)
This commit is contained in:
parent
c43f6a4dfa
commit
2057c92125
|
@ -29,7 +29,9 @@ PyAPI_FUNC(PyObject *) PyList_New(Py_ssize_t size);
|
|||
PyAPI_FUNC(Py_ssize_t) PyList_Size(PyObject *);
|
||||
|
||||
PyAPI_FUNC(PyObject *) PyList_GetItem(PyObject *, Py_ssize_t);
|
||||
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030d0000
|
||||
PyAPI_FUNC(PyObject *) PyList_GetItemRef(PyObject *, Py_ssize_t);
|
||||
#endif
|
||||
PyAPI_FUNC(int) PyList_SetItem(PyObject *, Py_ssize_t, PyObject *);
|
||||
PyAPI_FUNC(int) PyList_Insert(PyObject *, Py_ssize_t, PyObject *);
|
||||
PyAPI_FUNC(int) PyList_Append(PyObject *, PyObject *);
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
// Need limited C API version 3.13 for PyList_GetItemRef()
|
||||
#include "pyconfig.h" // Py_GIL_DISABLED
|
||||
#if !defined(Py_GIL_DISABLED) && !defined(Py_LIMITED_API)
|
||||
# define Py_LIMITED_API 0x030d0000
|
||||
#endif
|
||||
|
||||
#include "parts.h"
|
||||
#include "util.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue