diff --git a/Include/moduleobject.h b/Include/moduleobject.h index 2f7dc254466c46f..52a47f10e5953ed 100644 --- a/Include/moduleobject.h +++ b/Include/moduleobject.h @@ -82,10 +82,10 @@ struct PyModuleDef_Slot { #endif /* New in 3.5 */ /* for Py_mod_multiple_interpreters: */ -#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030d0000 -#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) +#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 { diff --git a/Modules/_ctypes/_ctypes_test.c b/Modules/_ctypes/_ctypes_test.c index 12d372ff1670211..5869d8f952d1843 100644 --- a/Modules/_ctypes/_ctypes_test.c +++ b/Modules/_ctypes/_ctypes_test.c @@ -3,8 +3,8 @@ #endif #ifndef Py_NOGIL -// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED -#define Py_LIMITED_API 0x030d0000 +// Need limited C API version 3.12 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED +#define Py_LIMITED_API 0x030c0000 #endif // gh-85283: On Windows, Py_LIMITED_API requires Py_BUILD_CORE to not attempt diff --git a/Modules/errnomodule.c b/Modules/errnomodule.c index 5ac4d2983432541..1e2c55a1a26b4b9 100644 --- a/Modules/errnomodule.c +++ b/Modules/errnomodule.c @@ -5,8 +5,8 @@ #endif #ifndef Py_NOGIL -// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED -#define Py_LIMITED_API 0x030d0000 +// Need limited C API version 3.12 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED +#define Py_LIMITED_API 0x030c0000 #endif #include "Python.h" diff --git a/Modules/md5module.c b/Modules/md5module.c index ff7fc09bca39966..7883a8cbe6e2467 100644 --- a/Modules/md5module.c +++ b/Modules/md5module.c @@ -21,8 +21,8 @@ #endif #ifndef Py_NOGIL -// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED -#define Py_LIMITED_API 0x030d0000 +// Need limited C API version 3.12 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED +#define Py_LIMITED_API 0x030c0000 #endif #include "Python.h" diff --git a/Modules/resource.c b/Modules/resource.c index eb9c2e27fdba85c..87c44607df1c4cd 100644 --- a/Modules/resource.c +++ b/Modules/resource.c @@ -3,7 +3,7 @@ #endif #ifndef Py_NOGIL -// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED +// Need limited C API version 3.13 for PySys_Audit() #define Py_LIMITED_API 0x030d0000 #endif diff --git a/Modules/xxlimited.c b/Modules/xxlimited.c index 3dcf74ab1190d1a..21d7e9ba67ad78c 100644 --- a/Modules/xxlimited.c +++ b/Modules/xxlimited.c @@ -67,8 +67,8 @@ #endif #ifndef Py_NOGIL -// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED -#define Py_LIMITED_API 0x030d0000 +// Need limited C API version 3.12 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED +#define Py_LIMITED_API 0x030c0000 #endif #include "Python.h" diff --git a/PC/winsound.c b/PC/winsound.c index 36e4d07420e650b..d1ff991c934bae0 100644 --- a/PC/winsound.c +++ b/PC/winsound.c @@ -36,8 +36,8 @@ */ #ifndef Py_NOGIL -// Need limited C API version 3.13 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED -#define Py_LIMITED_API 0x030d0000 +// Need limited C API version 3.12 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED +#define Py_LIMITED_API 0x030c0000 #endif #include