[gdal-dev] Commit r19248

Ari Jolma ari.jolma at gmail.com
Mon Mar 29 15:24:55 EDT 2010


Even Rouault wrote:
> Andrey,
>
> r19248 introduce Python specific code in general .i files. The consequence is 
> that it breaks the Perl bindings (see 
> http://buildbot.osgeo.org:8500/builders/telascience-quick/builds/312/steps/perl-make/logs/stdio). 
>
> It also breaks Python3 compatibility as PyString_FromStringAndSize and 
> PyString_AsString aren't available (though this could be fixed easily by 
> using PyBytes_FromStringAndSize and PyBytes_AsString with a #if 
> PY_VERSION_HEX >= 0x03000000)
>
> I think the new implementation should be done only inside a #if 
> defined(SWIGPYTHON) I guess, and the old implementation preserved for other 
> binding languages.
>   


I can't see what's the problem that r19248 attempts to solve - I must 
admit that I don't understand everything that goes on in the read/write 
bindings. Does PyBytes_FromStringAndSize make a copy of the binary data? 
Is that the "unnecessary string copying"? I don't think there is such a 
problem in the Perl bindings. Maybe an enhancement request ticket and a 
bit of discussion would have been a good thing to start with.

Best regards,

Ari


> Best regards
>
> Even
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>   



More information about the gdal-dev mailing list