Author: Antonio Cuni <[email protected]>
Branch: 
Changeset: r89673:cccff8a7d738
Date: 2017-01-19 15:41 +0000
http://bitbucket.org/pypy/pypy/changeset/cccff8a7d738/

Log:    fix commit a0105e0d00db, which was just wrong. In the upstream
        numpy, NUMPY_IMPORT_ARRAY_RETVAL is returned only in case of error,
        which never happens on pypy. As it was written, import_array()
        caused the immediate return of the *caller*

diff --git a/pypy/module/cpyext/include/_numpypy/numpy/__multiarray_api.h 
b/pypy/module/cpyext/include/_numpypy/numpy/__multiarray_api.h
--- a/pypy/module/cpyext/include/_numpypy/numpy/__multiarray_api.h
+++ b/pypy/module/cpyext/include/_numpypy/numpy/__multiarray_api.h
@@ -11,6 +11,7 @@
 #define NUMPY_IMPORT_ARRAY_RETVAL
 #endif
 
-#define import_array() {return NUMPY_IMPORT_ARRAY_RETVAL;}
+/* on pypy import_array never fails, so it's just an empty macro */
+#define import_array()
 
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to