Skip to content

Commit 8963a7f

Browse files
vstinnerjd
andauthored
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>
1 parent e1becf4 commit 8963a7f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Include/cpython/pyerrors.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ typedef PyOSErrorObject PyWindowsErrorObject;
7575
/* Error handling definitions */
7676

7777
PyAPI_FUNC(void) _PyErr_SetKeyError(PyObject *);
78-
_PyErr_StackItem *_PyErr_GetTopmostException(PyThreadState *tstate);
78+
PyAPI_FUNC(_PyErr_StackItem*) _PyErr_GetTopmostException(PyThreadState *tstate);
7979
PyAPI_FUNC(void) _PyErr_GetExcInfo(PyThreadState *, PyObject **, PyObject **, PyObject **);
8080

8181
/* Context manipulation (PEP 3134) */
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Declare ``_PyErr_GetTopmostException()`` with ``PyAPI_FUNC()`` to properly
2+
export the function in the C API. The function remains private (``_Py``)
3+
prefix.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy