Home | History | Annotate | Download | only in Include
      1 
      2 #ifndef Py_TRACEBACK_H
      3 #define Py_TRACEBACK_H
      4 #ifdef __cplusplus
      5 extern "C" {
      6 #endif
      7 
      8 struct _frame;
      9 
     10 /* Traceback interface */
     11 
     12 typedef struct _traceback {
     13 	PyObject_HEAD
     14 	struct _traceback *tb_next;
     15 	struct _frame *tb_frame;
     16 	int tb_lasti;
     17 	int tb_lineno;
     18 } PyTracebackObject;
     19 
     20 PyAPI_FUNC(int) PyTraceBack_Here(struct _frame *);
     21 PyAPI_FUNC(int) PyTraceBack_Print(PyObject *, PyObject *);
     22 PyAPI_FUNC(int) _Py_DisplaySourceLine(PyObject *, const char *, int, int);
     23 
     24 /* Reveal traceback type so we can typecheck traceback objects */
     25 PyAPI_DATA(PyTypeObject) PyTraceBack_Type;
     26 #define PyTraceBack_Check(v) (Py_TYPE(v) == &PyTraceBack_Type)
     27 
     28 #ifdef __cplusplus
     29 }
     30 #endif
     31 #endif /* !Py_TRACEBACK_H */
     32