Merge branch 'master' into SFbug1299
This commit is contained in:
commit
d5d7655544
14 changed files with 254 additions and 225 deletions
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
# Compiled Source
|
||||||
|
*.o
|
||||||
|
*.class
|
||||||
|
|
||||||
|
# Local PCRE
|
||||||
|
prce
|
||||||
|
*.gz
|
||||||
8
ANNOUNCE
8
ANNOUNCE
|
|
@ -1,8 +1,8 @@
|
||||||
*** ANNOUNCE: SWIG 2.0.9 (16 December 2012) ***
|
*** ANNOUNCE: SWIG 2.0.10 (in progress) ***
|
||||||
|
|
||||||
http://www.swig.org
|
http://www.swig.org
|
||||||
|
|
||||||
We're pleased to announce SWIG-2.0.9, the latest SWIG release.
|
We're pleased to announce SWIG-2.0.10, the latest SWIG release.
|
||||||
|
|
||||||
What is SWIG?
|
What is SWIG?
|
||||||
=============
|
=============
|
||||||
|
|
@ -21,11 +21,11 @@ Availability
|
||||||
============
|
============
|
||||||
The release is available for download on Sourceforge at
|
The release is available for download on Sourceforge at
|
||||||
|
|
||||||
http://prdownloads.sourceforge.net/swig/swig-2.0.9.tar.gz
|
http://prdownloads.sourceforge.net/swig/swig-2.0.10.tar.gz
|
||||||
|
|
||||||
A Windows version is also available at
|
A Windows version is also available at
|
||||||
|
|
||||||
http://prdownloads.sourceforge.net/swig/swigwin-2.0.9.zip
|
http://prdownloads.sourceforge.net/swig/swigwin-2.0.10.zip
|
||||||
|
|
||||||
Please report problems with this release to the swig-devel mailing list,
|
Please report problems with this release to the swig-devel mailing list,
|
||||||
details at http://www.swig.org/mail.html.
|
details at http://www.swig.org/mail.html.
|
||||||
|
|
|
||||||
155
CHANGES
155
CHANGES
|
|
@ -3,6 +3,161 @@ SWIG (Simplified Wrapper and Interface Generator)
|
||||||
See the CHANGES.current file for changes in the current version.
|
See the CHANGES.current file for changes in the current version.
|
||||||
See the RELEASENOTES file for a summary of changes in each release.
|
See the RELEASENOTES file for a summary of changes in each release.
|
||||||
|
|
||||||
|
Version 2.0.9 (16 December 2012)
|
||||||
|
================================
|
||||||
|
|
||||||
|
2012-12-16: wsfulton
|
||||||
|
Fix garbage line number / empty file name reporting for some missing
|
||||||
|
'}' or ')' error messages.
|
||||||
|
|
||||||
|
2012-12-15: kkaempf
|
||||||
|
[Ruby] Apply patch 3530444, Class#methods and Class#constants returns array of
|
||||||
|
symbols in Ruby 1.9+
|
||||||
|
|
||||||
|
2012-12-14: kkaempf
|
||||||
|
[Ruby] Apply patch 3530439 and finally replace all occurences of the STR2CSTR() macro
|
||||||
|
with StringValuePtr(). STR2CSTR was deprecated since years and got removed in Ruby 1.9
|
||||||
|
|
||||||
|
2012-12-14: kkaempf
|
||||||
|
[Ruby] Applied patches #3530442 and 3530443 to adapt compile and runtime include
|
||||||
|
paths to match Ruby 1.9+
|
||||||
|
|
||||||
|
2012-12-14: wsfulton
|
||||||
|
[CFFI] Fix #3161614 - Some string constants are incorrect
|
||||||
|
|
||||||
|
2012-12-13: wsfulton
|
||||||
|
[CFFI] Fix #3529690 - Fix incorrect constant names.
|
||||||
|
|
||||||
|
2012-12-12: drjoe
|
||||||
|
[R] add fix to finalizer that was missed earlier
|
||||||
|
|
||||||
|
2012-12-11: wsfulton
|
||||||
|
[Python] Apply patch #3590522 - fully qualified package paths for Python 3 even if a module is in the
|
||||||
|
same package.
|
||||||
|
|
||||||
|
2012-12-08: wsfulton
|
||||||
|
[Python] Bug #3563647 - PyInt_FromSize_t unavailable prior to Python 2.5 for unsigned int types.
|
||||||
|
|
||||||
|
2012-12-08: wsfulton
|
||||||
|
[Perl] Fix bug #3571361 - C++ comment in C wrappers.
|
||||||
|
|
||||||
|
2012-12-07: wsfulton
|
||||||
|
[C#] Apply patch #3571029 which adds missing director support for const unsigned long long &.
|
||||||
|
|
||||||
|
2012-11-28: kwwette
|
||||||
|
[Octave] Simplified module loading: now just the syntax
|
||||||
|
$ example;
|
||||||
|
is accepted, which loads functions globally but constants and variables relative to the current scope.
|
||||||
|
This make module loading behaviour reliably consistent, and reduces problems when loading modules which
|
||||||
|
depend on other modules which may not have been previously loaded.
|
||||||
|
|
||||||
|
2012-11-27: wsfulton
|
||||||
|
[cffi] Fix junk output when wrapping single character literal constants.
|
||||||
|
|
||||||
|
2012-11-17: wsfulton
|
||||||
|
[Tcl, Modula3] Add missing support for -outdir.
|
||||||
|
|
||||||
|
2012-11-17: wsfulton
|
||||||
|
Fix segfaults when using filename paths greater than 1024 characters in length.
|
||||||
|
|
||||||
|
2012-11-14: wsfulton
|
||||||
|
[ccache-swig] Apply patch #3586392 from Frederik Deweerdt to fix some error cases - incorrectly using
|
||||||
|
memory after it has been deleted.
|
||||||
|
|
||||||
|
2012-11-09: vzeitlin
|
||||||
|
[Python] Fix overflow when passing values greater than LONG_MAX from Python 3 for parameters with unsigned long C type.
|
||||||
|
|
||||||
|
2012-11-09: wsfulton
|
||||||
|
Fix some feature matching issues for implicit destructors and implicit constructors and implicit
|
||||||
|
copy constructors added with %copyctor. Previously a feature for these had to be fully qualified
|
||||||
|
in order to match. Now the following will also match:
|
||||||
|
|
||||||
|
%feature("xyz") ~XXX();
|
||||||
|
struct XXX {};
|
||||||
|
|
||||||
|
2012-11-09: wsfulton
|
||||||
|
Further consistency in named output typemap lookups for implicit constructors and destructors and
|
||||||
|
implicit copy constructors added with %copyctor. Previously only the fully qualified name was being
|
||||||
|
used, now the unqualified name will also be used. For example, previously:
|
||||||
|
|
||||||
|
example.i:38: Searching for a suitable 'out' typemap for: void Space::More::~More
|
||||||
|
Looking for: void Space::More::~More
|
||||||
|
Looking for: void
|
||||||
|
|
||||||
|
Now the unqualified name is also used:
|
||||||
|
|
||||||
|
example.i:38: Searching for a suitable 'out' typemap for: void Space::More::~More
|
||||||
|
Looking for: void Space::More::~More
|
||||||
|
Looking for: void ~More
|
||||||
|
Looking for: void
|
||||||
|
|
||||||
|
2012-11-02: wsfulton
|
||||||
|
Fix some subtle named output typemap lookup misses, the fully qualified name was not always being
|
||||||
|
used for variables, for example:
|
||||||
|
|
||||||
|
struct Glob {
|
||||||
|
int MyVar;
|
||||||
|
};
|
||||||
|
|
||||||
|
Previously the search rules (as shown by -debug-tmsearch) for the getter wrapper were:
|
||||||
|
|
||||||
|
example.i:44: Searching for a suitable 'out' typemap for: int MyVar
|
||||||
|
Looking for: int MyVar
|
||||||
|
Looking for: int
|
||||||
|
|
||||||
|
Now the scope is named correctly:
|
||||||
|
|
||||||
|
example.i:44: Searching for a suitable 'out' typemap for: int Glob::MyVar
|
||||||
|
Looking for: int Glob::MyVar
|
||||||
|
Looking for: int MyVar
|
||||||
|
Looking for: int
|
||||||
|
|
||||||
|
2012-10-26: wsfulton
|
||||||
|
Fix director typemap searching so that a typemap specified with a name will be correctly matched. Previously
|
||||||
|
the name was ignored during the typemap search. Applies to the following list of typemaps:
|
||||||
|
directorout, csdirectorout, cstype, imtype, ctype, ddirectorout, dtype, gotype, jtype, jni, javadirectorout.
|
||||||
|
|
||||||
|
2012-10-11: wsfulton
|
||||||
|
Most of the special variables available for use in %exception are now also available for expansion in
|
||||||
|
%extend blocks. These are: $name $symname $overname $decl $fulldecl $parentname $parentsymname, see docs
|
||||||
|
on "Class extension" in SWIGPlus.html. Patch based on submission from Kris Thielemans.
|
||||||
|
|
||||||
|
2012-10-10: wsfulton
|
||||||
|
Additional new special variables in %exception are expanded as follows:
|
||||||
|
$parentname - The parent class name (if any) for a method.
|
||||||
|
$parentsymname - The target language parent class name (if any) for a method.
|
||||||
|
|
||||||
|
2012-10-08: iant
|
||||||
|
[Go] Generating Go code now requires using the -intgosize option to
|
||||||
|
indicate the size of the 'int' type in Go. This is because the
|
||||||
|
size of the type is changing from Go 1.0 to Go 1.1 for x86_64.
|
||||||
|
|
||||||
|
2012-09-14: wsfulton
|
||||||
|
Add new warning if the empty template instantiation is used as a base class, for example:
|
||||||
|
|
||||||
|
template <typename T> class Base {};
|
||||||
|
%template() Base<int>;
|
||||||
|
class Derived : public Base<int> {};
|
||||||
|
|
||||||
|
gives the following warning instead of silently ignoring the base:
|
||||||
|
|
||||||
|
cpp_inherit.i:52: Warning 401: Base class 'Base< int >' has no name as it is an empty template instantiated with '%template()'. Ignored.
|
||||||
|
cpp_inherit.i:51: Warning 401: The %template directive must be written before 'Base< int >' is used as a base class and be declared with a name.
|
||||||
|
|
||||||
|
|
||||||
|
2012-09-11: wsfulton
|
||||||
|
[Java] Fix #3535304 - Direct use of a weak global reference in directors
|
||||||
|
sometimes causing seg faults especially on Android.
|
||||||
|
|
||||||
|
2012-09-06: wsfulton
|
||||||
|
[Java] Fix (char *STRING, size_t LENGTH) typemaps to accept NULL string.
|
||||||
|
|
||||||
|
2012-08-26: drjoe
|
||||||
|
[R] make ExternalReference slot ref to contain reference
|
||||||
|
|
||||||
|
2012-08-26: drjoe
|
||||||
|
[R] fix Examples/Makefile to use C in $(CC) rather than $(CXX)
|
||||||
|
|
||||||
Version 2.0.8 (20 August 2012)
|
Version 2.0.8 (20 August 2012)
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
|
|
|
||||||
156
CHANGES.current
156
CHANGES.current
|
|
@ -2,157 +2,9 @@ Below are the changes for the current release.
|
||||||
See the CHANGES file for changes in older releases.
|
See the CHANGES file for changes in older releases.
|
||||||
See the RELEASENOTES file for a summary of changes in each release.
|
See the RELEASENOTES file for a summary of changes in each release.
|
||||||
|
|
||||||
Version 2.0.9 (16 December 2012)
|
Version 2.0.10 (in progress)
|
||||||
================================
|
============================
|
||||||
|
|
||||||
2012-12-16: wsfulton
|
2013-01-03: wsfulton
|
||||||
Fix garbage line number / empty file name reporting for some missing
|
Pull patch from BrantKyser to fix directors and nspace feature when multilevel namespaces are used.
|
||||||
'}' or ')' error messages.
|
|
||||||
|
|
||||||
2012-12-15: kkaempf
|
|
||||||
[Ruby] Apply patch 3530444, Class#methods and Class#constants returns array of
|
|
||||||
symbols in Ruby 1.9+
|
|
||||||
|
|
||||||
2012-12-14: kkaempf
|
|
||||||
[Ruby] Apply patch 3530439 and finally replace all occurences of the STR2CSTR() macro
|
|
||||||
with StringValuePtr(). STR2CSTR was deprecated since years and got removed in Ruby 1.9
|
|
||||||
|
|
||||||
2012-12-14: kkaempf
|
|
||||||
[Ruby] Applied patches #3530442 and 3530443 to adapt compile and runtime include
|
|
||||||
paths to match Ruby 1.9+
|
|
||||||
|
|
||||||
2012-12-14: wsfulton
|
|
||||||
[CFFI] Fix #3161614 - Some string constants are incorrect
|
|
||||||
|
|
||||||
2012-12-13: wsfulton
|
|
||||||
[CFFI] Fix #3529690 - Fix incorrect constant names.
|
|
||||||
|
|
||||||
2012-12-12: drjoe
|
|
||||||
[R] add fix to finalizer that was missed earlier
|
|
||||||
|
|
||||||
2012-12-11: wsfulton
|
|
||||||
[Python] Apply patch #3590522 - fully qualified package paths for Python 3 even if a module is in the
|
|
||||||
same package.
|
|
||||||
|
|
||||||
2012-12-08: wsfulton
|
|
||||||
[Python] Bug #3563647 - PyInt_FromSize_t unavailable prior to Python 2.5 for unsigned int types.
|
|
||||||
|
|
||||||
2012-12-08: wsfulton
|
|
||||||
[Perl] Fix bug #3571361 - C++ comment in C wrappers.
|
|
||||||
|
|
||||||
2012-12-07: wsfulton
|
|
||||||
[C#] Apply patch #3571029 which adds missing director support for const unsigned long long &.
|
|
||||||
|
|
||||||
2012-11-28: kwwette
|
|
||||||
[Octave] Simplified module loading: now just the syntax
|
|
||||||
$ example;
|
|
||||||
is accepted, which loads functions globally but constants and variables relative to the current scope.
|
|
||||||
This make module loading behaviour reliably consistent, and reduces problems when loading modules which
|
|
||||||
depend on other modules which may not have been previously loaded.
|
|
||||||
|
|
||||||
2012-11-27: wsfulton
|
|
||||||
[cffi] Fix junk output when wrapping single character literal constants.
|
|
||||||
|
|
||||||
2012-11-17: wsfulton
|
|
||||||
[Tcl, Modula3] Add missing support for -outdir.
|
|
||||||
|
|
||||||
2012-11-17: wsfulton
|
|
||||||
Fix segfaults when using filename paths greater than 1024 characters in length.
|
|
||||||
|
|
||||||
2012-11-14: wsfulton
|
|
||||||
[ccache-swig] Apply patch #3586392 from Frederik Deweerdt to fix some error cases - incorrectly using
|
|
||||||
memory after it has been deleted.
|
|
||||||
|
|
||||||
2012-11-09: vzeitlin
|
|
||||||
[Python] Fix overflow when passing values greater than LONG_MAX from Python 3 for parameters with unsigned long C type.
|
|
||||||
|
|
||||||
2012-11-09: wsfulton
|
|
||||||
Fix some feature matching issues for implicit destructors and implicit constructors and implicit
|
|
||||||
copy constructors added with %copyctor. Previously a feature for these had to be fully qualified
|
|
||||||
in order to match. Now the following will also match:
|
|
||||||
|
|
||||||
%feature("xyz") ~XXX();
|
|
||||||
struct XXX {};
|
|
||||||
|
|
||||||
2012-11-09: wsfulton
|
|
||||||
Further consistency in named output typemap lookups for implicit constructors and destructors and
|
|
||||||
implicit copy constructors added with %copyctor. Previously only the fully qualified name was being
|
|
||||||
used, now the unqualified name will also be used. For example, previously:
|
|
||||||
|
|
||||||
example.i:38: Searching for a suitable 'out' typemap for: void Space::More::~More
|
|
||||||
Looking for: void Space::More::~More
|
|
||||||
Looking for: void
|
|
||||||
|
|
||||||
Now the unqualified name is also used:
|
|
||||||
|
|
||||||
example.i:38: Searching for a suitable 'out' typemap for: void Space::More::~More
|
|
||||||
Looking for: void Space::More::~More
|
|
||||||
Looking for: void ~More
|
|
||||||
Looking for: void
|
|
||||||
|
|
||||||
2012-11-02: wsfulton
|
|
||||||
Fix some subtle named output typemap lookup misses, the fully qualified name was not always being
|
|
||||||
used for variables, for example:
|
|
||||||
|
|
||||||
struct Glob {
|
|
||||||
int MyVar;
|
|
||||||
};
|
|
||||||
|
|
||||||
Previously the search rules (as shown by -debug-tmsearch) for the getter wrapper were:
|
|
||||||
|
|
||||||
example.i:44: Searching for a suitable 'out' typemap for: int MyVar
|
|
||||||
Looking for: int MyVar
|
|
||||||
Looking for: int
|
|
||||||
|
|
||||||
Now the scope is named correctly:
|
|
||||||
|
|
||||||
example.i:44: Searching for a suitable 'out' typemap for: int Glob::MyVar
|
|
||||||
Looking for: int Glob::MyVar
|
|
||||||
Looking for: int MyVar
|
|
||||||
Looking for: int
|
|
||||||
|
|
||||||
2012-10-26: wsfulton
|
|
||||||
Fix director typemap searching so that a typemap specified with a name will be correctly matched. Previously
|
|
||||||
the name was ignored during the typemap search. Applies to the following list of typemaps:
|
|
||||||
directorout, csdirectorout, cstype, imtype, ctype, ddirectorout, dtype, gotype, jtype, jni, javadirectorout.
|
|
||||||
|
|
||||||
2012-10-11: wsfulton
|
|
||||||
Most of the special variables available for use in %exception are now also available for expansion in
|
|
||||||
%extend blocks. These are: $name $symname $overname $decl $fulldecl $parentname $parentsymname, see docs
|
|
||||||
on "Class extension" in SWIGPlus.html. Patch based on submission from Kris Thielemans.
|
|
||||||
|
|
||||||
2012-10-10: wsfulton
|
|
||||||
Additional new special variables in %exception are expanded as follows:
|
|
||||||
$parentname - The parent class name (if any) for a method.
|
|
||||||
$parentsymname - The target language parent class name (if any) for a method.
|
|
||||||
|
|
||||||
2012-10-08: iant
|
|
||||||
[Go] Generating Go code now requires using the -intgosize option to
|
|
||||||
indicate the size of the 'int' type in Go. This is because the
|
|
||||||
size of the type is changing from Go 1.0 to Go 1.1 for x86_64.
|
|
||||||
|
|
||||||
2012-09-14: wsfulton
|
|
||||||
Add new warning if the empty template instantiation is used as a base class, for example:
|
|
||||||
|
|
||||||
template <typename T> class Base {};
|
|
||||||
%template() Base<int>;
|
|
||||||
class Derived : public Base<int> {};
|
|
||||||
|
|
||||||
gives the following warning instead of silently ignoring the base:
|
|
||||||
|
|
||||||
cpp_inherit.i:52: Warning 401: Base class 'Base< int >' has no name as it is an empty template instantiated with '%template()'. Ignored.
|
|
||||||
cpp_inherit.i:51: Warning 401: The %template directive must be written before 'Base< int >' is used as a base class and be declared with a name.
|
|
||||||
|
|
||||||
|
|
||||||
2012-09-11: wsfulton
|
|
||||||
[Java] Fix #3535304 - Direct use of a weak global reference in directors
|
|
||||||
sometimes causing seg faults especially on Android.
|
|
||||||
|
|
||||||
2012-09-06: wsfulton
|
|
||||||
[Java] Fix (char *STRING, size_t LENGTH) typemaps to accept NULL string.
|
|
||||||
|
|
||||||
2012-08-26: drjoe
|
|
||||||
[R] make ExternalReference slot ref to contain reference
|
|
||||||
|
|
||||||
2012-08-26: drjoe
|
|
||||||
[R] fix Examples/Makefile to use C in $(CC) rather than $(CXX)
|
|
||||||
|
|
|
||||||
|
|
@ -3536,7 +3536,7 @@ If you wish for a new language module to be distributed with SWIG,
|
||||||
which we encourage for all popular languages, there are a few requirements.
|
which we encourage for all popular languages, there are a few requirements.
|
||||||
While we appreciate that getting all aspects of a new language working
|
While we appreciate that getting all aspects of a new language working
|
||||||
won't happen at the outset, there are a set of minimum requirements before
|
won't happen at the outset, there are a set of minimum requirements before
|
||||||
a module can be committed into the SVN repository for distribution with future
|
a module can be committed into the official Github repository for distribution with future
|
||||||
versions of SWIG. The following are really a summary of this whole section with
|
versions of SWIG. The following are really a summary of this whole section with
|
||||||
details being outlined earlier on.
|
details being outlined earlier on.
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -3578,7 +3578,7 @@ details being outlined earlier on.
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Once accepted into SVN, development efforts should concentrate on
|
Once accepted into the official Git repository, development efforts should concentrate on
|
||||||
getting the entire test-suite to work with plenty of runtime tests.
|
getting the entire test-suite to work with plenty of runtime tests.
|
||||||
Runtime tests should be for existing testcases and new test cases
|
Runtime tests should be for existing testcases and new test cases
|
||||||
should be added should there be an area not already covered by
|
should be added should there be an area not already covered by
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ about this can be obtained at:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class="shell"><pre>
|
<div class="shell"><pre>
|
||||||
<a href="http://www.swig.org/svn.html">http://www.swig.org/svn.html</a>
|
<a href="http://www.swig.org/svn.html">SWIG Bleeding Edge</a>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<body bgcolor="#ffffff">
|
<body bgcolor="#ffffff">
|
||||||
<H1><a name="Sections"></a>SWIG-2.0 Documentation</H1>
|
<H1><a name="Sections"></a>SWIG-2.0 Documentation</H1>
|
||||||
|
|
||||||
Last update : SWIG-2.0.9 (16 December 2012)
|
Last update : SWIG-2.0.10 (in progress)
|
||||||
|
|
||||||
<H2>Sections</H2>
|
<H2>Sections</H2>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -236,8 +236,8 @@ The short abbreviated instructions follow...
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
The step by step instructions to download and install MinGW and MSYS, then download and build the latest version of SWIG from SVN follow...
|
The step by step instructions to download and install MinGW and MSYS, then download and build the latest version of SWIG from Github follow...
|
||||||
Note that the instructions for obtaining SWIG from SVN are also online at <a href="http://www.swig.org/svn.html">SWIG SVN</a>.
|
Note that the instructions for obtaining SWIG from Github are also online at <a href="http://www.swig.org/svn.html">SWIG Bleeding Edge</a>.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -300,15 +300,19 @@ tar -zxf bison-2.0-MSYS.tar.gz
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
To get the latest SWIG SVN (version from Subversion source control), type in the following:
|
The very latest development version of SWIG is available from <a href="https://github.com/swig/swig">SWIG on Github</a>
|
||||||
|
and can be downloaded as a zip file or if you have Git installed, via Git.
|
||||||
|
Either download the latest <a href="https://github.com/swig/swig/archive/master.zip">Zip file</a> snapshot and unzip and rename the top level folder to /usr/src/swig.
|
||||||
|
|
||||||
|
Otherwise if using Git, type in the following:
|
||||||
<div class="shell"><pre>
|
<div class="shell"><pre>
|
||||||
mkdir /usr/src
|
mkdir /usr/src
|
||||||
cd /usr/src
|
cd /usr/src
|
||||||
svn co https://swig.svn.sourceforge.net/svnroot/swig/trunk swig
|
git clone https://github.com/swig/swig.git
|
||||||
</pre></div>
|
</pre></div>
|
||||||
|
|
||||||
<b>Pitfall note:</b>
|
<b>Pitfall note:</b>
|
||||||
If you want to check out SWIG to a different folder to the proposed
|
If you want to place SWIG in a different folder to the proposed
|
||||||
/usr/src/swig, do not use MSYS emulated windows drive letters, because
|
/usr/src/swig, do not use MSYS emulated windows drive letters, because
|
||||||
the autotools will fail miserably on those.
|
the autotools will fail miserably on those.
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ public class bools_runme {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class director_nspace_MyBarFoo : director_nspaceNamespace.Bar.Foo {
|
class director_nspace_MyBarFoo : director_nspaceNamespace.TopLevel.Bar.Foo {
|
||||||
|
|
||||||
public override String ping() {
|
public override String ping() {
|
||||||
return "director_nspace_MyBarFoo.ping();";
|
return "director_nspace_MyBarFoo.ping();";
|
||||||
|
|
@ -18,15 +18,15 @@ class director_nspace_MyBarFoo : director_nspaceNamespace.Bar.Foo {
|
||||||
return "director_nspace_MyBarFoo.pong();" + ping();
|
return "director_nspace_MyBarFoo.pong();" + ping();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override String fooBar(director_nspaceNamespace.Bar.FooBar fooBar) {
|
public override String fooBar(director_nspaceNamespace.TopLevel.Bar.FooBar fooBar) {
|
||||||
return fooBar.FooBarDo();
|
return fooBar.FooBarDo();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override director_nspaceNamespace.Bar.Foo makeFoo() {
|
public override director_nspaceNamespace.TopLevel.Bar.Foo makeFoo() {
|
||||||
return new director_nspaceNamespace.Bar.Foo();
|
return new director_nspaceNamespace.TopLevel.Bar.Foo();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override director_nspaceNamespace.Bar.FooBar makeFooBar() {
|
public override director_nspaceNamespace.TopLevel.Bar.FooBar makeFooBar() {
|
||||||
return new director_nspaceNamespace.Bar.FooBar();
|
return new director_nspaceNamespace.TopLevel.Bar.FooBar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ SWIG_JAVABODY_TYPEWRAPPER(public, public, public, SWIGTYPE)
|
||||||
%{
|
%{
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
namespace TopLevel
|
||||||
|
{
|
||||||
namespace Bar
|
namespace Bar
|
||||||
{
|
{
|
||||||
class FooBar {
|
class FooBar {
|
||||||
|
|
@ -31,6 +33,7 @@ namespace Bar
|
||||||
static Foo* get_self(Foo *self_) {return self_;}
|
static Foo* get_self(Foo *self_) {return self_;}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
@ -38,14 +41,16 @@ namespace Bar
|
||||||
|
|
||||||
// nspace feature only supported by these languages
|
// nspace feature only supported by these languages
|
||||||
#if defined(SWIGJAVA) || defined(SWIGCSHARP) || defined(SWIGD)
|
#if defined(SWIGJAVA) || defined(SWIGCSHARP) || defined(SWIGD)
|
||||||
%nspace Bar::Foo;
|
%nspace TopLevel::Bar::Foo;
|
||||||
%nspace Bar::FooBar;
|
%nspace TopLevel::Bar::FooBar;
|
||||||
#else
|
#else
|
||||||
#warning nspace feature not yet supported in this target language
|
#warning nspace feature not yet supported in this target language
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
%feature("director") Bar::Foo;
|
%feature("director") TopLevel::Bar::Foo;
|
||||||
|
|
||||||
|
namespace TopLevel
|
||||||
|
{
|
||||||
namespace Bar
|
namespace Bar
|
||||||
{
|
{
|
||||||
class FooBar {
|
class FooBar {
|
||||||
|
|
@ -71,3 +76,4 @@ namespace Bar
|
||||||
static Foo* get_self(Foo *self_);
|
static Foo* get_self(Foo *self_);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ public class director_nspace_runme {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class director_nspace_MyBarFoo extends director_nspacePackage.Bar.Foo {
|
class director_nspace_MyBarFoo extends director_nspacePackage.TopLevel.Bar.Foo {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String ping() {
|
public String ping() {
|
||||||
|
|
@ -32,17 +32,17 @@ class director_nspace_MyBarFoo extends director_nspacePackage.Bar.Foo {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String fooBar(director_nspacePackage.Bar.FooBar fooBar) {
|
public String fooBar(director_nspacePackage.TopLevel.Bar.FooBar fooBar) {
|
||||||
return fooBar.FooBarDo();
|
return fooBar.FooBarDo();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public director_nspacePackage.Bar.Foo makeFoo() {
|
public director_nspacePackage.TopLevel.Bar.Foo makeFoo() {
|
||||||
return new director_nspacePackage.Bar.Foo();
|
return new director_nspacePackage.TopLevel.Bar.Foo();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public director_nspacePackage.Bar.FooBar makeFooBar() {
|
public director_nspacePackage.TopLevel.Bar.FooBar makeFooBar() {
|
||||||
return new director_nspacePackage.Bar.FooBar();
|
return new director_nspacePackage.TopLevel.Bar.FooBar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
2
README
2
README
|
|
@ -1,6 +1,6 @@
|
||||||
SWIG (Simplified Wrapper and Interface Generator)
|
SWIG (Simplified Wrapper and Interface Generator)
|
||||||
|
|
||||||
Version: 2.0.9 (16 December 2012)
|
Version: 2.0.10 (in progress)
|
||||||
|
|
||||||
Tagline: SWIG is a compiler that integrates C and C++ with languages
|
Tagline: SWIG is a compiler that integrates C and C++ with languages
|
||||||
including Perl, Python, Tcl, Ruby, PHP, Java, Ocaml, Lua,
|
including Perl, Python, Tcl, Ruby, PHP, Java, Ocaml, Lua,
|
||||||
|
|
|
||||||
|
|
@ -4256,8 +4256,13 @@ public:
|
||||||
Wrapper *w = NewWrapper();
|
Wrapper *w = NewWrapper();
|
||||||
|
|
||||||
if (Len(package_path) > 0)
|
if (Len(package_path) > 0)
|
||||||
if (Len(getNSpace()) > 0)
|
if (Len(getNSpace()) > 0) {
|
||||||
internal_classname = NewStringf("%s/%s/%s", package_path, getNSpace(), classname);
|
internal_classname = NewStringf("%s/%s/%s", package_path, getNSpace(), classname);
|
||||||
|
|
||||||
|
// If the namespace is multiple levels, the result of getNSpace() will have inserted
|
||||||
|
// .'s to delimit namespaces, so we need to replace those with /'s
|
||||||
|
Replace(internal_classname, ".", "/", DOH_REPLACE_ANY);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
internal_classname = NewStringf("%s/%s", package_path, classname);
|
internal_classname = NewStringf("%s/%s", package_path, classname);
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script.
|
||||||
dnl The macros which aren't shipped with the autotools are stored in the
|
dnl The macros which aren't shipped with the autotools are stored in the
|
||||||
dnl Tools/config directory in .m4 files.
|
dnl Tools/config directory in .m4 files.
|
||||||
|
|
||||||
AC_INIT([swig],[2.0.9],[http://www.swig.org])
|
AC_INIT([swig],[2.0.10],[http://www.swig.org])
|
||||||
|
|
||||||
dnl NB: When this requirement is increased to 2.60 or later, AC_PROG_SED
|
dnl NB: When this requirement is increased to 2.60 or later, AC_PROG_SED
|
||||||
dnl definition below can be removed
|
dnl definition below can be removed
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue