summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-11-28 02:42:27 (GMT)
committerGitHub <noreply@github.com>2023-11-28 02:42:27 (GMT)
commitf7251e2af3ff9c56c1e1a7fc21a8cd7bb5df7def (patch)
tree4d56acc87f0507959d6d13d1086ba8413d23df67
parent0aceac557d78a4e284e72481fcb3a3ec45ecedba (diff)
downloadcpython-f7251e2af3ff9c56c1e1a7fc21a8cd7bb5df7def.zip
cpython-f7251e2af3ff9c56c1e1a7fc21a8cd7bb5df7def.tar.gz
cpython-f7251e2af3ff9c56c1e1a7fc21a8cd7bb5df7def.tar.bz2
[3.12] gh-111698: Restrict Py_mod_multiple_interpreters to 3.12+ Under Py_LIMITED_API (gh-111707) (gh-111787)
This should have been done in gh-104148. (A similar fix has already be done for that slot's value macros, and backported to 3.12. See gh-110968.) (cherry picked from commit 836e0a75d565ecb7e2485fee88dbe67e649a1d5f) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
-rw-r--r--Include/moduleobject.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Include/moduleobject.h b/Include/moduleobject.h
index 1717eb3..354d133 100644
--- a/Include/moduleobject.h
+++ b/Include/moduleobject.h
@@ -78,7 +78,9 @@ struct PyModuleDef_Slot {
#define Py_mod_create 1
#define Py_mod_exec 2
-#define Py_mod_multiple_interpreters 3
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030c0000
+# define Py_mod_multiple_interpreters 3
+#endif
#ifndef Py_LIMITED_API
#define _Py_mod_LAST_SLOT 3