mirror of
https://github.com/python/cpython.git
synced 2026-01-02 21:43:49 +00:00
The traceback.c and traceback.py mechanisms now utilize the newly added code.co_positions and PyCode_Addr2Location to print carets on the specific expressions involved in a traceback. Co-authored-by: Pablo Galindo <Pablogsal@gmail.com> Co-authored-by: Ammar Askar <ammar@ammaraskar.com> Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
14 lines
424 B
C
14 lines
424 B
C
#ifndef Py_CPYTHON_TRACEBACK_H
|
|
# error "this header file must not be included directly"
|
|
#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, int *, PyObject **);
|
|
PyAPI_FUNC(void) _PyTraceback_Add(const char *, const char *, int);
|