blob: b451927fafa3a85fb86510c56dffdd0845a43d99 [file] [log] [blame]
Fred Drake5eb6d4e2000-07-08 23:37:28 +00001#ifndef Py_TRACEBACK_H
2#define Py_TRACEBACK_H
3#ifdef __cplusplus
4extern "C" {
5#endif
6
Nicholas Bastina7604bf2004-03-21 18:37:23 +00007struct _frame;
8
Guido van Rossum3f5da241990-12-20 15:06:42 +00009/* Traceback interface */
Guido van Rossum66cb3111994-12-30 15:33:50 +000010
Mark Hammond91a681d2002-08-12 07:21:58 +000011PyAPI_FUNC(int) PyTraceBack_Here(struct _frame *);
12PyAPI_FUNC(int) PyTraceBack_Print(PyObject *, PyObject *);
Guido van Rossuma3309961993-07-28 09:05:47 +000013
Andrew M. Kuchling913b9072002-03-19 16:02:35 +000014/* Reveal traceback type so we can typecheck traceback objects */
Mark Hammond91a681d2002-08-12 07:21:58 +000015PyAPI_DATA(PyTypeObject) PyTraceBack_Type;
Christian Heimes90aa7642007-12-19 02:45:37 +000016#define PyTraceBack_Check(v) (Py_TYPE(v) == &PyTraceBack_Type)
Guido van Rossum884afd61995-07-18 14:21:06 +000017
Victor Stinner024e37a2011-03-31 01:31:06 +020018
Victor Stinner89e7cdc2016-03-15 21:49:37 +010019#ifndef Py_LIMITED_API
Victor Stinnered488662019-05-20 00:14:57 +020020# define Py_CPYTHON_TRACEBACK_H
21# include "cpython/traceback.h"
22# undef Py_CPYTHON_TRACEBACK_H
23#endif
Victor Stinner89e7cdc2016-03-15 21:49:37 +010024
Guido van Rossuma3309961993-07-28 09:05:47 +000025#ifdef __cplusplus
26}
27#endif
28#endif /* !Py_TRACEBACK_H */