Skip to content

Commit

Permalink
pythongh-110968: Py_MOD_PER_INTERPRETER_GIL_SUPPORTED was added to 3.…
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner committed Nov 1, 2023
1 parent 102685c commit ef83b3f
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 23 deletions.
8 changes: 4 additions & 4 deletions Include/moduleobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions Modules/_ctypes/_ctypes_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Modules/_multiprocessing/posixshmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions Modules/_scproxy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion Modules/_stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Modules/_testclinic_limited.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions Modules/_uuidmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions Modules/errnomodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions Modules/md5module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion Modules/resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions Modules/xxlimited.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions PC/winsound.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit ef83b3f

Please sign in to comment.