gh-114329: Fix PyList_GetItemRef() limited C API definition (#117520)

This commit is contained in:
Victor Stinner 2024-04-03 23:02:42 +02:00 • committed by GitHub
parent c43f6a4dfa
commit 2057c92125
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 12 additions and 4 deletions

View file

@ -1,6 +1,6 @@
// Need limited C API version 3.12 for PyType_FromMetaclass()
#include "pyconfig.h" // Py_GIL_DISABLED
#if !defined(Py_GIL_DISABLED) && !defined(Py_LIMITED_API )
#if !defined(Py_GIL_DISABLED) && !defined(Py_LIMITED_API)
# define Py_LIMITED_API 0x030c0000
#endif

View file

@ -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"

View file

@ -1,6 +1,6 @@
// Need limited C API version 3.13 for Py_GetConstant()
#include "pyconfig.h" // Py_GIL_DISABLED
#if !defined(Py_GIL_DISABLED) && !defined(Py_LIMITED_API )
#if !defined(Py_GIL_DISABLED) && !defined(Py_LIMITED_API)
# define Py_LIMITED_API 0x030d0000
#endif

View file

@ -7,7 +7,7 @@
#include "pyconfig.h" // Py_GIL_DISABLED
// Use the limited C API
#if !defined(Py_GIL_DISABLED) && !defined(Py_LIMITED_API )
#if !defined(Py_GIL_DISABLED) && !defined(Py_LIMITED_API)
// need limited C API version 3.5 for PyModule_AddFunctions()
# define Py_LIMITED_API 0x03050000
#endif

View file

@ -2,7 +2,7 @@
// Need limited C API version 3.12 for PyObject_Vectorcall()
#include "pyconfig.h" // Py_GIL_DISABLED
#if !defined(Py_GIL_DISABLED) && !defined(Py_LIMITED_API )
#if !defined(Py_GIL_DISABLED) && !defined(Py_LIMITED_API)
# define Py_LIMITED_API 0x030c0000
#endif