Skip to content

Commit cb5cf36

Browse files
committed
Re-export _Py_DumpTraceback and _Py_DumpTracebackThreads
These functions stopped being exported in #107215. However, they are the only way to print a Python stacktrace safely from a signal handler, making them very useful for extensions. Re-export them.
1 parent 6acaf65 commit cb5cf36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Include/internal/pycore_traceback.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ PyAPI_FUNC(void) _PyTraceback_Add(const char *, const char *, int);
3131
3232
This function is signal safe. */
3333

34-
extern void _Py_DumpTraceback(
34+
PyAPI_FUNC(void) _Py_DumpTraceback(
3535
int fd,
3636
PyThreadState *tstate);
3737

@@ -58,7 +58,7 @@ extern void _Py_DumpTraceback(
5858
5959
This function is signal safe. */
6060

61-
extern const char* _Py_DumpTracebackThreads(
61+
PyAPI_FUNC(const char*) _Py_DumpTracebackThreads(
6262
int fd,
6363
PyInterpreterState *interp,
6464
PyThreadState *current_tstate);

0 commit comments

Comments
 (0)