blob: baf82e1b23a0c3f5237542028c998f206814ba37 [file] [log] [blame]
Guido van Rossumf70e43a1991-02-19 12:39:46 +00001
Fred Drake5eb6d4e2000-07-08 23:37:28 +00002#ifndef Py_TRACEBACK_H
3#define Py_TRACEBACK_H
4#ifdef __cplusplus
5extern "C" {
6#endif
7
Guido van Rossum3f5da241990-12-20 15:06:42 +00008/* Traceback interface */
9
Guido van Rossum66cb3111994-12-30 15:33:50 +000010struct _frame;
11
Fred Drake5eb6d4e2000-07-08 23:37:28 +000012DL_IMPORT(int) PyTraceBack_Here(struct _frame *);
13DL_IMPORT(PyObject *) PyTraceBack_Fetch(void);
14DL_IMPORT(int) PyTraceBack_Store(PyObject *);
15DL_IMPORT(int) PyTraceBack_Print(PyObject *, PyObject *);
Guido van Rossuma3309961993-07-28 09:05:47 +000016
Guido van Rossum884afd61995-07-18 14:21:06 +000017/* Reveale traceback type so we can typecheck traceback objects */
Guido van Rossum43466ec1998-12-04 18:48:25 +000018extern DL_IMPORT(PyTypeObject) PyTraceBack_Type;
Guido van Rossum9d78d8d1995-09-18 21:29:36 +000019#define PyTraceBack_Check(v) ((v)->ob_type == &PyTraceBack_Type)
Guido van Rossum884afd61995-07-18 14:21:06 +000020
Guido van Rossuma3309961993-07-28 09:05:47 +000021#ifdef __cplusplus
22}
23#endif
24#endif /* !Py_TRACEBACK_H */