[Numpy-svn] r5259 - trunk/numpy/core/src

numpy-svn@scip... numpy-svn@scip...
Sat Jun 7 17:43:06 CDT 2008


Author: charris
Date: 2008-06-07 17:43:03 -0500 (Sat, 07 Jun 2008)
New Revision: 5259

Modified:
   trunk/numpy/core/src/arrayobject.c
Log:
Fix missing return value, closes ticket #813.


Modified: trunk/numpy/core/src/arrayobject.c
===================================================================
--- trunk/numpy/core/src/arrayobject.c	2008-06-07 15:57:45 UTC (rev 5258)
+++ trunk/numpy/core/src/arrayobject.c	2008-06-07 22:43:03 UTC (rev 5259)
@@ -6645,19 +6645,20 @@
 static int
 _zerofill(PyArrayObject *ret)
 {
-    intp n;
-
     if (PyDataType_REFCHK(ret->descr)) {
         PyObject *zero = PyInt_FromLong(0);
         PyArray_FillObjectArray(ret, zero);
         Py_DECREF(zero);
-        if (PyErr_Occurred()) {Py_DECREF(ret); return -1;}
+        if (PyErr_Occurred()) {
+            Py_DECREF(ret); 
+            return -1;
+        }
     }
     else {
-        n = PyArray_NBYTES(ret);
+        intp n = PyArray_NBYTES(ret);
         memset(ret->data, 0, n);
-	return 0;
-    }  
+    }
+    return 0;  
 }
 
 



More information about the Numpy-svn mailing list