Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 72b1637

Browse files
committed
Require version in Py_LIMITED_API & Py_TARGET_ABI3T
1 parent 05e7c90 commit 72b1637

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Include/pyabi.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@
3131
# define Py_BUILD_CORE
3232
#endif
3333

34+
/* Check valid values for target ABI macros.
35+
*/
36+
#if defined(Py_LIMITED_API) && Py_LIMITED_API+0 < 3
37+
// Empty Py_LIMITED_API used to work; redefine to
38+
// Python 3.2 to be explicit.
39+
# undef Py_LIMITED_API
40+
# define Py_LIMITED_API 0x03020000
41+
#endif
42+
#if defined(Py_TARGET_ABI3T) && Py_TARGET_ABI3T+0 < 0x030f0000
43+
# error "Py_TARGET_ABI3T must be 0x030f0000 (3.15) or above"
44+
#endif
45+
3446
/* Stable ABI for free-threaded builds (abi3t, introduced in PEP 803)
3547
* is enabled by one of:
3648
* - Py_TARGET_ABI3T, or

0 commit comments

Comments
 (0)