cpython/Include/cpython/traceback.h
Alex Malyshev 646853df13
gh-145559: Add PyUnstable_DumpTraceback() and PyUnstable_DumpTracebackThreads() (#148145)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-05-06 15:01:12 +00:00

21 lines
530 B
C

#ifndef Py_CPYTHON_TRACEBACK_H
# error "this header file must not be included directly"
#endif
typedef struct _traceback PyTracebackObject;
struct _traceback {
PyObject_HEAD
PyTracebackObject *tb_next;
PyFrameObject *tb_frame;
int tb_lasti;
int tb_lineno;
};
PyAPI_FUNC(const char*) PyUnstable_DumpTraceback(int fd, PyThreadState *tstate);
PyAPI_FUNC(const char*) PyUnstable_DumpTracebackThreads(
int fd,
PyInterpreterState *interp,
PyThreadState *current_tstate,
Py_ssize_t max_threads);