bpo-40545: Export _PyErr_GetTopmostException() function (GH-19978)

Declare _PyErr_GetTopmostException() with PyAPI_FUNC() to properly
export the function in the C API. The function remains private
("_Py") prefix.

Co-Authored-By: Julien Danjou <julien@danjou.info>
This commit is contained in:
Victor Stinner 2020-05-07 15:42:33 +02:00 committed by GitHub
parent e1becf46b4
commit 8963a7f1f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -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) */

View File

@ -0,0 +1,3 @@
Declare ``_PyErr_GetTopmostException()`` with ``PyAPI_FUNC()`` to properly
export the function in the C API. The function remains private (``_Py``)
prefix.