summaryrefslogtreecommitdiff
path: root/numpy/f2py/src/fortranobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/f2py/src/fortranobject.c')
-rw-r--r--numpy/f2py/src/fortranobject.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/f2py/src/fortranobject.c b/numpy/f2py/src/fortranobject.c
index 4e89cdff1..0b32137ef 100644
--- a/numpy/f2py/src/fortranobject.c
+++ b/numpy/f2py/src/fortranobject.c
@@ -142,7 +142,7 @@ PyFortranObject_New(FortranDataDef *defs, f2py_void_func init)
else if ((fp->defs[i].data) !=
NULL) { /* Is Fortran variable or array (not allocatable) */
if (fp->defs[i].type == NPY_STRING) {
- int n = fp->defs[i].rank - 1;
+ npy_intp n = fp->defs[i].rank - 1;
v = PyArray_New(&PyArray_Type, n, fp->defs[i].dims.d,
NPY_STRING, NULL, fp->defs[i].data,
fp->defs[i].dims.d[n], NPY_ARRAY_FARRAY, NULL);
@@ -195,7 +195,8 @@ static Py_ssize_t
format_def(char *buf, Py_ssize_t size, FortranDataDef def)
{
char *p = buf;
- int i, n;
+ int i;
+ npy_intp n;
n = PyOS_snprintf(p, size, "array(%" NPY_INTP_FMT, def.dims.d[0]);
if (n < 0 || n >= size) {