Author: Matti Picus <[email protected]>
Branch:
Changeset: r67349:a3f27dccf08a
Date: 2013-10-13 22:16 +0300
http://bitbucket.org/pypy/pypy/changeset/a3f27dccf08a/
Log: numpy compatible capi fixes
diff --git a/pypy/module/cpyext/include/numpy/arrayobject.h
b/pypy/module/cpyext/include/numpy/arrayobject.h
--- a/pypy/module/cpyext/include/numpy/arrayobject.h
+++ b/pypy/module/cpyext/include/numpy/arrayobject.h
@@ -1,5 +1,8 @@
-/* NDArray object interface - S. H. Muller, 2013/07/26 */
+/* NDArray object interface - S. H. Muller, 2013/07/26
+ * It will be copied by numpy/core/setup.py by install_data to
+ * site-packages/numpy/core/includes/numpy
+*/
#ifndef Py_NDARRAYOBJECT_H
#define Py_NDARRAYOBJECT_H
@@ -9,7 +12,6 @@
#include "old_defines.h"
-#define NPY_INLINE
#define NPY_UNUSED(x) x
#define PyArray_MAX(a,b) (((a)>(b))?(a):(b))
#define PyArray_MIN(a,b) (((a)<(b))?(a):(b))
@@ -22,11 +24,12 @@
typedef unsigned char npy_bool;
typedef unsigned char npy_uint8;
+typedef unsigned short npy_uint16;
+typedef signed short npy_int16;
+typedef signed char npy_int8;
typedef int npy_int;
-#ifndef npy_intp
-#define npy_intp long
-#endif
+typedef long npy_intp;
#ifndef NPY_INTP_FMT
#define NPY_INTP_FMT "ld"
#endif
diff --git a/pypy/module/cpyext/include/numpy/npy_3kcompat.h
b/pypy/module/cpyext/include/numpy/npy_3kcompat.h
--- a/pypy/module/cpyext/include/numpy/npy_3kcompat.h
+++ b/pypy/module/cpyext/include/numpy/npy_3kcompat.h
@@ -4,8 +4,8 @@
*
* PyPy uses it as a convenient place to add compatability declarations
* It will be copied by numpy/core/setup.py by install_data to
- * site-packages/numpy/core/includes/numpy
- */
+ * site-packages/numpy/core/includes/numpy
+*/
#ifndef _NPY_3KCOMPAT_H_
#define _NPY_3KCOMPAT_H_
@@ -38,4 +38,4 @@
Py_DECREF(ret);
return 0;
}
-
+#endif
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit