[Thuban-commits] r2802 - in branches/WIP-pyshapelib-Unicode/thuban: . libraries/thuban

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Jan 9 01:05:42 CET 2008


Author: bramz
Date: 2008-01-09 01:05:40 +0100 (Wed, 09 Jan 2008)
New Revision: 2802

Modified:
   branches/WIP-pyshapelib-Unicode/thuban/ChangeLog
   branches/WIP-pyshapelib-Unicode/thuban/libraries/thuban/wxproj.cpp
Log:
forward ported trunk rev (2793:2793] to WIP-pyshapelib-Unicode branch

Modified: branches/WIP-pyshapelib-Unicode/thuban/ChangeLog
===================================================================
--- branches/WIP-pyshapelib-Unicode/thuban/ChangeLog	2008-01-08 23:32:59 UTC (rev 2801)
+++ branches/WIP-pyshapelib-Unicode/thuban/ChangeLog	2008-01-09 00:05:40 UTC (rev 2802)
@@ -1,3 +1,22 @@
+2008-01-09   Bram de Greve <bram.degreve at bramz.net>
+
+	* forward ported trunk (2793:2793] to WIP-pyshapelib-Unicode
+	branch
+	
+	* libraries/shapelib: forward ported from cvs.maptools.org:
+	shpopen.c v1.58, dbfopen.c v1.81, safileio.c v1.3
+	
+	* setup.py: updated for pyshapelib
+	
+	* Thuban/Model/table.py: use LDID_ESRI_ANSI as code page
+	when creating .dbf files.	
+
+2008-01-08   Bernhard Reiter <bernhard at intevation.de>
+
+	* libraries/thuban/wxproj.cpp(project_points): made function robust
+	against being called with no points. (also fixes main defect related 
+	to [#571] (MemoryError when adding a particular shp layer))
+
 2008-01-03   Bram de Greve <bram.degreve at bramz.net>
 
 	* added support for UTF-8 filenames to shapelib (currently 

Modified: branches/WIP-pyshapelib-Unicode/thuban/libraries/thuban/wxproj.cpp
===================================================================
--- branches/WIP-pyshapelib-Unicode/thuban/libraries/thuban/wxproj.cpp	2008-01-08 23:32:59 UTC (rev 2801)
+++ branches/WIP-pyshapelib-Unicode/thuban/libraries/thuban/wxproj.cpp	2008-01-09 00:05:40 UTC (rev 2802)
@@ -185,6 +185,8 @@
 {
     int i;
     int num_points = num_vertices + num_parts - 1;
+    if (num_points <= 0) return NULL;
+
     wxPoint* points = (wxPoint*)malloc(num_points * sizeof(wxPoint));
     if (!points)
     {
@@ -261,6 +263,7 @@
     PyObject * py_dc;
     double scalex, scaley, offx, offy;
 
+    /*printf("draw_polygon_init() called\n");*/
     if (!PyArg_ParseTuple(args, "OOOOdddd",
 			  &py_shapefile,
                           &py_dc, &py_forward, &py_inverse,



More information about the Thuban-commits mailing list