diff options
author | Thouis (Ray) Jones <thouis@gmail.com> | 2012-06-15 11:36:05 +0200 |
---|---|---|
committer | Thouis (Ray) Jones <thouis@gmail.com> | 2012-06-15 11:36:05 +0200 |
commit | a83e212d40ea4ccb49ab75a60fd5d7afa9307c2a (patch) | |
tree | 018625e0656bb10a514accae74482cdff812ec0c | |
parent | 330468f751410f56eeacb29cb26320faeaec5135 (diff) | |
download | numpy-a83e212d40ea4ccb49ab75a60fd5d7afa9307c2a.tar.gz |
Work around Python 2.4's Py_ssize_t not being the same as npyint_p
-rw-r--r-- | numpy/core/src/multiarray/mapping.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/mapping.c b/numpy/core/src/multiarray/mapping.c index f133adf5d..60fa3b216 100644 --- a/numpy/core/src/multiarray/mapping.c +++ b/numpy/core/src/multiarray/mapping.c @@ -109,8 +109,11 @@ _array_ass_item(PyArrayObject *self, Py_ssize_t i, PyObject *v) /* contains optimization for 1-d arrays */ NPY_NO_EXPORT PyObject * -array_item_nice(PyArrayObject *self, Py_ssize_t i) +array_item_nice(PyArrayObject *self, Py_ssize_t _i) { + /* Workaround Python 2.4: Py_ssize_t not the same as npyint_p */ + npy_intp i = _i; + if (PyArray_NDIM(self) == 1) { char *item; npy_intp dim0; |