[Thuban-commits] r2704 - trunk/thuban/libraries/pyshapelib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sun Sep 24 20:52:59 CEST 2006


Author: bernhard
Date: 2006-09-24 20:52:59 +0200 (Sun, 24 Sep 2006)
New Revision: 2704

Modified:
   trunk/thuban/libraries/pyshapelib/ChangeLog
   trunk/thuban/libraries/pyshapelib/README
   trunk/thuban/libraries/pyshapelib/dbflib_wrap.c
Log:
Added dirty workaround to make dbflib agnostic 
against decimal_poinst != ".\0".


Modified: trunk/thuban/libraries/pyshapelib/ChangeLog
===================================================================
--- trunk/thuban/libraries/pyshapelib/ChangeLog	2006-09-24 18:51:39 UTC (rev 2703)
+++ trunk/thuban/libraries/pyshapelib/ChangeLog	2006-09-24 18:52:59 UTC (rev 2704)
@@ -1,3 +1,12 @@
+2006-09-24  Bernhard Reiter  <bernhard at intevation.de>
+
+	Added dirty workaround to make dbflib agnostic 
+	against decimal_poinst != ".\0".
+
+	* dbflib_wrap.c: Added call DBFSetatof_function(&PyOS_ascii_atof);
+	to initdbflibc(). 
+	* README: noted that manual editing of dbflib_wrap.c is necessary now.
+
 2005-06-30  Bernhard Herzog  <bh at intevation.de>
 
 	* shapelib.i (new_SHPObject): Fix the test for the length of the

Modified: trunk/thuban/libraries/pyshapelib/README
===================================================================
--- trunk/thuban/libraries/pyshapelib/README	2006-09-24 18:51:39 UTC (rev 2703)
+++ trunk/thuban/libraries/pyshapelib/README	2006-09-24 18:52:59 UTC (rev 2704)
@@ -32,6 +32,13 @@
 archive. If you modify shapelib.i or dbflib.i and need to recreate the
 generated files, you need SWIG 1.3 Alpha 5.  It's unlikely that other
 versions will work.
+In addition you need to add the following lines to  initdbflibc(void)
+in dbflib_wrap.c.
+    /* because we are in a python module now, we can give out
+     * pointers to python's locale agonistic function 
+     * XXX this clearly is a hack
+     */
+    DBFSetatof_function(&PyOS_ascii_atof);
 
 You also need Python, of course.  If you installed prebuilt packages
 such as RPMs of some Linux distributions, please make sure that the

Modified: trunk/thuban/libraries/pyshapelib/dbflib_wrap.c
===================================================================
--- trunk/thuban/libraries/pyshapelib/dbflib_wrap.c	2006-09-24 18:51:39 UTC (rev 2703)
+++ trunk/thuban/libraries/pyshapelib/dbflib_wrap.c	2006-09-24 18:52:59 UTC (rev 2704)
@@ -1,6 +1,7 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
  * Version 1.3u-20020503-1857 (Alpha 5)
+ * And later MANUALLY edited at the end.
  * 
  * This file is not intended to be easily readable and contains a number of 
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -1417,5 +1418,12 @@
         swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
     }
     SWIG_InstallConstants(d,swig_const_table);
+
+    /* because we are in a python module now, we can give out
+     * pointers to python's locale agonistic function 
+     * XXX this clearly is a hack
+     */
+    DBFSetatof_function(&PyOS_ascii_atof);
+
 }
 



More information about the Thuban-commits mailing list