From 94dab38055bcd1875c92cff225abde48ed9881fe Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Fri, 3 Nov 2023 11:55:41 -0600 Subject: [PATCH] Restrict Py_mod_multiple_interpreters to 3.12+ under Py_LIMITED_API. --- Include/moduleobject.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Include/moduleobject.h b/Include/moduleobject.h index 52a47f10e5953e..42b87cc4e91012 100644 --- a/Include/moduleobject.h +++ b/Include/moduleobject.h @@ -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