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 43
43
* and `PyArray_MultiIter_DIMS`.
44
44
*/
45
45
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
47
49
48
- #if !WORKAROUND_NEEDED
50
+ #if !defined( WORKAROUND_NEEDED )
49
51
typedef struct {
50
52
PyObject_HEAD
51
53
int numiter ;
@@ -58,23 +60,23 @@ typedef struct {
58
60
#endif
59
61
60
62
npy_intp workaround_PyArray_MultiIter_SIZE (PyArrayMultiIterObject * multi ) {
61
- #if WORKAROUND_NEEDED
63
+ #if defined( WORKAROUND_NEEDED )
62
64
return PyArray_MultiIter_SIZE (multi );
63
65
#else
64
66
return ((multi_iter_proxy_st * )(multi ))-> size ;
65
67
#endif
66
68
}
67
69
68
70
int workaround_PyArray_MultiIter_NDIM (PyArrayMultiIterObject * multi ) {
69
- #if WORKAROUND_NEEDED
71
+ #if defined( WORKAROUND_NEEDED )
70
72
return PyArray_MultiIter_NDIM (multi );
71
73
#else
72
74
return ((multi_iter_proxy_st * )(multi ))-> nd ;
73
75
#endif
74
76
}
75
77
76
78
npy_intp * workaround_PyArray_MultiIter_DIMS (PyArrayMultiIterObject * multi ) {
77
- #if WORKAROUND_NEEDED
79
+ #if defined( WORKAROUND_NEEDED )
78
80
return PyArray_MultiIter_DIMS (multi );
79
81
#else
80
82
return (((multi_iter_proxy_st * )(multi ))-> dimensions );
You can’t perform that action at this time.
0 commit comments