@@ -42,7 +42,9 @@ namespace Py
42
42
bool _Buffer_Check ( PyObject *op ) { return (op)->ob_type == _Buffer_Type (); }
43
43
bool _CFunction_Check ( PyObject *op ) { return (op)->ob_type == _CFunction_Type (); }
44
44
bool _Class_Check ( PyObject *op ) { return (op)->ob_type == _Class_Type (); }
45
+ #if PY_VERSION_HEX < 0x02070000
45
46
bool _CObject_Check ( PyObject *op ) { return (op)->ob_type == _CObject_Type (); }
47
+ #endif
46
48
bool _Complex_Check ( PyObject *op ) { return (op)->ob_type == _Complex_Type (); }
47
49
bool _Dict_Check ( PyObject *op ) { return (op)->ob_type == _Dict_Type (); }
48
50
bool _File_Check ( PyObject *op ) { return (op)->ob_type == _File_Type (); }
@@ -123,7 +125,9 @@ static PyObject *ptr__PyTrue = NULL;
123
125
static PyTypeObject *ptr__Buffer_Type = NULL ;
124
126
static PyTypeObject *ptr__CFunction_Type = NULL ;
125
127
static PyTypeObject *ptr__Class_Type = NULL ;
128
+ #if PY_VERSION_HEX < 0x02070000
126
129
static PyTypeObject *ptr__CObject_Type = NULL ;
130
+ #endif
127
131
static PyTypeObject *ptr__Complex_Type = NULL ;
128
132
static PyTypeObject *ptr__Dict_Type = NULL ;
129
133
static PyTypeObject *ptr__File_Type = NULL ;
@@ -310,7 +314,9 @@ bool InitialisePythonIndirectInterface()
310
314
ptr__Buffer_Type = GetPyTypeObject_As_PyTypeObjectPointer ( " PyBuffer_Type" );
311
315
ptr__CFunction_Type = GetPyTypeObject_As_PyTypeObjectPointer ( " PyCFunction_Type" );
312
316
ptr__Class_Type = GetPyTypeObject_As_PyTypeObjectPointer ( " PyClass_Type" );
317
+ #if PY_VERSION_HEX < 0x02070000
313
318
ptr__CObject_Type = GetPyTypeObject_As_PyTypeObjectPointer ( " PyCObject_Type" );
319
+ #endif
314
320
ptr__Complex_Type = GetPyTypeObject_As_PyTypeObjectPointer ( " PyComplex_Type" );
315
321
ptr__Dict_Type = GetPyTypeObject_As_PyTypeObjectPointer ( " PyDict_Type" );
316
322
ptr__File_Type = GetPyTypeObject_As_PyTypeObjectPointer ( " PyFile_Type" );
@@ -398,7 +404,9 @@ PyObject * _True() { return ptr__PyTrue; }
398
404
PyTypeObject * _Buffer_Type () { return ptr__Buffer_Type; }
399
405
PyTypeObject * _CFunction_Type (){ return ptr__CFunction_Type; }
400
406
PyTypeObject * _Class_Type () { return ptr__Class_Type; }
407
+ #if PY_VERSION_HEX < 0x02070000
401
408
PyTypeObject * _CObject_Type () { return ptr__CObject_Type; }
409
+ #endif
402
410
PyTypeObject * _Complex_Type () { return ptr__Complex_Type; }
403
411
PyTypeObject * _Dict_Type () { return ptr__Dict_Type; }
404
412
PyTypeObject * _File_Type () { return ptr__File_Type; }
@@ -542,7 +550,9 @@ PyObject * _True() { return Py_True; }
542
550
PyTypeObject * _Buffer_Type () { return &PyBuffer_Type; }
543
551
PyTypeObject * _CFunction_Type () { return &PyCFunction_Type; }
544
552
PyTypeObject * _Class_Type () { return &PyClass_Type; }
553
+ #if PY_VERSION_HEX < 0x02070000
545
554
PyTypeObject * _CObject_Type () { return &PyCObject_Type; }
555
+ #endif
546
556
PyTypeObject * _Complex_Type () { return &PyComplex_Type; }
547
557
PyTypeObject * _Dict_Type () { return &PyDict_Type; }
548
558
PyTypeObject * _File_Type () { return &PyFile_Type; }
0 commit comments