This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author iritkatriel
Recipients Mark.Shannon, brandtbucher, gvanrossum, iritkatriel, scoder, terry.reedy, vstinner
Date 2022-02-01.19:52:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1643745136.45.0.523433239347.issue45711@roundup.psfhosted.org>
In-reply-to
Content
> 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 *);
History
Date User Action Args
2022-02-01 19:52:16iritkatrielsetrecipients: + iritkatriel, gvanrossum, terry.reedy, scoder, vstinner, Mark.Shannon, brandtbucher
2022-02-01 19:52:16iritkatrielsetmessageid: <1643745136.45.0.523433239347.issue45711@roundup.psfhosted.org>
2022-02-01 19:52:16iritkatriellinkissue45711 messages
2022-02-01 19:52:16iritkatrielcreate