Revision: 4621
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4621&view=rev
Author: mdboom
Date: 2007-12-05 08:38:01 -0800 (Wed, 05 Dec 2007)
Log Message:
-----------
Merged revisions 4619-4620 via svnmerge from
http://matplotlib.svn.sf.net/svnroot/matplotlib/trunk/matplotlib
........
r4620 | mdboom | 2007-12-05 11:35:26 -0500 (Wed, 05 Dec 2007) | 2 lines
Fix reference leak in draw_text_image.
........
Modified Paths:
--------------
branches/transforms/src/_backend_agg.cpp
Property Changed:
----------------
branches/transforms/
Property changes on: branches/transforms
___________________________________________________________________
Name: svnmerge-integrated
- /trunk/matplotlib:1-4618
+ /trunk/matplotlib:1-4620
Modified: branches/transforms/src/_backend_agg.cpp
===================================================================
--- branches/transforms/src/_backend_agg.cpp 2007-12-05 16:35:26 UTC (rev
4620)
+++ branches/transforms/src/_backend_agg.cpp 2007-12-05 16:38:01 UTC (rev
4621)
@@ -661,8 +661,8 @@
const unsigned char* buffer = NULL;
int width, height;
Py::Object image_obj = args[0];
+ PyArrayObject* image_array = NULL;
if (PyArray_Check(image_obj.ptr())) {
- PyArrayObject* image_array = NULL;
image_array = (PyArrayObject*)PyArray_FromObject(image_obj.ptr(),
PyArray_UBYTE, 2, 2);
if (!image_array)
throw Py::ValueError("First argument to draw_text_image must be a
FT2Font.Image object or a Nx2 uint8 numpy array.");
@@ -685,6 +685,7 @@
}
catch (Py::TypeError) {
//x,y out of range; todo issue warning?
+ Py_XDECREF(image_array);
return Py::Object();
}
@@ -727,6 +728,8 @@
theRasterizer->add_path(rect2);
agg::render_scanlines(*theRasterizer, *slineP8, ri);
+ Py_XDECREF(image_array);
+
return Py::Object();
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins