From c6647c408d47f446b8f527701d22d57488e97b8c Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 24 Apr 2020 14:31:01 +0200 Subject: [PATCH 1/2] bpo-40545: Expose _PyErr_GetTopmostException in the public C API This makes it possible to use it in a C extension module. --- Include/cpython/pyerrors.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Include/cpython/pyerrors.h b/Include/cpython/pyerrors.h index cdd052026c1ba2..85dbdea9c81755 100644 --- a/Include/cpython/pyerrors.h +++ b/Include/cpython/pyerrors.h @@ -75,7 +75,7 @@ typedef PyOSErrorObject PyWindowsErrorObject; /* Error handling definitions */ PyAPI_FUNC(void) _PyErr_SetKeyError(PyObject *); -_PyErr_StackItem *_PyErr_GetTopmostException(PyThreadState *tstate); +PyAPI_FUNC(_PyErr_StackItem *) _PyErr_GetTopmostException(PyThreadState *tstate); PyAPI_FUNC(void) _PyErr_GetExcInfo(PyThreadState *, PyObject **, PyObject **, PyObject **); /* Context manipulation (PEP 3134) */ From 1146ba97f6d09648d770f5afb3d03d9c0c25f89e Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Thu, 7 May 2020 09:33:27 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Misc/NEWS.d/next/C API/2020-05-07-09-33-25.bpo-40545.32unl1.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/C API/2020-05-07-09-33-25.bpo-40545.32unl1.rst diff --git a/Misc/NEWS.d/next/C API/2020-05-07-09-33-25.bpo-40545.32unl1.rst b/Misc/NEWS.d/next/C API/2020-05-07-09-33-25.bpo-40545.32unl1.rst new file mode 100644 index 00000000000000..89eadd62f930b1 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2020-05-07-09-33-25.bpo-40545.32unl1.rst @@ -0,0 +1 @@ +Export _PyErr_GetTopmostException as a public function in the C API. \ No newline at end of file