[Scipy-svn] r2477 - trunk/Lib/interpolate

scipy-svn at scipy.org scipy-svn at scipy.org
Tue Jan 2 21:37:40 CST 2007


Author: timl
Date: 2007-01-02 21:37:35 -0600 (Tue, 02 Jan 2007)
New Revision: 2477

Modified:
   trunk/Lib/interpolate/__fitpack.h
Log:
apply the patch from #248

Modified: trunk/Lib/interpolate/__fitpack.h
===================================================================
--- trunk/Lib/interpolate/__fitpack.h	2007-01-02 17:54:31 UTC (rev 2476)
+++ trunk/Lib/interpolate/__fitpack.h	2007-01-03 03:37:35 UTC (rev 2477)
@@ -140,6 +140,7 @@
   PyObject *x_py = NULL,*y_py = NULL,*z_py = NULL,*w_py = NULL,\
     *tx_py = NULL,*ty_py = NULL;
   PyObject *wrk_py=NULL;
+  PyObject *ret=NULL;
   nx=ny=ier=nxo=nyo=0;
   if (!PyArg_ParseTuple(args, "OOOOddddiiiddOOiiOii",\
 			&x_py,&y_py,&z_py,&w_py,&xb,&xe,\
@@ -224,10 +225,17 @@
   Py_DECREF(ap_y);
   Py_DECREF(ap_z);
   Py_DECREF(ap_w);
-  return Py_BuildValue("NNN{s:N,s:i,s:d}",PyArray_Return(ap_tx),\
-		       PyArray_Return(ap_ty),PyArray_Return(ap_c),\
-		       "wrk",PyArray_Return(ap_wrk),\
-		       "ier",ier,"fp",fp);
+  ret = Py_BuildValue("NNN{s:N,s:i,s:d}",PyArray_Return(ap_tx),\
+	              PyArray_Return(ap_ty),PyArray_Return(ap_c),\
+                      "wrk",PyArray_Return(ap_wrk),\
+		      "ier",ier,"fp",fp);
+  Py_DECREF(ap_tx);
+  Py_DECREF(ap_ty);
+  Py_DECREF(ap_c);
+  Py_DECREF(ap_wrk);
+
+  return ret;
+
   fail:
   if (wa) free(wa);
   Py_XDECREF(ap_x);



More information about the Scipy-svn mailing list