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

numpy-svn at scipy.org numpy-svn at scipy.org
Mon Dec 4 14:33:11 CST 2006


Author: oliphant
Date: 2006-12-04 14:33:09 -0600 (Mon, 04 Dec 2006)
New Revision: 3476

Modified:
   trunk/numpy/core/src/multiarraymodule.c
Log:
Fix reference counting with PyArray_ArgSort

Modified: trunk/numpy/core/src/multiarraymodule.c
===================================================================
--- trunk/numpy/core/src/multiarraymodule.c	2006-12-04 20:32:39 UTC (rev 3475)
+++ trunk/numpy/core/src/multiarraymodule.c	2006-12-04 20:33:09 UTC (rev 3476)
@@ -2496,11 +2496,11 @@
                 return ret;
 	}
 
-        op = NULL;
 	if ((which != PyArray_QUICKSORT) || op2->descr->f->compare == NULL) {
 		PyErr_SetString(PyExc_TypeError,
 				"requested sort not available for type");
                 Py_DECREF(op2);
+                op = NULL;
 		goto fail;
 	}
 



More information about the Numpy-svn mailing list