lib

IndirectPythonInterface.h
1#ifndef __CXX_INDIRECT_PYTHON_INTERFACE__H__
2#define __CXX_INDIRECT_PYTHON_INTERFACE__H__
3
4#include <Python.h>
5
6namespace Py
7{
8bool InitialisePythonIndirectInterface();
9
10//
11// Wrap Exception variables as function calls
12//
13PyObject * _Exc_Exception();
14PyObject * _Exc_StandardError();
15PyObject * _Exc_ArithmeticError();
16PyObject * _Exc_LookupError();
17
18PyObject * _Exc_AssertionError();
19PyObject * _Exc_AttributeError();
20PyObject * _Exc_EOFError();
21PyObject * _Exc_FloatingPointError();
22PyObject * _Exc_EnvironmentError();
23PyObject * _Exc_IOError();
24PyObject * _Exc_OSError();
25PyObject * _Exc_ImportError();
26PyObject * _Exc_IndexError();
27PyObject * _Exc_KeyError();
28PyObject * _Exc_KeyboardInterrupt();
29PyObject * _Exc_MemoryError();
30PyObject * _Exc_NameError();
31PyObject * _Exc_OverflowError();
32PyObject * _Exc_RuntimeError();
33PyObject * _Exc_NotImplementedError();
34PyObject * _Exc_SyntaxError();
35PyObject * _Exc_SystemError();
36PyObject * _Exc_SystemExit();
37PyObject * _Exc_TypeError();
38PyObject * _Exc_ValueError();
39PyObject * _Exc_ZeroDivisionError();
40#ifdef MS_WINDOWS
41PyObject * _Exc_WindowsError();
42#endif
43
44PyObject * _Exc_MemoryErrorInst();
45
46#if PY_MAJOR_VERSION >= 2
47PyObject * _Exc_IndentationError();
48PyObject * _Exc_TabError();
49PyObject * _Exc_UnboundLocalError();
50PyObject * _Exc_UnicodeError();
51#endif
52
53//
54// Wrap Object variables as function calls
55//
56PyObject * _None();
57
58
59//
60// Wrap Type variables as function calls
61//
62PyTypeObject * _List_Type();
63bool _List_Check( PyObject *o );
64
65PyTypeObject * _Buffer_Type();
66bool _Buffer_Check( PyObject *op );
67
68PyTypeObject * _Class_Type();
69bool _Class_Check( PyObject *op );
70
71PyTypeObject * _Instance_Type();
72bool _Instance_Check( PyObject *op );
73
74PyTypeObject * _Method_Type();
75bool _Method_Check( PyObject *op );
76
77PyTypeObject * _CObject_Type();
78bool _CObject_Check( PyObject *op );
79
80PyTypeObject * _Complex_Type();
81bool _Complex_Check( PyObject *op );
82
83PyTypeObject * _Dict_Type();
84bool _Dict_Check( PyObject *op );
85
86PyTypeObject * _File_Type();
87bool _File_Check( PyObject *op );
88
89PyTypeObject * _Float_Type();
90bool _Float_Check( PyObject *op );
91
92PyTypeObject * _Frame_Type();
93bool _Frame_Check( PyObject *op );
94
95PyTypeObject * _Function_Type();
96bool _Function_Check( PyObject *op );
97
98PyTypeObject * _Int_Type();
99bool _Int_Check( PyObject *op );
100
101PyTypeObject * _List_Type();
102bool _List_Check( PyObject *op );
103
104PyTypeObject * _Long_Type();
105bool _Long_Check( PyObject *op );
106
107PyTypeObject * _CFunction_Type();
108bool _CFunction_Check( PyObject *op );
109
110PyTypeObject * _Module_Type();
111bool _Module_Check( PyObject *op );
112
113PyTypeObject * _Type_Type();
114bool _Type_Check( PyObject *op );
115
116PyTypeObject * _Range_Type();
117bool _Range_Check( PyObject *op );
118
119PyTypeObject * _Slice_Type();
120bool _Slice_Check( PyObject *op );
121
122PyTypeObject * _String_Type();
123bool _String_Check( PyObject *op );
124
125PyTypeObject * _Unicode_Type();
126bool _Unicode_Check( PyObject *op );
127
128PyTypeObject * _TraceBack_Type();
129bool _TraceBack_Check( PyObject *v );
130
131PyTypeObject * _Tuple_Type();
132bool _Tuple_Check( PyObject *op );
133
134#if PY_MAJOR_VERSION >= 2
135PyTypeObject * _Unicode_Type();
136bool _Unicode_Check( PyObject *op );
137#endif
138
139int &_Py_DebugFlag();
140int &_Py_InteractiveFlag();
141int &_Py_OptimizeFlag();
142int &_Py_NoSiteFlag();
143int &_Py_TabcheckFlag();
144int &_Py_VerboseFlag();
145
146#if PY_MAJOR_VERSION >= 2
147int &_Py_UnicodeFlag();
148#endif
149
150void _XINCREF( PyObject *op );
151void _XDECREF( PyObject *op );
152
153char *__Py_PackageContext();
154}
155
156#endif // __CXX_INDIRECT_PYTHON_INTERFACE__H__