@@ -111,13 +111,13 @@ check_and_adjust_index(npy_intp *index, npy_intp max_item, int axis,
111
111
/* Try to be as clear as possible about what went wrong. */
112
112
if (axis >= 0 ) {
113
113
PyErr_Format (PyExc_IndexError ,
114
- "index %" NPY_INTP_FMT " is out of bounds "
115
- "for axis %d with size %" NPY_INTP_FMT ,
114
+ "index %" NPY_INTP_FMT " is out of bounds "
115
+ "for axis %d with size %" NPY_INTP_FMT ,
116
116
* index , axis , max_item );
117
117
} else {
118
118
PyErr_Format (PyExc_IndexError ,
119
- "index %" NPY_INTP_FMT " is out of bounds "
120
- "for size %" NPY_INTP_FMT , * index , max_item );
119
+ "index %" NPY_INTP_FMT " is out of bounds "
120
+ "for size %" NPY_INTP_FMT , * index , max_item );
121
121
}
122
122
return -1 ;
123
123
}
@@ -172,13 +172,13 @@ check_and_adjust_axis(int *axis, int ndim)
172
172
*/
173
173
#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
174
174
|| (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9 ) \
175
- && !defined __clang__ ) \
175
+ && !defined __clang__ ) \
176
176
|| (defined __clang__ && __clang_major__ < 8 ))
177
- # define NPY_ALIGNOF (type ) offsetof(struct {char c; type v;}, v )
177
+ #define NPY_ALIGNOF (type ) __alignof__( type)
178
178
#else
179
- # define NPY_ALIGNOF (type ) _Alignof(type)
179
+ #define NPY_ALIGNOF (type ) _Alignof(type)
180
180
#endif
181
- #define NPY_ALIGNOF_UINT (type ) npy_uint_alignment(sizeof( type) )
181
+ #define NPY_ALIGNOF_UINT (type ) NPY_ALIGNOF( type)
182
182
/*
183
183
* Disable harmless compiler warning "4116: unnamed type definition in
184
184
* parentheses" which is caused by the _ALIGN macro.
0 commit comments