diff options
author | Victor Stinner <vstinner@python.org> | 2023-11-01 17:13:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-01 17:13:31 (GMT) |
commit | d3d2cfead71e3a64704d8e578f22bba18b8e0284 (patch) | |
tree | 3ea5ffc19196d87702e42b4fa842e4601fd8e118 /Include | |
parent | e2557947a455bb7e990f0b878cf7c68f752b19f1 (diff) | |
download | cpython-d3d2cfead71e3a64704d8e578f22bba18b8e0284.zip cpython-d3d2cfead71e3a64704d8e578f22bba18b8e0284.tar.gz cpython-d3d2cfead71e3a64704d8e578f22bba18b8e0284.tar.bz2 |
[3.12] gh-110968: Py_MOD_PER_INTERPRETER_GIL_SUPPORTED was added to 3.12 (#111588)
Constants like Py_MOD_PER_INTERPRETER_GIL_SUPPORTED were only added
to the limited C API version 3.12 and newer.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/moduleobject.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Include/moduleobject.h b/Include/moduleobject.h index b8bdfe2..1717eb3 100644 --- a/Include/moduleobject.h +++ b/Include/moduleobject.h @@ -84,13 +84,15 @@ struct PyModuleDef_Slot { #define _Py_mod_LAST_SLOT 3 #endif -/* for Py_mod_multiple_interpreters: */ -#define Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED ((void *)0) -#define Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED ((void *)1) -#define Py_MOD_PER_INTERPRETER_GIL_SUPPORTED ((void *)2) - #endif /* New in 3.5 */ +/* for Py_mod_multiple_interpreters: */ +#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030c0000 +# define Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED ((void *)0) +# define Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED ((void *)1) +# define Py_MOD_PER_INTERPRETER_GIL_SUPPORTED ((void *)2) +#endif + struct PyModuleDef { PyModuleDef_Base m_base; const char* m_name; |