提交 3c47dd38 authored 作者: Gabe Schwartz's avatar Gabe Schwartz

Don't rely on includes to pull in npy_3kcompat.h.

上级 057f6a5f
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#define _CUDA_NDARRAY_H #define _CUDA_NDARRAY_H
// Defines for Python 2/3 compatibility. // Defines for Python 2/3 compatibility.
#if PY_MAJOR_VERSION == 3 #if PY_MAJOR_VERSION >= 3
// Py3k treats all ints as longs. // Py3k treats all ints as longs.
#define PyInt_Check PyLong_Check #define PyInt_Check PyLong_Check
#define PyInt_CheckExact PyLong_CheckExact #define PyInt_CheckExact PyLong_CheckExact
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#define PyString_FromStringAndSize PyUnicode_FromStringAndSize #define PyString_FromStringAndSize PyUnicode_FromStringAndSize
#define PyString_Size PyUnicode_GET_SIZE #define PyString_Size PyUnicode_GET_SIZE
#include "numpy/npy_3kcompat.h"
#define PyCObject_AsVoidPtr NpyCapsule_AsVoidPtr #define PyCObject_AsVoidPtr NpyCapsule_AsVoidPtr
#define PyCObject_GetDesc NpyCapsule_GetDesc #define PyCObject_GetDesc NpyCapsule_GetDesc
#define PyCObject_Check NpyCapsule_Check #define PyCObject_Check NpyCapsule_Check
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论