diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2020-01-05 22:54:04 +0000 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2020-01-06 00:34:02 +0000 |
commit | c2501e4994efd9f561e67cc69b5b001fe77ce346 (patch) | |
tree | 2311b1baed359930bd0f9feaf17421b9f5798142 /numpy/f2py | |
parent | b5739e8a81c71174b75cf4c8f9de4eccaa7eca2c (diff) | |
download | numpy-c2501e4994efd9f561e67cc69b5b001fe77ce346.tar.gz |
MAINT: Improve const-correctness of shapes and strides
Marking these arguments as const makes it easier to reason about these functions, and prevent accidental mutation.
The C99 standard (6.2.5/26 "Types") guarantees that ABI compatibility is preserved here.
Diffstat (limited to 'numpy/f2py')
-rw-r--r-- | numpy/f2py/src/fortranobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/f2py/src/fortranobject.c b/numpy/f2py/src/fortranobject.c index 973741ca7..456e64893 100644 --- a/numpy/f2py/src/fortranobject.c +++ b/numpy/f2py/src/fortranobject.c @@ -590,7 +590,7 @@ count_negative_dimensions(const int rank, } #ifdef DEBUG_COPY_ND_ARRAY -void dump_dims(int rank, npy_intp* dims) { +void dump_dims(int rank, npy_intp const* dims) { int i; printf("["); for(i=0;i<rank;++i) { |