Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8963a7f

Browse filesBrowse 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
Copy full SHA for 8963a7f

File tree

2 files changed

+4
-1
lines changed
Filter options

2 files changed

+4
-1
lines changed

‎Include/cpython/pyerrors.h

Copy file name to clipboardExpand all lines: Include/cpython/pyerrors.h
+1-1Lines 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) */
+3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.