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

numpy-svn at scipy.org numpy-svn at scipy.org
Sat Nov 18 08:53:50 CST 2006


Author: oliphant
Date: 2006-11-18 08:53:47 -0600 (Sat, 18 Nov 2006)
New Revision: 3448

Modified:
   trunk/numpy/core/src/ufuncobject.c
Log:
Remove Py_CLEAR and set ptr to NULL manually

Modified: trunk/numpy/core/src/ufuncobject.c
===================================================================
--- trunk/numpy/core/src/ufuncobject.c	2006-11-17 20:40:54 UTC (rev 3447)
+++ trunk/numpy/core/src/ufuncobject.c	2006-11-18 14:53:47 UTC (rev 3448)
@@ -1961,7 +1961,7 @@
 				for (i=0; i<self->nargs; i++) {
 					if (loop->cast[i]) {
 						if (steps[i] == 0) {
-							Py_CLEAR(*((PyObject **)castbuf[i]));
+							Py_XDECREF(*((PyObject **)castbuf[i]));
 						}
 						else {
 							int size = loop->bufsize;
@@ -1972,7 +1972,8 @@
 								size = loop->leftover;
 
 							for (j=0; j<size; j++) {
-								Py_CLEAR(*objptr);
+								Py_XDECREF(*objptr);
+								*objptr = NULL;
 								objptr += 1;
 							}
 						}



More information about the Numpy-svn mailing list