Fred Drake | 5eb6d4e | 2000-07-08 23:37:28 +0000 | [diff] [blame] | 1 | #ifndef Py_TRACEBACK_H |
| 2 | #define Py_TRACEBACK_H |
| 3 | #ifdef __cplusplus |
| 4 | extern "C" { |
| 5 | #endif |
| 6 | |
Nicholas Bastin | a7604bf | 2004-03-21 18:37:23 +0000 | [diff] [blame] | 7 | struct _frame; |
| 8 | |
Guido van Rossum | 3f5da24 | 1990-12-20 15:06:42 +0000 | [diff] [blame] | 9 | /* Traceback interface */ |
Guido van Rossum | 66cb311 | 1994-12-30 15:33:50 +0000 | [diff] [blame] | 10 | |
Mark Hammond | 91a681d | 2002-08-12 07:21:58 +0000 | [diff] [blame] | 11 | PyAPI_FUNC(int) PyTraceBack_Here(struct _frame *); |
| 12 | PyAPI_FUNC(int) PyTraceBack_Print(PyObject *, PyObject *); |
Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 13 | |
Andrew M. Kuchling | 913b907 | 2002-03-19 16:02:35 +0000 | [diff] [blame] | 14 | /* Reveal traceback type so we can typecheck traceback objects */ |
Mark Hammond | 91a681d | 2002-08-12 07:21:58 +0000 | [diff] [blame] | 15 | PyAPI_DATA(PyTypeObject) PyTraceBack_Type; |
Christian Heimes | 90aa764 | 2007-12-19 02:45:37 +0000 | [diff] [blame] | 16 | #define PyTraceBack_Check(v) (Py_TYPE(v) == &PyTraceBack_Type) |
Guido van Rossum | 884afd6 | 1995-07-18 14:21:06 +0000 | [diff] [blame] | 17 | |
Victor Stinner | 024e37a | 2011-03-31 01:31:06 +0200 | [diff] [blame] | 18 | |
Victor Stinner | 89e7cdc | 2016-03-15 21:49:37 +0100 | [diff] [blame] | 19 | #ifndef Py_LIMITED_API |
Victor Stinner | ed48866 | 2019-05-20 00:14:57 +0200 | [diff] [blame] | 20 | # define Py_CPYTHON_TRACEBACK_H |
| 21 | # include "cpython/traceback.h" |
| 22 | # undef Py_CPYTHON_TRACEBACK_H |
| 23 | #endif |
Victor Stinner | 89e7cdc | 2016-03-15 21:49:37 +0100 | [diff] [blame] | 24 | |
Guido van Rossum | a330996 | 1993-07-28 09:05:47 +0000 | [diff] [blame] | 25 | #ifdef __cplusplus |
| 26 | } |
| 27 | #endif |
| 28 | #endif /* !Py_TRACEBACK_H */ |