From c2501e4994efd9f561e67cc69b5b001fe77ce346 Mon Sep 17 00:00:00 2001 From: Eric Wieser Date: Sun, 5 Jan 2020 22:54:04 +0000 Subject: 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. --- numpy/f2py/src/fortranobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/f2py/src') 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