[gdal-dev] Commit r19248
Ari Jolma
ari.jolma at gmail.com
Mon Mar 29 16:23:08 EDT 2010
I was wrong in saying that there are no "unnecessary" memory copies in
Perl. It seems that the raster data is copied to a buffer, from which it
is copied to another buffer maintained by Perl. I then have an extra
layer of Perl code to copy from that buffer to Perl scalar arrays for
ease of use. An optimization to do away one of the copies would be
useful. That would mean copying from the initial buffer directly into
Perl arrays within a typemap - I haven't done that because of the
complication of several datatypes. To change that would mean - not to
break existing code - defining a new set of read/write methods.
Would that be compatible with what is wished for in the Python bindings?
Ari
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.
>
> 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