On 09/27/2010 05:31 PM, Frank Warmerdam wrote:
Even, Tamas, Ari, Howard, and other SWIG wise men,
I got lost last night in the SWIG typemaps we use for GDAL, but
eventually
I came up with a minimal patch that seems to make sense and work. I
would
appreciate it if you guys could skim it and let me know if I'm doing
things
in a really wrong or dangerous way.
http://trac.osgeo.org/gdal/attachment/ticket/3766/utf8_swig.patch
ok with me, this does not break anything AFAI can see. I'll handle the
decode/encode for Perl in Perl.
I am attempting to treat any const char * parameter named utf8_path via
a custom typemap that uses the preexisting GDALPythonObjectToCStr() to
convert it. This appears to take regular strings, and unicode strings
properly in Python.
In other languages there is no special processing except that I have also
globally applied the NONNULL typemap to such parameters.
If I got ahead with this, should I add utf8_path in the README.typemaps?
Please do. It's an optional typemap.
Best regards,
Ari
Best regards,
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev