Guido van Rossum | f70e43a | 1991-02-19 12:39:46 +0000 | [diff] [blame] | 1 | |
Fred Drake | 5eb6d4e | 2000-07-08 23:37:28 +0000 | [diff] [blame] | 2 | #ifndef Py_TRACEBACK_H |
| 3 | #define Py_TRACEBACK_H |
| 4 | #ifdef __cplusplus |
| 5 | extern "C" { |
| 6 | #endif |
| 7 | |
Guido van Rossum | 3f5da24 | 1990-12-20 15:06:42 +0000 | [diff] [blame] | 8 | /* Traceback interface */ |
| 9 | |
Guido van Rossum | 66cb311 | 1994-12-30 15:33:50 +0000 | [diff] [blame] | 10 | struct _frame; |
| 11 | |
Fred Drake | 5eb6d4e | 2000-07-08 23:37:28 +0000 | [diff] [blame] | 12 | DL_IMPORT(int) PyTraceBack_Here(struct _frame *); |
| 13 | DL_IMPORT(PyObject *) PyTraceBack_Fetch(void); |
| 14 | DL_IMPORT(int) PyTraceBack_Store(PyObject *); |
| 15 | DL_IMPORT(int) PyTraceBack_Print(PyObject *, PyObject *); |
Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 16 | |
Guido van Rossum | 884afd6 | 1995-07-18 14:21:06 +0000 | [diff] [blame] | 17 | /* Reveale traceback type so we can typecheck traceback objects */ |
Guido van Rossum | 43466ec | 1998-12-04 18:48:25 +0000 | [diff] [blame] | 18 | extern DL_IMPORT(PyTypeObject) PyTraceBack_Type; |
Guido van Rossum | 9d78d8d | 1995-09-18 21:29:36 +0000 | [diff] [blame] | 19 | #define PyTraceBack_Check(v) ((v)->ob_type == &PyTraceBack_Type) |
Guido van Rossum | 884afd6 | 1995-07-18 14:21:06 +0000 | [diff] [blame] | 20 | |
Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 21 | #ifdef __cplusplus |
| 22 | } |
| 23 | #endif |
| 24 | #endif /* !Py_TRACEBACK_H */ |