diff options
author | Victor Stinner <vstinner@python.org> | 2023-11-01 04:24:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-01 04:24:33 +0100 |
commit | ef83b3fc00716e16c54c7030326809c374c33161 (patch) | |
tree | c10f22c4e2bf540c5b74cf0279e6a6c0666a5d4e | |
parent | 102685c4c8481ec5d9c132fcf06b46057e815969 (diff) | |
download | cpython-ef83b3fc00716e16c54c7030326809c374c33161.tar.gz cpython-ef83b3fc00716e16c54c7030326809c374c33161.zip |
gh-110968: Py_MOD_PER_INTERPRETER_GIL_SUPPORTED was added to 3.12 (#111584)
-rw-r--r-- | Include/moduleobject.h | 8 | ||||
-rw-r--r-- | Modules/_ctypes/_ctypes_test.c | 4 | ||||
-rw-r--r-- | Modules/_multiprocessing/posixshmem.c | 4 | ||||
-rw-r--r-- | Modules/_scproxy.c | 4 | ||||
-rw-r--r-- | Modules/_stat.c | 2 | ||||
-rw-r--r-- | Modules/_testclinic_limited.c | 2 | ||||
-rw-r--r-- | Modules/_uuidmodule.c | 4 | ||||
-rw-r--r-- | Modules/errnomodule.c | 4 | ||||
-rw-r--r-- | Modules/md5module.c | 4 | ||||
-rw-r--r-- | Modules/resource.c | 2 | ||||
-rw-r--r-- | Modules/xxlimited.c | 4 | ||||
-rw-r--r-- | PC/winsound.c | 4 |
12 files changed, 23 insertions, 23 deletions
diff --git a/Include/moduleobject.h b/Include/moduleobject.h index 2f7dc254466..52a47f10e59 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 12d372ff167..5869d8f952d 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/_multiprocessing/posixshmem.c b/Modules/_multiprocessing/posixshmem.c index dc3c59d01e0..b1f776cbbec 100644 --- a/Modules/_multiprocessing/posixshmem.c +++ b/Modules/_multiprocessing/posixshmem.c @@ -5,8 +5,8 @@ posixshmem - A Python extension that provides shm_open() and shm_unlink() #include "pyconfig.h" // Py_NOGIL #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/_scproxy.c b/Modules/_scproxy.c index c8e120e24b1..9f7a65c91e2 100644 --- a/Modules/_scproxy.c +++ b/Modules/_scproxy.c @@ -8,8 +8,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/_stat.c b/Modules/_stat.c index d0035608aad..9e278d6dcd1 100644 --- a/Modules/_stat.c +++ b/Modules/_stat.c @@ -15,8 +15,8 @@ #include "pyconfig.h" // Py_NOGIL #endif -// Need limited C API version 3.13 for PyModule_Add() on Windows #ifndef Py_NOGIL +// Need limited C API version 3.13 for PyModule_Add() on Windows #define Py_LIMITED_API 0x030d0000 #endif diff --git a/Modules/_testclinic_limited.c b/Modules/_testclinic_limited.c index 63ebb529260..c5d07e1370d 100644 --- a/Modules/_testclinic_limited.c +++ b/Modules/_testclinic_limited.c @@ -8,8 +8,8 @@ #include "pyconfig.h" // Py_NOGIL #endif -// For now, only limited C API 3.13 is supported #ifndef Py_NOGIL +// For now, only limited C API 3.13 is supported #define Py_LIMITED_API 0x030d0000 #endif diff --git a/Modules/_uuidmodule.c b/Modules/_uuidmodule.c index 8bda1d60247..1d716051df4 100644 --- a/Modules/_uuidmodule.c +++ b/Modules/_uuidmodule.c @@ -8,8 +8,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/errnomodule.c b/Modules/errnomodule.c index 5ac4d298343..1e2c55a1a26 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 ff7fc09bca3..7883a8cbe6e 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 eb9c2e27fdb..87c44607df1 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 3dcf74ab119..21d7e9ba67a 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 36e4d07420e..d1ff991c934 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 <Python.h> |