8000 gh-111698: Restrict Py_mod_multiple_interpreters to 3.12+ Under Py_LI… · miss-islington/cpython@978fb85 · GitHub
[go: up one dir, main page]

Skip to content

Commit 978fb85

Browse files
ericsnowcurrentlymiss-islington
authored andcommitted
pythongh-111698: Restrict Py_mod_multiple_interpreters to 3.12+ Under Py_LIMITED_API (pythongh-111707)
This should have been done in pythongh-104148. (A similar fix has already be done for that slot's value macros, and backported to 3.12. See pythongh-110968.) (cherry picked from commit 836e0a7) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
1 parent c4e524c commit 978fb85

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Include/moduleobject.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,9 @@ struct PyModuleDef_Slot {
7878

7979
#define Py_mod_create 1
8080
#define Py_mod_exec 2
81-
#define Py_mod_multiple_interpreters 3
81+
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030c0000
82+
# define Py_mod_multiple_interpreters 3
83+
#endif
8284

8385
#ifndef Py_LIMITED_API
8486
#define _Py_mod_LAST_SLOT 3

0 commit comments

Comments
 (0)
0