提交 b38f0940 authored 作者: lamblin's avatar lamblin

Merge pull request #1426 from HapeMask/py3k-fixes

Added #defines for Py_TYPE/REFCNT for python2.4.
...@@ -23,6 +23,13 @@ ...@@ -23,6 +23,13 @@
#else #else
// Python 2 expects a PySliceObject* as the first argument to PySlice_GetIndicesEx(). // Python 2 expects a PySliceObject* as the first argument to PySlice_GetIndicesEx().
#define SLICE_CAST(x) ((PySliceObject*)(x)) #define SLICE_CAST(x) ((PySliceObject*)(x))
#endif // end #if PY_MAJOR_VERSION >= 3
#ifndef Py_TYPE
# define Py_TYPE(o) ((o)->ob_type)
#endif
#ifndef Py_REFCNT
# define Py_REFCNT(o) ((o)->ob_refcnt)
#endif #endif
#include <numpy/arrayobject.h> #include <numpy/arrayobject.h>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论