Message 412304 - Python tracker (original) (raw)
GH-30531 proposes adding PyErr_GetActiveException() function which has no parameter, but Cython __Pyx_PyErr_GetTopmostException() has a tstate parameter.
I've now updated it to follow the pattern of other functions, where the is a private function that takes tstate and the public function calls it.
So it adds in Include/pyerrors.h
PyAPI_FUNC(PyObject*) PyErr_GetActiveException(void); PyAPI_FUNC(void) PyErr_SetActiveException(PyObject *);
and in Include/cpython/pyerrors.h
PyAPI_FUNC(PyObject*) _PyErr_GetActiveException(PyThreadState *); PyAPI_FUNC(void) _PyErr_SetActiveException(PyThreadState *, PyObject *);