numpy  2.0.0
src/private/npy_pycompat.h
Go to the documentation of this file.
00001 #ifndef _NPY_PYCOMPAT_H_
00002 #define _NPY_PYCOMPAT_H_
00003 
00004 #include "numpy/npy_3kcompat.h"
00005 
00006 /*
00007  * Accessing items of ob_base
00008  */
00009 
00010 #if (PY_VERSION_HEX < 0x02060000)
00011 #define Py_TYPE(o)    (((PyObject*)(o))->ob_type)
00012 #define Py_REFCNT(o)  (((PyObject*)(o))->ob_refcnt)
00013 #define Py_SIZE(o)    (((PyVarObject*)(o))->ob_size)
00014 #endif
00015 
00016 /*
00017  * PyIndex_Check
00018  */
00019 #if (PY_VERSION_HEX < 0x02050000)
00020 #undef PyIndex_Check
00021 #define PyIndex_Check(o)     0
00022 #endif
00023 
00024 #endif /* _NPY_COMPAT_H_ */