summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2013-01-04 23:13:30 +0100
committerSebastian Berg <sebastian@sipsolutions.net>2013-01-06 00:26:31 +0100
commit1981d0640d6a598a043379be43d19dcf590823f1 (patch)
tree06acbd7ba075f05ffac29aea46468f9caebc8b01 /numpy
parent0aaf70bd8b9cf149dbde17dc48dff228df180324 (diff)
downloadnumpy-1981d0640d6a598a043379be43d19dcf590823f1.tar.gz
MAINT: Minor cleanup
Adding const and removing old comment.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/multiarray/common.c6
-rw-r--r--numpy/core/src/multiarray/common.h6
-rw-r--r--numpy/core/src/multiarray/getset.c1
3 files changed, 6 insertions, 7 deletions
diff --git a/numpy/core/src/multiarray/common.c b/numpy/core/src/multiarray/common.c
index 70e45335c..64ca352a5 100644
--- a/numpy/core/src/multiarray/common.c
+++ b/numpy/core/src/multiarray/common.c
@@ -677,9 +677,9 @@ _IsWriteable(PyArrayObject *ap)
NPY_NO_EXPORT void
-offset_bounds_from_strides(int itemsize, int nd, npy_intp *dims,
- npy_intp *strides, npy_intp *lower_offset,
- npy_intp *upper_offset) {
+offset_bounds_from_strides(const int itemsize, const int nd,
+ const npy_intp *dims, const npy_intp *strides,
+ npy_intp *lower_offset, npy_intp *upper_offset) {
npy_intp max_axis_offset;
npy_intp lower = 0;
npy_intp upper = 0;
diff --git a/numpy/core/src/multiarray/common.h b/numpy/core/src/multiarray/common.h
index 1214cf534..a474cf820 100644
--- a/numpy/core/src/multiarray/common.h
+++ b/numpy/core/src/multiarray/common.h
@@ -58,9 +58,9 @@ NPY_NO_EXPORT npy_bool
_IsWriteable(PyArrayObject *ap);
NPY_NO_EXPORT void
-offset_bounds_from_strides(int itemsize, int nd, npy_intp *dims,
- npy_intp *strides, npy_intp *min_offset,
- npy_intp *max_offset);
+offset_bounds_from_strides(const int itemsize, const int nd,
+ const npy_intp *dims, const npy_intp *strides,
+ npy_intp *lower_offset, npy_intp *upper_offset);
#include "ucsnarrow.h"
diff --git a/numpy/core/src/multiarray/getset.c b/numpy/core/src/multiarray/getset.c
index dac11559b..6af9d4038 100644
--- a/numpy/core/src/multiarray/getset.c
+++ b/numpy/core/src/multiarray/getset.c
@@ -138,7 +138,6 @@ array_strides_set(PyArrayObject *self, PyObject *obj)
}
else {
PyErr_Clear();
- /* Find the true extent of the base array, similar to CheckStrides */
offset_bounds_from_strides(PyArray_ITEMSIZE(new), PyArray_NDIM(new),
PyArray_DIMS(new), PyArray_STRIDES(new),
&lower_offset, &upper_offset);