From: William S Fulton <wsf@fu...> - 2014-01-05 20:26:28
On 29/12/13 00:42, remon kamal wrote:
> take a look at the bug : https://sourceforge.net/p/swig/bugs/1351/
> I have made a script ( correct_script.py ) that corrects swig errors,
> attached is the project after making the correct_script.py , you can run
> the project by using ./exec.sh
> the script is just searching for java files in current directory and
> it's subdirectories, when it finds one, if the file name starts with
> "SWIGTYPE_p_" [incomplete type] , it opens it and replaces "protected"
> with "public" , if the file is java file and it's name don't start with
> "SWIGTYPE_p_" [ordinary class], then replace "SWIGTYPE_p_" with
> top_level_package_name+".SWIGTYPE_p_" [concatenates the top level
> package name with ".SWIGTYPE_p_"]
From the CHANGES file for swig-2.0.5:
[Java] Provide an easy way to override the default visibility for the
proxy class pointer
constructors and getCPtr() method. The visibility is 'protected' by
default and if multiple
SWIG modules are being used and compiled into different packages, then
they need to be
'public' in order to use the constructor or getCPtr() method from a
Use the following macros to change the visibilities in the proxy and
type wrapper class:
SWIG_JAVABODY_PROXY(public, public, SWIGTYPE)
SWIG_JAVABODY_TYPEWRAPPER(public, public, public, SWIGTYPE)
The default for Java has changed from public to protected for the proxy
classes. Use the
SWIG_JAVABODY_PROXY macro above to restore to the previous visibilities.
The ticket indicates you are using 2.0.4, so please upgrade or use the
macro as described in the bug ticket.
Get latest updates about Open Source Projects, Conferences and News.