1 /**
2   Mirror _traceback.h
3 
4   Traceback interface 
5   */
6 module deimos.python.traceback;
7 
8 import deimos.python.pyport;
9 import deimos.python.object;
10 import deimos.python.frameobject;
11 
12 extern(C):
13 // Python-header-file: Include/traceback.h:
14 
15 /// _
16 struct PyTracebackObject {
17     mixin PyObject_HEAD;
18 
19     /// _
20     PyTracebackObject* tb_next;
21     /// _
22     PyFrameObject* tb_frame;
23     /// _
24     int tb_lasti;
25     /// _
26     int tb_lineno;
27 }
28 
29 /// _
30 int PyTraceBack_Here(PyFrameObject*);
31 /// _
32 int PyTraceBack_Print(PyObject*, PyObject*);
33 version(Python_3_2_Or_Later) {
34     /// Availability: >= 3.2
35     int _Py_DisplaySourceLine(PyObject*, PyObject*, int, int);
36 }else version(Python_2_6_Or_Later){
37     /// Availability: 2.6, 2.7, 3.0
38     int _Py_DisplaySourceLine(PyObject*, const(char)*, int, int);
39 }
40 
41 /// _
42 mixin(PyAPI_DATA!"PyTypeObject PyTraceBack_Type");
43 
44 // D translation of C macro:
45 /// _
46 int PyTraceBack_Check()(PyObject* v) {
47     return v.ob_type == &PyTraceBack_Type;
48 }
49 
50