summaryrefslogtreecommitdiff
path: root/numpy/f2py/src/fortranobject.c
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2014-12-10 20:22:34 +0100
committerJulian Taylor <jtaylor.debian@googlemail.com>2014-12-10 20:23:11 +0100
commit8df7eddd48584606310790be6d8d0d6b36671297 (patch)
tree28bf805315c11737f4f4f1bc132169df41908184 /numpy/f2py/src/fortranobject.c
parent69265b8601ed72c558d033ecef4d6157b052da05 (diff)
downloadnumpy-8df7eddd48584606310790be6d8d0d6b36671297.tar.gz
MAINT: cast PyArray_ITEMSIZE result to avoid warnings
return type depends on API version used
Diffstat (limited to 'numpy/f2py/src/fortranobject.c')
-rw-r--r--numpy/f2py/src/fortranobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/f2py/src/fortranobject.c b/numpy/f2py/src/fortranobject.c
index fa9792c49..2e182922d 100644
--- a/numpy/f2py/src/fortranobject.c
+++ b/numpy/f2py/src/fortranobject.c
@@ -556,7 +556,7 @@ static void f2py_report_on_array_copy(PyArrayObject* arr) {
const npy_intp arr_size = PyArray_Size((PyObject *)arr);
if (arr_size>F2PY_REPORT_ON_ARRAY_COPY) {
fprintf(stderr,"copied an array: size=%ld, elsize=%"NPY_INTP_FMT"\n",
- arr_size, PyArray_ITEMSIZE(arr));
+ arr_size, (npy_intp)PyArray_ITEMSIZE(arr));
}
}
static void f2py_report_on_array_copy_fromany(void) {
@@ -726,7 +726,7 @@ PyArrayObject* array_from_pyobj(const int type_num,
sprintf(mess+strlen(mess),
" -- expected at least elsize=%d but got %" NPY_INTP_FMT,
elsize,
- PyArray_ITEMSIZE(arr)
+ (npy_intp)PyArray_ITEMSIZE(arr)
);
PyErr_SetString(PyExc_ValueError,mess);
return NULL;
@@ -768,7 +768,7 @@ PyArrayObject* array_from_pyobj(const int type_num,
sprintf(mess+strlen(mess),
" -- expected elsize=%d but got %" NPY_INTP_FMT,
elsize,
- PyArray_ITEMSIZE(arr)
+ (npy_intp)PyArray_ITEMSIZE(arr)
);
if (!(ARRAY_ISCOMPATIBLE(arr,type_num)))
sprintf(mess+strlen(mess)," -- input '%c' not compatible to '%c'",