9#pragma warning ( disable : 4275 )
11#pragma warning ( disable : 4251 )
13#pragma warning ( disable : 4800 )
27#ifdef _FILE_OFFSET_BITS
28#undef _FILE_OFFSET_BITS
42#if PY_VERSION_HEX < 0x03030000
43 typedef PyDictEntry* (*dict_lookup_func) ( PyDictObject*,
PyObject*,
Long_t );
45 struct PyDictKeyEntry;
46 typedef PyDictKeyEntry* (*dict_lookup_func) ( PyDictObject*,
PyObject*, Py_hash_t,
PyObject*** );
47#define PyDictEntry PyDictKeyEntry
51#if PY_VERSION_HEX < 0x03030000
53#if PY_VERSION_HEX < 0x03000000
54#define PyROOT_PyUnicode_GetSize PyString_Size
56#define PyROOT_PyUnicode_GetSize PyUnicode_GetSize
59#define PyROOT_PyUnicode_GetSize PyUnicode_GetLength
63#if PY_VERSION_HEX < 0x03000000
64#define PyBytes_Check PyString_Check
65#define PyBytes_CheckExact PyString_CheckExact
66#define PyBytes_AS_STRING PyString_AS_STRING
67#define PyBytes_AsString PyString_AsString
68#define PyBytes_GET_SIZE PyString_GET_SIZE
69#define PyBytes_Size PyString_Size
70#define PyBytes_FromFormat PyString_FromFormat
71#define PyBytes_FromString PyString_FromString
72#define PyBytes_FromStringAndSize PyString_FromStringAndSize
74#define PyBytes_Type PyString_Type
76#define PyROOT_PyUnicode_Check PyString_Check
77#define PyROOT_PyUnicode_CheckExact PyString_CheckExact
78#define PyROOT_PyUnicode_AsString PyString_AS_STRING
79#define PyROOT_PyUnicode_AsStringChecked PyString_AsString
80#define PyROOT_PyUnicode_GET_SIZE PyString_GET_SIZE
81#define PyROOT_PyUnicode_FromFormat PyString_FromFormat
82#define PyROOT_PyUnicode_FromString PyString_FromString
83#define PyROOT_PyUnicode_InternFromString PyString_InternFromString
84#define PyROOT_PyUnicode_Append PyString_Concat
85#define PyROOT_PyUnicode_AppendAndDel PyString_ConcatAndDel
86#define PyROOT_PyUnicode_FromStringAndSize PyString_FromStringAndSize
88#define PyROOT_PyUnicode_Type PyString_Type
92 return PyCObject_FromVoidPtr( cobj, destr );
94#define PyROOT_PyCapsule_CheckExact PyCObject_Check
97 return (
void*)PyCObject_AsVoidPtr( capsule );
100#define PYROOT__long__ "__long__"
101#define PYROOT__idiv__ "__idiv__"
102#define PYROOT__div__ "__div__"
103#define PYROOT__next__ "next"
108#if PY_VERSION_HEX >= 0x03000000
109#define PyROOT_PyUnicode_Check PyUnicode_Check
110#define PyROOT_PyUnicode_CheckExact PyUnicode_CheckExact
111#define PyROOT_PyUnicode_AsString _PyUnicode_AsString
112#define PyROOT_PyUnicode_AsStringChecked _PyUnicode_AsString
113#define PyROOT_PyUnicode_GET_SIZE PyUnicode_GET_SIZE
114#define PyROOT_PyUnicode_FromFormat PyUnicode_FromFormat
115#define PyROOT_PyUnicode_FromString PyUnicode_FromString
116#define PyROOT_PyUnicode_InternFromString PyUnicode_InternFromString
117#define PyROOT_PyUnicode_Append PyUnicode_Append
118#define PyROOT_PyUnicode_AppendAndDel PyUnicode_AppendAndDel
119#define PyROOT_PyUnicode_FromStringAndSize PyUnicode_FromStringAndSize
121#define PyROOT_PyUnicode_Type PyUnicode_Type
123#define PyIntObject PyLongObject
124#define PyInt_Check PyLong_Check
125#define PyInt_AsLong PyLong_AsLong
126#define PyInt_AS_LONG PyLong_AsLong
127#define PyInt_AsSsize_t PyLong_AsSsize_t
128#define PyInt_CheckExact PyLong_CheckExact
129#define PyInt_FromLong PyLong_FromLong
130#define PyInt_FromSsize_t PyLong_FromSsize_t
132#define PyInt_Type PyLong_Type
134#define PyROOT_PyCapsule_New PyCapsule_New
135#define PyROOT_PyCapsule_CheckExact PyCapsule_CheckExact
136#define PyROOT_PyCapsule_GetPointer PyCapsule_GetPointer
138#define PYROOT__long__ "__int__"
139#define PYROOT__idiv__ "__itruediv__"
140#define PYROOT__div__ "__truediv__"
141#define PYROOT__next__ "__next__"
143#define Py_TPFLAGS_HAVE_RICHCOMPARE 0
144#define Py_TPFLAGS_CHECKTYPES 0
146#define PyClass_Check PyType_Check
148#define PyBuffer_Type PyMemoryView_Type
151#if PY_VERSION_HEX >= 0x03020000
152#define PyROOT_PySliceCast PyObject*
154#define PyROOT_PySliceCast PySliceObject*
158#if PY_VERSION_HEX < 0x02060000
159#define PyVarObject_HEAD_INIT(type, size) \
160 PyObject_HEAD_INIT(type) size,
161#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
165#if PY_VERSION_HEX < 0x02050000
167#define PyInt_AsSsize_t PyInt_AsLong
168#define PyInt_FromSsize_t PyInt_FromLong
169# define PY_SSIZE_T_FORMAT "%d"
170# if !defined(PY_SSIZE_T_MIN)
171# define PY_SSIZE_T_MAX INT_MAX
172# define PY_SSIZE_T_MIN INT_MIN
174#define ssizeobjargproc intobjargproc
175#define lenfunc inquiry
176#define ssizeargfunc intargfunc
178#define PyIndex_Check(obj) \
179 (PyInt_Check(obj) || PyLong_Check(obj))
187# if SIZEOF_SIZE_T == SIZEOF_INT
188# if defined(MAC_OS_X_VERSION_10_4)
189# define PY_SSIZE_T_FORMAT "%ld"
191# define PY_SSIZE_T_FORMAT "%d"
193# elif SIZEOF_SIZE_T == SIZEOF_LONG
194# define PY_SSIZE_T_FORMAT "%ld"
197# define PY_SSIZE_T_FORMAT "%zd"
201#if PY_VERSION_HEX < 0x02020000
202#define PyBool_FromLong PyInt_FromLong
205#if PY_VERSION_HEX < 0x03000000
209#define Py_False ( (PyObject*)(void*)&_Py_ZeroStruct )
214#define Py_True ( (PyObject*)(void*)&_Py_TrueStruct )
Py_ssize_t PyNumber_AsSsize_t(PyObject *obj, PyObject *)
static void * PyROOT_PyCapsule_GetPointer(PyObject *capsule, const char *)
static PyObject * PyROOT_PyCapsule_New(void *cobj, const char *, void(*destr)(void *))