@@ -42,7 +42,9 @@ namespace Py
4242bool _Buffer_Check ( PyObject *op ) { return (op)->ob_type == _Buffer_Type (); }
4343bool _CFunction_Check ( PyObject *op ) { return (op)->ob_type == _CFunction_Type (); }
4444bool _Class_Check ( PyObject *op ) { return (op)->ob_type == _Class_Type (); }
45+ #if PY_VERSION_HEX < 0x02070000
4546bool _CObject_Check ( PyObject *op ) { return (op)->ob_type == _CObject_Type (); }
47+ #endif
4648bool _Complex_Check ( PyObject *op ) { return (op)->ob_type == _Complex_Type (); }
4749bool _Dict_Check ( PyObject *op ) { return (op)->ob_type == _Dict_Type (); }
4850bool _File_Check ( PyObject *op ) { return (op)->ob_type == _File_Type (); }
@@ -123,7 +125,9 @@ static PyObject *ptr__PyTrue = NULL;
123125static PyTypeObject *ptr__Buffer_Type = NULL ;
124126static PyTypeObject *ptr__CFunction_Type = NULL ;
125127static PyTypeObject *ptr__Class_Type = NULL ;
128+ #if PY_VERSION_HEX < 0x02070000
126129static PyTypeObject *ptr__CObject_Type = NULL ;
130+ #endif
127131static PyTypeObject *ptr__Complex_Type = NULL ;
128132static PyTypeObject *ptr__Dict_Type = NULL ;
129133static PyTypeObject *ptr__File_Type = NULL ;
@@ -310,7 +314,9 @@ bool InitialisePythonIndirectInterface()
310314 ptr__Buffer_Type = GetPyTypeObject_As_PyTypeObjectPointer ( " PyBuffer_Type" );
311315 ptr__CFunction_Type = GetPyTypeObject_As_PyTypeObjectPointer ( " PyCFunction_Type" );
312316 ptr__Class_Type = GetPyTypeObject_As_PyTypeObjectPointer ( " PyClass_Type" );
317+ #if PY_VERSION_HEX < 0x02070000
313318 ptr__CObject_Type = GetPyTypeObject_As_PyTypeObjectPointer ( " PyCObject_Type" );
319+ #endif
314320 ptr__Complex_Type = GetPyTypeObject_As_PyTypeObjectPointer ( " PyComplex_Type" );
315321 ptr__Dict_Type = GetPyTypeObject_As_PyTypeObjectPointer ( " PyDict_Type" );
316322 ptr__File_Type = GetPyTypeObject_As_PyTypeObjectPointer ( " PyFile_Type" );
@@ -398,7 +404,9 @@ PyObject * _True() { return ptr__PyTrue; }
398404PyTypeObject * _Buffer_Type () { return ptr__Buffer_Type; }
399405PyTypeObject * _CFunction_Type (){ return ptr__CFunction_Type; }
400406PyTypeObject * _Class_Type () { return ptr__Class_Type; }
407+ #if PY_VERSION_HEX < 0x02070000
401408PyTypeObject * _CObject_Type () { return ptr__CObject_Type; }
409+ #endif
402410PyTypeObject * _Complex_Type () { return ptr__Complex_Type; }
403411PyTypeObject * _Dict_Type () { return ptr__Dict_Type; }
404412PyTypeObject * _File_Type () { return ptr__File_Type; }
@@ -542,7 +550,9 @@ PyObject * _True() { return Py_True; }
542550PyTypeObject * _Buffer_Type () { return &PyBuffer_Type; }
543551PyTypeObject * _CFunction_Type () { return &PyCFunction_Type; }
544552PyTypeObject * _Class_Type () { return &PyClass_Type; }
553+ #if PY_VERSION_HEX < 0x02070000
545554PyTypeObject * _CObject_Type () { return &PyCObject_Type; }
555+ #endif
546556PyTypeObject * _Complex_Type () { return &PyComplex_Type; }
547557PyTypeObject * _Dict_Type () { return &PyDict_Type; }
548558PyTypeObject * _File_Type () { return &PyFile_Type; }
0 commit comments