diff options
author | wfspotz@sandia.gov <wfspotz@sandia.gov@localhost> | 2007-09-13 17:53:08 +0000 |
---|---|---|
committer | wfspotz@sandia.gov <wfspotz@sandia.gov@localhost> | 2007-09-13 17:53:08 +0000 |
commit | 34946e3172bbabc610cbc53132ea8e45a18d70d1 (patch) | |
tree | cb680472d1c212085aeaf29ce4e6e1bff055cf29 /numpy/doc/swig | |
parent | 8497bf45e1ce1d9e9310ea80a288438a446d41c2 (diff) | |
download | numpy-34946e3172bbabc610cbc53132ea8e45a18d70d1.tar.gz |
Changed freearg typemaps to use brackets to avoid 'ambiguous else' warning under C
Diffstat (limited to 'numpy/doc/swig')
-rw-r--r-- | numpy/doc/swig/numpy.i | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/numpy/doc/swig/numpy.i b/numpy/doc/swig/numpy.i index 92b80e298..18749e54b 100644 --- a/numpy/doc/swig/numpy.i +++ b/numpy/doc/swig/numpy.i @@ -459,7 +459,8 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) { %typemap(freearg) (DATA_TYPE IN_ARRAY1[ANY]) { - if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum); + if (is_new_object$argnum && array$argnum) + { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) @@ -482,7 +483,8 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) { %typemap(freearg) (DATA_TYPE* IN_ARRAY1, DIM_TYPE DIM1) { - if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum); + if (is_new_object$argnum && array$argnum) + { Py_DECREF(array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) @@ -505,7 +507,8 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) { %typemap(freearg) (DIM_TYPE DIM1, DATA_TYPE* IN_ARRAY1) { - if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum); + if (is_new_object$argnum && array$argnum) + { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE IN_ARRAY2[ANY][ANY]) @@ -527,7 +530,8 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) { %typemap(freearg) (DATA_TYPE IN_ARRAY2[ANY][ANY]) { - if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum); + if (is_new_object$argnum && array$argnum) + { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) @@ -551,7 +555,8 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) { %typemap(freearg) (DATA_TYPE* IN_ARRAY2, DIM_TYPE DIM1, DIM_TYPE DIM2) { - if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum); + if (is_new_object$argnum && array$argnum) + { Py_DECREF(array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) @@ -575,7 +580,8 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) { %typemap(freearg) (DIM_TYPE DIM1, DIM_TYPE DIM2, DATA_TYPE* IN_ARRAY2) { - if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum); + if (is_new_object$argnum && array$argnum) + { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) @@ -597,7 +603,8 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) { %typemap(freearg) (DATA_TYPE IN_ARRAY3[ANY][ANY][ANY]) { - if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum); + if (is_new_object$argnum && array$argnum) + { Py_DECREF(array$argnum); } } /* Typemap suite for (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, @@ -623,7 +630,8 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) { %typemap(freearg) (DATA_TYPE* IN_ARRAY3, DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3) { - if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum); + if (is_new_object$argnum && array$argnum) + { Py_DECREF(array$argnum); } } /* Typemap suite for (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, @@ -649,7 +657,8 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) { %typemap(freearg) (DIM_TYPE DIM1, DIM_TYPE DIM2, DIM_TYPE DIM3, DATA_TYPE* IN_ARRAY3) { - if (is_new_object$argnum && array$argnum) Py_DECREF(array$argnum); + if (is_new_object$argnum && array$argnum) + { Py_DECREF(array$argnum); } } /***************************/ |