bumping version to 3.5-rc1
[supercollider.git] / external_libraries / pycxx-6.2.2 / CXX / Python3 / IndirectPythonInterface.hxx
blobfb97b7283be83c81cf95f376f6c321da9041dfac
1 //-----------------------------------------------------------------------------
2 //
3 // Copyright (c) 1998 - 2007, The Regents of the University of California
4 // Produced at the Lawrence Livermore National Laboratory
5 // All rights reserved.
6 //
7 // This file is part of PyCXX. For details,see http://cxx.sourceforge.net/. The
8 // full copyright notice is contained in the file COPYRIGHT located at the root
9 // of the PyCXX distribution.
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are met:
14 // - Redistributions of source code must retain the above copyright notice,
15 // this list of conditions and the disclaimer below.
16 // - Redistributions in binary form must reproduce the above copyright notice,
17 // this list of conditions and the disclaimer (as noted below) in the
18 // documentation and/or materials provided with the distribution.
19 // - Neither the name of the UC/LLNL nor the names of its contributors may be
20 // used to endorse or promote products derived from this software without
21 // specific prior written permission.
23 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF THE UNIVERSITY OF
27 // CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR
28 // ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
34 // DAMAGE.
36 //-----------------------------------------------------------------------------
38 #ifndef __CXX_INDIRECT_PYTHON_INTERFACE__HXX__
39 #define __CXX_INDIRECT_PYTHON_INTERFACE__HXX__
41 #include "CXX/WrapPython.h"
43 namespace Py
45 bool InitialisePythonIndirectInterface();
48 // Wrap Exception variables as function calls
50 PyObject * _Exc_Exception();
51 PyObject * _Exc_StandardError();
52 PyObject * _Exc_ArithmeticError();
53 PyObject * _Exc_LookupError();
55 PyObject * _Exc_AssertionError();
56 PyObject * _Exc_AttributeError();
57 PyObject * _Exc_EOFError();
58 PyObject * _Exc_FloatingPointError();
59 PyObject * _Exc_EnvironmentError();
60 PyObject * _Exc_IOError();
61 PyObject * _Exc_OSError();
62 PyObject * _Exc_ImportError();
63 PyObject * _Exc_IndexError();
64 PyObject * _Exc_KeyError();
65 PyObject * _Exc_KeyboardInterrupt();
66 PyObject * _Exc_MemoryError();
67 PyObject * _Exc_NameError();
68 PyObject * _Exc_OverflowError();
69 PyObject * _Exc_RuntimeError();
70 PyObject * _Exc_NotImplementedError();
71 PyObject * _Exc_SyntaxError();
72 PyObject * _Exc_SystemError();
73 PyObject * _Exc_SystemExit();
74 PyObject * _Exc_TypeError();
75 PyObject * _Exc_ValueError();
76 PyObject * _Exc_ZeroDivisionError();
77 #ifdef MS_WINDOWS
78 PyObject * _Exc_WindowsError();
79 #endif
81 PyObject * _Exc_IndentationError();
82 PyObject * _Exc_TabError();
83 PyObject * _Exc_UnboundLocalError();
84 PyObject * _Exc_UnicodeError();
87 // Wrap Object variables as function calls
89 PyObject * _None();
91 PyObject * _False();
92 PyObject * _True();
95 // Wrap Type variables as function calls
97 PyTypeObject * _List_Type();
98 bool _List_Check( PyObject *o );
100 PyTypeObject * _Buffer_Type();
101 bool _Buffer_Check( PyObject *op );
103 PyTypeObject * _Class_Type();
104 bool _Class_Check( PyObject *op );
106 PyTypeObject * _Instance_Type();
107 bool _Instance_Check( PyObject *op );
109 PyTypeObject * _Method_Type();
110 bool _Method_Check( PyObject *op );
112 PyTypeObject * _CObject_Type();
113 bool _CObject_Check( PyObject *op );
115 PyTypeObject * _Complex_Type();
116 bool _Complex_Check( PyObject *op );
118 PyTypeObject * _Dict_Type();
119 bool _Dict_Check( PyObject *op );
121 PyTypeObject * _File_Type();
122 bool _File_Check( PyObject *op );
124 PyTypeObject * _Float_Type();
125 bool _Float_Check( PyObject *op );
127 PyTypeObject * _Frame_Type();
128 bool _Frame_Check( PyObject *op );
130 PyTypeObject * _Function_Type();
131 bool _Function_Check( PyObject *op );
133 PyTypeObject * _Bool_Type();
134 bool _Boolean_Check( PyObject *op );
136 PyTypeObject * _Int_Type();
137 bool _Int_Check( PyObject *op );
139 PyTypeObject * _List_Type();
140 bool _List_Check( PyObject *op );
142 PyTypeObject * _Long_Type();
143 bool _Long_Check( PyObject *op );
145 PyTypeObject * _CFunction_Type();
146 bool _CFunction_Check( PyObject *op );
148 PyTypeObject * _Module_Type();
149 bool _Module_Check( PyObject *op );
151 PyTypeObject * _Type_Type();
152 bool _Type_Check( PyObject *op );
154 PyTypeObject * _Range_Type();
155 bool _Range_Check( PyObject *op );
157 PyTypeObject * _Slice_Type();
158 bool _Slice_Check( PyObject *op );
160 PyTypeObject * _Unicode_Type();
161 bool _Unicode_Check( PyObject *op );
163 PyTypeObject * _Bytes_Type();
164 bool _Bytes_Check( PyObject *op );
166 PyTypeObject * _TraceBack_Type();
167 bool _TraceBack_Check( PyObject *v );
169 PyTypeObject * _Tuple_Type();
170 bool _Tuple_Check( PyObject *op );
172 int &_Py_DebugFlag();
173 int &_Py_InteractiveFlag();
174 int &_Py_OptimizeFlag();
175 int &_Py_NoSiteFlag();
176 int &_Py_TabcheckFlag();
177 int &_Py_VerboseFlag();
178 int &_Py_UnicodeFlag();
180 void _XINCREF( PyObject *op );
181 void _XDECREF( PyObject *op );
183 char *__Py_PackageContext();
186 #endif // __CXX_INDIRECT_PYTHON_INTERFACE__HXX__