File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 4343 * and `PyArray_MultiIter_DIMS`.
4444 */
4545
46- #define WORKAROUND_NEEDED (defined(NPY_2_0_API_VERSION) && (NPY_API_VERSION >= NPY_2_0_API_VERSION))
46+ #if (defined(NPY_2_0_API_VERSION ) && (NPY_API_VERSION >= NPY_2_0_API_VERSION ))
47+ #define WORKAROUND_NEEDED
48+ #endif
4749
48- #if !WORKAROUND_NEEDED
50+ #if !defined( WORKAROUND_NEEDED )
4951typedef struct {
5052 PyObject_HEAD
5153 int numiter ;
@@ -58,23 +60,23 @@ typedef struct {
5860#endif
5961
6062npy_intp workaround_PyArray_MultiIter_SIZE (PyArrayMultiIterObject * multi ) {
61- #if WORKAROUND_NEEDED
63+ #if defined( WORKAROUND_NEEDED )
6264 return PyArray_MultiIter_SIZE (multi );
6365#else
6466 return ((multi_iter_proxy_st * )(multi ))-> size ;
6567#endif
6668}
6769
6870int workaround_PyArray_MultiIter_NDIM (PyArrayMultiIterObject * multi ) {
69- #if WORKAROUND_NEEDED
71+ #if defined( WORKAROUND_NEEDED )
7072 return PyArray_MultiIter_NDIM (multi );
7173#else
7274 return ((multi_iter_proxy_st * )(multi ))-> nd ;
7375#endif
7476}
7577
7678npy_intp * workaround_PyArray_MultiIter_DIMS (PyArrayMultiIterObject * multi ) {
77- #if WORKAROUND_NEEDED
79+ #if defined( WORKAROUND_NEEDED )
7880 return PyArray_MultiIter_DIMS (multi );
7981#else
8082 return (((multi_iter_proxy_st * )(multi ))-> dimensions );
You can’t perform that action at this time.
0 commit comments