mirror of
https://github.com/python/cpython.git
synced 2026-01-04 22:42:14 +00:00
Add a new separated pyframe.h header file of the PyFrame public C API: it is included by Python.h. Add PyFrame_GetLineNumber() to the limited C API. Replace "struct _frame" with "PyFrameObject" in header files. PyFrameObject is now defined as struct _frame by pyframe.h which is included early enough in Python.h.
22 lines
473 B
C
22 lines
473 B
C
#ifndef Py_CPYTHON_TRACEBACK_H
|
|
# error "this header file must not be included directly"
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct _traceback {
|
|
PyObject_HEAD
|
|
struct _traceback *tb_next;
|
|
PyFrameObject *tb_frame;
|
|
int tb_lasti;
|
|
int tb_lineno;
|
|
} PyTracebackObject;
|
|
|
|
PyAPI_FUNC(int) _Py_DisplaySourceLine(PyObject *, PyObject *, int, int);
|
|
PyAPI_FUNC(void) _PyTraceback_Add(const char *, const char *, int);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|