From 5f321b415010ec74a978bb4bb495c46dd5af0b09 Mon Sep 17 00:00:00 2001 From: Chris Kerr Date: Mon, 10 Nov 2014 15:40:47 +0000 Subject: DEP: Corrected some type errors that appear when enabling NPY_NO_DEPRECATED_API --- numpy/f2py/src/fortranobject.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'numpy/f2py') diff --git a/numpy/f2py/src/fortranobject.c b/numpy/f2py/src/fortranobject.c index fa3636efe..37b0b0e62 100644 --- a/numpy/f2py/src/fortranobject.c +++ b/numpy/f2py/src/fortranobject.c @@ -710,17 +710,17 @@ PyArrayObject* array_from_pyobj(const int type_num, if (intent & F2PY_INTENT_CACHE) { /* intent(cache) */ - if (PyArray_ISONESEGMENT(obj) - && PyArray_ITEMSIZE((PyArrayObject *)obj)>=elsize) { - if (check_and_fix_dimensions((PyArrayObject *)obj,rank,dims)) { + if (PyArray_ISONESEGMENT(arr) + && PyArray_ITEMSIZE(arr)>=elsize) { + if (check_and_fix_dimensions(arr,rank,dims)) { return NULL; /*XXX: set exception */ } if (intent & F2PY_INTENT_OUT) - Py_INCREF(obj); - return (PyArrayObject *)obj; + Py_INCREF(arr); + return arr; } strcpy(mess, "failed to initialize intent(cache) array"); - if (!PyArray_ISONESEGMENT(obj)) + if (!PyArray_ISONESEGMENT(arr)) strcat(mess, " -- input must be in one segment"); if (PyArray_ITEMSIZE(arr)