#! /bin/sh /usr/share/dpatch/dpatch-run ## umfpatch.dpatch by ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: fix includes to correct location if [ $# -ne 1 ]; then echo >&2 "$0: script expects -patch|-unpatch as argument" exit 1 fi case "$1" in -patch) patch -f -p1 < $0;; -unpatch) patch -f -R -p1 < $0;; *) echo >&2 "$0: script expects -patch|-unpatch as argument" exit 1 esac exit 0 @DPATCH@ diff -Nru python-scipy-0.5.2.orig/Lib/linsolve/umfpack/umfpack.i python-scipy-0.5.2/Lib/linsolve/umfpack/umfpack.i --- python-scipy-0.5.2.orig/Lib/linsolve/umfpack/umfpack.i 2006-09-24 01:46:42.000000000 -0500 +++ python-scipy-0.5.2/Lib/linsolve/umfpack/umfpack.i 2007-06-20 23:11:51.000000000 -0500 @@ -7,13 +7,13 @@ */ %{ -#include +#include #include "numpy/arrayobject.h" %} %feature("autodoc", "1"); -#include +#include %init %{ import_array(); @@ -114,6 +114,7 @@ return NULL; \ } \ $1 = (double *) obj->data; \ + Py_DECREF( obj ); \ }; /*! @@ -127,7 +128,7 @@ }; \ %typemap( python, argout ) ttype* opaque_argout { \ PyObject *obj; \ - obj = SWIG_NewPointerObj( (ttype) (*$1), $*1_descriptor, 1 ); \ + obj = SWIG_NewPointerObj( (ttype) (*$1), $*1_descriptor, 0 ); \ $result = helper_appendToTuple( $result, obj ); \ }; @@ -185,18 +186,18 @@ double Info [ANY] }; -%include -%include -%include -%include -%include -%include -%include - -%include -%include -%include -%include +%include +%include +%include +%include +%include +%include +%include + +%include +%include +%include +%include /* The order is important below! @@ -208,8 +209,8 @@ void **Numeric } -%include -%include +%include +%include OPAQUE_ARGINOUT( void * ) @@ -218,8 +219,8 @@ void **Numeric } -%include -%include +%include +%include @@ -241,7 +242,7 @@ long *n_col, long *nz_udiag }; -%include +%include ARRAY_IN( double, double, DOUBLE ) @@ -265,4 +266,4 @@ int Q [ ] }; %apply int *OUTPUT { int *do_recip}; -%include +%include