File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ void CPy_RestoreExcInfo(tuple_T3OOO info) {
75
75
}
76
76
77
77
bool CPy_ExceptionMatches (PyObject * type ) {
78
- return PyErr_GivenExceptionMatches (CPy_ExcState ()-> exc_type , type );
78
+ return PyErr_GivenExceptionMatches (( PyObject * ) Py_TYPE ( CPy_ExcState ()-> exc_value ) , type );
79
79
}
80
80
81
81
PyObject * CPy_GetExcValue (void ) {
@@ -189,6 +189,13 @@ void CPy_TypeError(const char *expected, PyObject *value) {
189
189
}
190
190
}
191
191
192
+ // The PyFrameObject type definition (struct _frame) has been moved
193
+ // to the internal C API: to the pycore_frame.h header file.
194
+ // https://github.com/python/cpython/pull/31530
195
+ #if PY_VERSION_HEX >= 0x030b00a6
196
+ #include "internal/pycore_frame.h"
197
+ #endif
198
+
192
199
// This function is basically exactly the same with _PyTraceback_Add
193
200
// which is available in all the versions we support.
194
201
// We're continuing to use this because we'll probably optimize this later.
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ int CPy_YieldFromErrorHandle(PyObject *iter, PyObject **outp)
45
45
{
46
46
_Py_IDENTIFIER (close );
47
47
_Py_IDENTIFIER (throw );
48
- PyObject * exc_type = CPy_ExcState ()-> exc_type ;
48
+ PyObject * exc_type = ( PyObject * ) Py_TYPE ( CPy_ExcState ()-> exc_value ) ;
49
49
PyObject * type , * value , * traceback ;
50
50
PyObject * _m ;
51
51
PyObject * res ;
You can’t perform that action at this time.
0 commit comments