mirror of
https://github.com/python/cpython.git
synced 2026-01-06 07:22:09 +00:00
gh-116417: Build _testinternalcapi with limited C API version 3.5 (#116598)
This commit is contained in:
parent
b6ae6da1bd
commit
546eb7a3be
3 changed files with 15 additions and 2 deletions
|
|
@ -1,3 +1,9 @@
|
|||
// 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 )
|
||||
# define Py_LIMITED_API 0x030c0000
|
||||
#endif
|
||||
|
||||
#include "parts.h"
|
||||
#include <stddef.h> // max_align_t
|
||||
#include <string.h> // memset
|
||||
|
|
|
|||
|
|
@ -7,8 +7,9 @@
|
|||
#include "pyconfig.h" // Py_GIL_DISABLED
|
||||
|
||||
// Use the limited C API
|
||||
#ifndef Py_GIL_DISABLED
|
||||
# define Py_LIMITED_API 0x030c0000 // 3.12
|
||||
#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
|
||||
|
||||
// Make sure that the internal C API cannot be used.
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
/* Test Vectorcall in the limited API */
|
||||
|
||||
// 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 )
|
||||
# define Py_LIMITED_API 0x030c0000
|
||||
#endif
|
||||
|
||||
#include "parts.h"
|
||||
#include "clinic/vectorcall_limited.c.h"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue