|
From: <md...@us...> - 2009-04-23 14:22:37
|
Revision: 7061
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7061&view=rev
Author: mdboom
Date: 2009-04-23 14:22:27 +0000 (Thu, 23 Apr 2009)
Log Message:
-----------
Fix theoretical memory leak.
Modified Paths:
--------------
trunk/matplotlib/src/cntr.c
Modified: trunk/matplotlib/src/cntr.c
===================================================================
--- trunk/matplotlib/src/cntr.c 2009-04-23 14:22:11 UTC (rev 7060)
+++ trunk/matplotlib/src/cntr.c 2009-04-23 14:22:27 UTC (rev 7061)
@@ -1410,7 +1410,7 @@
PyObject *
cntr_trace(Csite *site, double levels[], int nlevels, int points, long nchunk)
{
- PyObject *c_list;
+ PyObject *c_list = NULL;
double *xp0;
double *yp0;
long *nseg0;
@@ -1502,6 +1502,7 @@
error:
PyMem_Free(xp0); PyMem_Free(yp0); PyMem_Free(nseg0);
site->xcp = NULL; site->ycp = NULL;
+ Py_XDECREF(c_list);
return NULL;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2009-08-05 00:11:48
|
Revision: 7357
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7357&view=rev
Author: efiring
Date: 2009-08-05 00:11:42 +0000 (Wed, 05 Aug 2009)
Log Message:
-----------
Remove unused argument from data_init in cntr.c
Modified Paths:
--------------
trunk/matplotlib/src/cntr.c
Modified: trunk/matplotlib/src/cntr.c
===================================================================
--- trunk/matplotlib/src/cntr.c 2009-08-05 00:05:37 UTC (rev 7356)
+++ trunk/matplotlib/src/cntr.c 2009-08-05 00:11:42 UTC (rev 7357)
@@ -291,7 +291,7 @@
static long curve_tracer (Csite * site, int pass2);
/* this initializes the data array for curve_tracer */
-static void data_init (Csite * site, int region, long nchunk);
+static void data_init (Csite * site, long nchunk);
/* ------------------------------------------------------------------------ */
@@ -974,13 +974,8 @@
/* ------------------------------------------------------------------------ */
-/* The sole function of the "region" argument is to specify the
- value in Csite.reg that denotes a missing zone. We always
- use zero.
-*/
-
static void
-data_init (Csite * site, int region, long nchunk)
+data_init (Csite * site, long nchunk)
{
Cdata * data = site->data;
long imax = site->imax;
@@ -1050,8 +1045,7 @@
data[ij + imax + 1] = 0;
if (reg)
{
- if (region ? (reg[ij + imax + 1] == region)
- : (reg[ij + imax + 1] != 0))
+ if (reg[ij + imax + 1] != 0)
data[ij + imax + 1] = ZONE_EX;
}
else
@@ -1403,7 +1397,7 @@
site->zlevel[1] = levels[1];
}
site->n = site->count = 0;
- data_init (site, 0, nchunk);
+ data_init (site, nchunk);
/* make first pass to compute required sizes for second pass */
for (;;)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2010-02-24 18:30:49
|
Revision: 8152
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8152&view=rev
Author: efiring
Date: 2010-02-24 18:30:42 +0000 (Wed, 24 Feb 2010)
Log Message:
-----------
cntr.c: patch by Ian Thomas to fix bug ID 2956378
Modified Paths:
--------------
trunk/matplotlib/src/cntr.c
Modified: trunk/matplotlib/src/cntr.c
===================================================================
--- trunk/matplotlib/src/cntr.c 2010-02-24 18:25:49 UTC (rev 8151)
+++ trunk/matplotlib/src/cntr.c 2010-02-24 18:30:42 UTC (rev 8152)
@@ -605,6 +605,9 @@
}
if (fwd < 0 && level0 && left < 0)
{
+ /* remove J0_START from this boundary edge as boundary is
+ * included by the upwards slit from contour line below. */
+ data[edge] &= ~J0_START;
if (n_kind) kcp[n_kind] += kind_start_slit;
return slit_cutter (site, 0, pass2);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ef...@us...> - 2010-02-24 20:48:33
|
Revision: 8153
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8153&view=rev
Author: efiring
Date: 2010-02-24 20:48:26 +0000 (Wed, 24 Feb 2010)
Log Message:
-----------
cntr.c: declare variables at start of block; fixes 2933705
Modified Paths:
--------------
trunk/matplotlib/src/cntr.c
Modified: trunk/matplotlib/src/cntr.c
===================================================================
--- trunk/matplotlib/src/cntr.c 2010-02-24 18:30:42 UTC (rev 8152)
+++ trunk/matplotlib/src/cntr.c 2010-02-24 20:48:26 UTC (rev 8153)
@@ -420,19 +420,21 @@
/* this is a saddle zone, determine whether to turn left or
* right depending on height of centre of zone relative to
* contour level. Set saddle[zone] if not already decided. */
+ int turnRight;
long zone = edge + (left > 0 ? left : 0);
if (!(saddle[zone] & SADDLE_SET))
{
+ double zcentre;
saddle[zone] = SADDLE_SET;
- double zcentre = (z[p0] + z[p0+left] + z[p1] + z[p1+left])/4.0;
+ zcentre = (z[p0] + z[p0+left] + z[p1] + z[p1+left])/4.0;
if (zcentre > site->zlevel[0])
saddle[zone] |=
(two_levels && zcentre > site->zlevel[1])
? SADDLE_GT0 | SADDLE_GT1 : SADDLE_GT0;
}
- int turnRight = level == 2 ? (saddle[zone] & SADDLE_GT1)
- : (saddle[zone] & SADDLE_GT0);
+ turnRight = level == 2 ? (saddle[zone] & SADDLE_GT1)
+ : (saddle[zone] & SADDLE_GT0);
if (z1 ^ (level == 2))
turnRight = !turnRight;
if (!turnRight)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|