Open tbonfort opened 12 years ago
Author: sgillies@frii.com Date: 2004/12/06 - 17:29
The problem is that the old code was
pointObj(x, y, m)
and now that we have Z for points in mapserver, it has been changed to
pointObj(x, y, z, m)
In the Python case, swig emits constructors in which arguments with specified
values are *optional*. The pointObj constructors is defined in point.i as
pointObj(double x=-1, double y=-1, double z=0, double m=0)
so for Python we can do
>>> p = pointObj() # same as -1,-1,0,0
>>> p = pointObj(10,10) # same as 10,10,0,0
It seems to be that there are no optional arguments for Java?
Author: unicoletti Date: 2004/12/07 - 10:03
Default arguments support for Java has been introduced in swig 1.3.23.
See
http://www.swig.org/Doc1.3/SWIGPlus.html#SWIGPlus_default_args
for more info. Upgrading swig is a bit difficult at the moment for me as gentoo
still ships 1.3.21 and 1.3.22 is unstable.
Author: sgillies@frii.com Date: 2005/01/30 - 17:41
Umberto, I didn't realize that SWIG would generate multiple pointObj constructors
based on the signatures. This is good :)
I have moved the Java pointObj constructors into java/javaextend.i to keep the
point.i file as simple as possible.
Can you test this for me?
Author: unicoletti Date: 2005/02/01 - 10:11
OK, it works.
I have written a small java program that can be used to test this patch, I
attach it. It can go in mapscript/java/examples.
No modifications to Makefile are required as the only requirement is that it
compiles.
Author: sgillies@frii.com Date: 2005/02/01 - 16:23
thanks, Umberto! I committed to branch 4-4 and HEAD and am closing down this
bug.
Reporter: unicoletti Date: 2004/12/05 - 19:50