Skip to content

Commit

Permalink
pythongh-110968: Py_MOD_PER_INTERPRETER_GIL_SUPPORTED was added to 3.12
Browse files Browse the repository at this point in the history
Constants like Py_MOD_PER_INTERPRETER_GIL_SUPPORTED were only added
to the limited C API version 3.12 and newer.
  • Loading branch information
vstinner committed Nov 1, 2023
1 parent 21c8fbf commit a255169
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Include/moduleobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a255169

Please sign in to comment.