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

numpy-svn at scipy.org numpy-svn at scipy.org
Thu Nov 16 18:28:52 CST 2006


Author: oliphant
Date: 2006-11-16 18:28:50 -0600 (Thu, 16 Nov 2006)
New Revision: 3439

Modified:
   trunk/numpy/core/src/ufuncobject.c
Log:
Applied tecki's patch for ufunc's involving objects

Modified: trunk/numpy/core/src/ufuncobject.c
===================================================================
--- trunk/numpy/core/src/ufuncobject.c	2006-11-17 00:05:37 UTC (rev 3438)
+++ trunk/numpy/core/src/ufuncobject.c	2006-11-17 00:28:50 UTC (rev 3439)
@@ -1961,7 +1961,7 @@
 				for (i=0; i<self->nargs; i++) {
 					if (loop->cast[i]) {
 						if (steps[i] == 0) {
-							Py_XDECREF(*((PyObject **)castbuf[i]));
+							Py_CLEAR(*((PyObject **)castbuf[i]));
 						}
 						else {
 							int size = loop->bufsize;
@@ -1972,7 +1972,7 @@
 								size = loop->leftover;
 
 							for (j=0; j<size; j++) {
-								Py_XDECREF(*objptr);
+								Py_CLEAR(*objptr);
 								objptr += 1;
 							}
 						}



More information about the Numpy-svn mailing list