]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-111698: Restrict Py_mod_multiple_interpreters to 3.12+ Under Py_LIMITED_API (gh...
authorEric Snow <ericsnowcurrently@gmail.com>
Mon, 6 Nov 2023 16:34:57 +0000 (09:34 -0700)
committerGitHub <noreply@github.com>
Mon, 6 Nov 2023 16:34:57 +0000 (09:34 -0700)
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.)

Include/moduleobject.h

index 52a47f10e5953ed276afcf0a60d387d2ce184834..42b87cc4e91012628354ac6197bc8389a243d136 100644 (file)
@@ -73,7 +73,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