[DebianGIS-dev] Bug#542333: new swig1.3 causes the package to FTBFS

Andreas Barth aba at not.so.argh.org
Thu Aug 20 16:25:36 UTC 2009


reassign 542333 swig1.3
found 542333 1.3.39-2
affects 542333 gdal
thanks

Hi,

after some more inspection, the package FTBFS with version 1.3.39-2 of
swig1.3, but seems to survive the critical path with version 1.3.36-1.
The main difference between the generated code is:

@@ -5620,7 +5668,13 @@
     arg2 = reinterpret_cast< char * >(buf2);
     {
       CPLErrorReset();
-      GDAL_GCP_Info_set(arg1,arg2);
+      if (GDAL_GCP_Info_set(arg1,arg2)) delete[] GDAL_GCP_Info_set(arg1,arg2);
+      if (arg2) {
+        size_t size = strlen(reinterpret_cast< const char * >(arg2)) + 1;
+        GDAL_GCP_Info_set(arg1,arg2) = (char *)reinterpret_cast< char* >(memcpy((new char[size]), reinterpret_cast< const char * >(arg2), sizeof(char)*(size)));
+      } else {
+        GDAL_GCP_Info_set(arg1,arg2) = 0;
+      }
       CPLErr eclass = CPLGetLastErrorType();
       if ( eclass == CE_Failure || eclass == CE_Fatal ) {
         SWIG_exception_fail( SWIG_RuntimeError, CPLGetLastErrorMsg() );
@@ -5640,7 +5694,7 @@

but GDAL_GCP_Info_set returns void. The full diff between the
generated files is attached.


Cheers,
Andi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdal.diff
Type: text/x-diff
Size: 21043 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-grass-devel/attachments/20090820/d4153363/attachment.diff>


More information about the Pkg-grass-devel mailing list