summaryrefslogtreecommitdiff
path: root/numpy/f2py/src/fortranobject.c
diff options
context:
space:
mode:
authorChris Kerr <debdepba@dasganma.tk>2014-11-10 15:40:47 +0000
committerChris Kerr <debdepba@dasganma.tk>2014-11-10 16:02:35 +0000
commit5f321b415010ec74a978bb4bb495c46dd5af0b09 (patch)
tree4e1c7930d8ee9adeb1e9349d8bc678a81e16ad7d /numpy/f2py/src/fortranobject.c
parent347c6142d5baa5ba3ea55299ab96fe114ab94c6c (diff)
downloadnumpy-5f321b415010ec74a978bb4bb495c46dd5af0b09.tar.gz
DEP: Corrected some type errors that appear when enabling NPY_NO_DEPRECATED_API
Diffstat (limited to 'numpy/f2py/src/fortranobject.c')
-rw-r--r--numpy/f2py/src/fortranobject.c14
1 files changed, 7 insertions, 7 deletions
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)<elsize)
sprintf(mess+strlen(mess)," -- expected at least elsize=%d but got %d",
@@ -818,7 +818,7 @@ PyArrayObject* array_from_pyobj(const int type_num,
arr = (PyArrayObject *) \
PyArray_FromAny(obj,PyArray_DescrFromType(type_num), 0,0,
((intent & F2PY_INTENT_C)?NPY_ARRAY_CARRAY:NPY_ARRAY_FARRAY) \
- | NPY_FORCECAST, NULL);
+ | NPY_ARRAY_FORCECAST, NULL);
if (arr==NULL)
return NULL;
if (check_and_fix_dimensions(arr,rank,dims))