[50441] trunk/dports/python/py25-quadtree

mcalhoun at macports.org mcalhoun at macports.org
Thu Apr 30 17:52:09 PDT 2009


Revision: 50441
          http://trac.macports.org/changeset/50441
Author:   mcalhoun at macports.org
Date:     2009-04-30 17:52:08 -0700 (Thu, 30 Apr 2009)
Log Message:
-----------
py25-quadtree: Apply patch to fix memory leak (already reported upstream).
Add build dependency on py25-setuptools.
Add openmaintainer.
Fixes #19479.

Modified Paths:
--------------
    trunk/dports/python/py25-quadtree/Portfile

Added Paths:
-----------
    trunk/dports/python/py25-quadtree/files/
    trunk/dports/python/py25-quadtree/files/patch-quadtree-_treemodule.c.diff

Modified: trunk/dports/python/py25-quadtree/Portfile
===================================================================
--- trunk/dports/python/py25-quadtree/Portfile	2009-05-01 00:05:27 UTC (rev 50440)
+++ trunk/dports/python/py25-quadtree/Portfile	2009-05-01 00:52:08 UTC (rev 50441)
@@ -6,9 +6,10 @@
 
 name            py25-quadtree
 version         0.1.2
+revision        1
 categories      python
 platforms       darwin
-maintainers     mcalhoun
+maintainers     mcalhoun openmaintainer
 description     Quadtree
 long_description \
     Quadtree: \
@@ -29,6 +30,11 @@
     sha1 be2cdbe1322e381fd4f333d570462a3767bfeb7c \
     rmd160 dd32d7bca2acbd3295a407a7d3f5e40c994821d3
 
+depends_build port:py25-setuptools
+
+# See http://trac.gispython.org/lab/ticket/110
+patchfiles      patch-quadtree-_treemodule.c.diff
+
 post-destroot {
     xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
 	eval xinstall -m 644 ${worksrcpath}/PKG-INFO \

Added: trunk/dports/python/py25-quadtree/files/patch-quadtree-_treemodule.c.diff
===================================================================
--- trunk/dports/python/py25-quadtree/files/patch-quadtree-_treemodule.c.diff	                        (rev 0)
+++ trunk/dports/python/py25-quadtree/files/patch-quadtree-_treemodule.c.diff	2009-05-01 00:52:08 UTC (rev 50441)
@@ -0,0 +1,24 @@
+--- quadtree/_treemodule.c.orig	2009-04-28 14:12:39.000000000 +0400
++++ quadtree/_treemodule.c	2009-04-28 14:17:27.000000000 +0400
+@@ -165,7 +165,7 @@
+ {
+     int *hits, count=0, i;
+     double min[2], max[2];
+-    PyObject *list;
++    PyObject *list, *iter;
+ 
+     if (!PyArg_ParseTuple(args, "(dddd)", &min[0], &min[1], &max[0], &max[1]))
+         return NULL;
+@@ -177,7 +177,11 @@
+         PyList_SET_ITEM(list, (size_t)i, Py_BuildValue("i", hits[i]));
+     }
+     
+-    return PySeqIter_New(list);
++    free(hits);
++
++    iter = PySeqIter_New(list);
++    Py_DECREF(list);
++    return iter;
+ }
+ 
+ /* Define Methods */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090430/90bc4c54/attachment.html>


More information about the macports-changes mailing list