[Numpy-svn] r8364 - trunk/numpy/core/src/multiarray

numpy-svn@scip... numpy-svn@scip...
Sun Apr 25 12:26:08 CDT 2010


Author: ptvirtan
Date: 2010-04-25 12:26:08 -0500 (Sun, 25 Apr 2010)
New Revision: 8364

Modified:
   trunk/numpy/core/src/multiarray/number.c
Log:
BUG: fix reference count bug in set_numeric_ops (fixes #1464, #1462)

Modified: trunk/numpy/core/src/multiarray/number.c
===================================================================
--- trunk/numpy/core/src/multiarray/number.c	2010-04-25 15:57:47 UTC (rev 8363)
+++ trunk/numpy/core/src/multiarray/number.c	2010-04-25 17:26:08 UTC (rev 8364)
@@ -30,6 +30,7 @@
         if (!(PyCallable_Check(temp))) {                  \
             return -1;                                    \
         }                                                 \
+        Py_INCREF(temp);                                  \
         Py_XDECREF(n_ops.op);                             \
         n_ops.op = temp;                                  \
     }



More information about the Numpy-svn mailing list