diff --git a/Cython/Utility/Coroutine.c b/Cython/Utility/Coroutine.c index dc05a150eb8..b7ea282f358 100644 --- a/Cython/Utility/Coroutine.c +++ b/Cython/Utility/Coroutine.c @@ -499,6 +499,9 @@ static int __pyx_Generator_init(PyObject *module); /*proto*/ //@requires: ModuleSetupCode.c::IncludeStructmemberH #include +#if PY_VERSION_HEX >= 0x030b00a5 + #include "internal/pycore_frame.h" +#endif #define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom) diff --git a/Cython/Utility/Exceptions.c b/Cython/Utility/Exceptions.c index 326061fa3c5..ec633355a3d 100644 --- a/Cython/Utility/Exceptions.c +++ b/Cython/Utility/Exceptions.c @@ -784,6 +784,9 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, #include "compile.h" #include "frameobject.h" +#if PY_VERSION_HEX >= 0x030b00a5 + #include "internal/pycore_frame.h" +#endif #include "traceback.h" #if CYTHON_COMPILING_IN_LIMITED_API diff --git a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c index 1ea8d6cef33..d7332e42815 100644 --- a/Cython/Utility/ObjectHandling.c +++ b/Cython/Utility/ObjectHandling.c @@ -2444,6 +2444,9 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, #if !CYTHON_VECTORCALL #if PY_VERSION_HEX >= 0x03080000 #include "frameobject.h" +#if PY_VERSION_HEX >= 0x030b00a5 + #include "internal/pycore_frame.h" +#endif #define __Pxy_PyFrame_Initialize_Offsets() #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) #else diff --git a/Cython/Utility/Profile.c b/Cython/Utility/Profile.c index 645ec953506..856c5871f74 100644 --- a/Cython/Utility/Profile.c +++ b/Cython/Utility/Profile.c @@ -37,6 +37,9 @@ #include "compile.h" #include "frameobject.h" +#if PY_VERSION_HEX >= 0x030b00a5 + #include "internal/pycore_frame.h" +#endif #include "traceback.h" #if CYTHON_PROFILE_REUSE_FRAME