diff --git a/Cython/Utility/Coroutine.c b/Cython/Utility/Coroutine.c index dc05a150eb8..2ced4f9592e 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 >= 0x030b00a6 + #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..ac927b7402b 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 >= 0x030b00a6 + #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..f19ef0569fa 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 >= 0x030b00a6 + #include "internal/pycore_frame.h" +#endif #define __Pxy_PyFrame_Initialize_Offsets() #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus) #else @@ -3106,5 +3109,3 @@ static CYTHON_INLINE void __Pyx_RaiseCppAttributeError(const char *varname); /*p static CYTHON_INLINE void __Pyx_RaiseCppAttributeError(const char *varname) { PyErr_Format(PyExc_AttributeError, "C++ attribute '%s' is not initialized", varname); } - - diff --git a/Cython/Utility/Profile.c b/Cython/Utility/Profile.c index 645ec953506..e9ea76b7e77 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 >= 0x030b00a6 + #include "internal/pycore_frame.h" +#endif #include "traceback.h" #if CYTHON_PROFILE_REUSE_FRAME