[Gdal-dev] Ready to commit first batch of swig-java changes

Andrea Aime aaime at openplans.org
Sun Mar 25 15:38:53 EDT 2007

Tamas Szekeres ha scritto:
> 2007/3/18, Andrea Aime <aaime at openplans.org>:

>> As a result, I had to mix the java specific code in ogr.i, so that
>> I can preserve the right order.
> I have no problem about this approach. You can commit these changes
> and you may refine the solution if needed in the future. I suspect
> there's no need to reimplement those functions since the
> implementation is the same and only some of the types at the formal
> parameter list have been changed. I guess these parameter types can
> surely be altered by java specific typemaps.

Tamas, I've committed my changes as of revision 11607.
I did not change them thought. The rationale is, I'm not sure changing
the typemaps would be side effect free.
The typemap for wkb functions involves handling "int nLen, char *pBuf"
as a byte[] in Java, because chars in java are a 16bit data type.
Now, changing the typemap directly in typemaps_java.i may impact other 
functions in the gdal bindings and I'm not sure this would be good (it 
may be the right thing to do, but I did not have the time to check).
Doing it locally would mean temporary overriding the general one,
but in fact, once you've overridden a general typemap, how do you 
reistall the old one?
I accept suggestions :-)


More information about the Gdal-dev mailing list