Skip to content

Commit 65e59d8

Browse files
committed
Update Python inlined files: 3.12.7 (3.0.2)
1 parent 6eaecce commit 65e59d8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

graalpython/com.oracle.graal.python.cext/include/internal/pycore_pyerrors.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ extern void _PyErr_FiniTypes(PyInterpreterState *);
2020
static inline PyObject* _PyErr_Occurred(PyThreadState *tstate)
2121
{
2222
assert(tstate != NULL);
23-
return tstate->curexc_type;
23+
if (tstate->current_exception == NULL) {
24+
return NULL;
25+
}
26+
return (PyObject *)Py_TYPE(tstate->current_exception);
2427
}
2528

2629
static inline void _PyErr_ClearExcState(_PyErr_StackItem *exc_state)

0 commit comments

Comments
 (0)