[Numpy-svn] r4033 - trunk/numpy/doc/swig

numpy-svn@scip... numpy-svn@scip...
Thu Sep 13 12:53:10 CDT 2007


Author: wfspotz@sandia.gov
Date: 2007-09-13 12:53:08 -0500 (Thu, 13 Sep 2007)
New Revision: 4033

Modified:
   trunk/numpy/doc/swig/numpy.i
Log:
Changed freearg typemaps to use brackets to avoid 'ambiguous else' warning under C

Modified: trunk/numpy/doc/swig/numpy.i
===================================================================
--- trunk/numpy/doc/swig/numpy.i	2007-09-13 17:41:01 UTC (rev 4032)
+++ trunk/numpy/doc/swig/numpy.i	2007-09-13 17:53:08 UTC (rev 4033)
@@ -459,7 +459,8 @@
 %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 @@
 %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 @@
 %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 @@
 %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 @@
 %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 @@
 %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 @@
 %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 @@
 %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 @@
 %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); }
 }
 
 /***************************/



More information about the Numpy-svn mailing list