Commit 50349b0e authored by Torsten Landschoff's avatar Torsten Landschoff

Import upstream release 3.0.5 from swig-3.0.5.tar.gz

parent ecf48a2c
...@@ -50,14 +50,21 @@ matrix: ...@@ -50,14 +50,21 @@ matrix:
env: SWIGLANG=python SWIG_FEATURES=-builtin env: SWIGLANG=python SWIG_FEATURES=-builtin
- compiler: gcc - compiler: gcc
env: SWIGLANG=python SWIG_FEATURES=-builtin PY3=3 env: SWIGLANG=python SWIG_FEATURES=-builtin PY3=3
- compiler: gcc
env: SWIGLANG=python SWIG_FEATURES=-classic
- compiler: gcc - compiler: gcc
env: SWIGLANG=ruby env: SWIGLANG=ruby
- compiler: gcc
env: SWIGLANG=scilab
- compiler: gcc - compiler: gcc
env: SWIGLANG=tcl env: SWIGLANG=tcl
allow_failures: allow_failures:
# Occasional gcc internal compiler error # Occasional gcc internal compiler error
- compiler: gcc - compiler: gcc
env: SWIGLANG=octave SWIGJOBS=-j3 VER=3.8 env: SWIGLANG=octave SWIGJOBS=-j3 VER=3.8
# Not quite working yet
- compiler: gcc
env: SWIGLANG=python SWIG_FEATURES=-classic
before_install: before_install:
- date -u - date -u
- uname -a - uname -a
...@@ -79,6 +86,7 @@ before_install: ...@@ -79,6 +86,7 @@ before_install:
- if test "$SWIGLANG" = "python"; then git clone https://github.com/jcrocholl/pep8.git && pushd pep8 && git checkout tags/1.5.7 && python ./setup.py build && sudo python ./setup.py install && popd; fi - if test "$SWIGLANG" = "python"; then git clone https://github.com/jcrocholl/pep8.git && pushd pep8 && git checkout tags/1.5.7 && python ./setup.py build && sudo python ./setup.py install && popd; fi
- if test "$SWIGLANG" = "python" -a "$PY3" -a -z "$VER"; then sudo apt-get install -qq python3-dev; fi - if test "$SWIGLANG" = "python" -a "$PY3" -a -z "$VER"; then sudo apt-get install -qq python3-dev; fi
- if test "$SWIGLANG" = "python" -a "$VER"; then sudo add-apt-repository -y ppa:fkrull/deadsnakes && sudo apt-get -qq update && sudo apt-get -qq install python${VER}-dev && export CONFIGOPTS="--with-python${PY3}=python${VER}"; fi - if test "$SWIGLANG" = "python" -a "$VER"; then sudo add-apt-repository -y ppa:fkrull/deadsnakes && sudo apt-get -qq update && sudo apt-get -qq install python${VER}-dev && export CONFIGOPTS="--with-python${PY3}=python${VER}"; fi
- if test "$SWIGLANG" = "scilab"; then sudo apt-get -qq install scilab; fi
- if test "$SWIGLANG" = "tcl"; then sudo apt-get -qq install tcl8.4-dev; fi - if test "$SWIGLANG" = "tcl"; then sudo apt-get -qq install tcl8.4-dev; fi
# Stricter compile flags for examples. Various headers and SWIG generated code prevents full use of -pedantic. # Stricter compile flags for examples. Various headers and SWIG generated code prevents full use of -pedantic.
- declare -A CFLAGS_EXAMPLES && CFLAGS_EXAMPLES=( - declare -A CFLAGS_EXAMPLES && CFLAGS_EXAMPLES=(
...@@ -95,6 +103,7 @@ before_install: ...@@ -95,6 +103,7 @@ before_install:
["python"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type" ["python"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
["ruby"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type" ["ruby"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
["tcl"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type" ["tcl"]="-Werror -std=gnu89 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
["scilab"]="-Werror -std=gnu89 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
) )
- declare -A CXXFLAGS_EXAMPLES && CXXFLAGS_EXAMPLES=( - declare -A CXXFLAGS_EXAMPLES && CXXFLAGS_EXAMPLES=(
["csharp"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type" ["csharp"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
...@@ -110,6 +119,7 @@ before_install: ...@@ -110,6 +119,7 @@ before_install:
["python"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type" ["python"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
["ruby"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type" ["ruby"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
["tcl"]="-Werror -std=c++98 -fdiagnostics-show-option -Wno-long-long -Wreturn-type" ["tcl"]="-Werror -std=c++98 -fdiagnostics-show-option -Wno-long-long -Wreturn-type"
["scilab"]="-Werror -std=c++98 -fdiagnostics-show-option -pedantic -Wno-long-long -Wreturn-type"
) )
- $CC --version - $CC --version
- $CXX --version - $CXX --version
......
*** ANNOUNCE: SWIG 3.0.4 (14 Jan 2015) *** *** ANNOUNCE: SWIG 3.0.5 (31 Jan 2015) ***
http://www.swig.org http://www.swig.org
We're pleased to announce SWIG-3.0.4, the latest SWIG release. We're pleased to announce SWIG-3.0.5, the latest SWIG release.
What is SWIG? What is SWIG?
============= =============
...@@ -21,11 +21,11 @@ Availability ...@@ -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-3.0.4.tar.gz http://prdownloads.sourceforge.net/swig/swig-3.0.5.tar.gz
A Windows version is also available at A Windows version is also available at
http://prdownloads.sourceforge.net/swig/swigwin-3.0.4.zip http://prdownloads.sourceforge.net/swig/swigwin-3.0.5.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.
......
...@@ -3,6 +3,41 @@ SWIG (Simplified Wrapper and Interface Generator) ...@@ -3,6 +3,41 @@ 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 3.0.4 (14 Jan 2015)
===========================
2015-01-12: olly
[PHP] Fix segfault in director upcall check when using PHP built with
ZTS enabled. Fixes #155, reported by Pierre Labastie.
2015-01-12: vadz
[Python] Fix #294 #296 - Regression introduced in SWIG-3.0.3 when
wrapping functions with default arguments. Invalid or missing default
arguments were sometimes being generated into the python layer.
2015-01-08: olly
Allow C++11 "explicit constexpr". Fixes github issue #284 reported
by Pawel Tomulik. Also handle "constexpr explicit" and "constexpr
static".
2015-01-08: olly
When reporting an error for a construct which hasn't been
terminated when the end of the file is reached, report it at the
start line rather than "EOF" as then tools like editors and IDEs
will take you to a generally more useful place for fixing the
problem.
2015-01-08: olly
Improve error messages for a few cases which previously gave the
one of the cryptic catch-all errors "Syntax error in input".
2015-01-08: olly
Provide -cppext as a general command line option for setting the
extension used for generated C++ files (previously it was specific
to the PHP backend). Deprecate the equivalent -suffix option
provided by the Ocaml backend, but continue to support that for
now.
Version 3.0.3 (30 Dec 2014) Version 3.0.3 (30 Dec 2014)
=========================== ===========================
......
...@@ -2,37 +2,33 @@ Below are the changes for the current release. ...@@ -2,37 +2,33 @@ 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 3.0.4 (14 Jan 2015) Version 3.0.5 (31 Jan 2015)
=========================== ===========================
2015-01-12: olly 2015-01-30: wsfulton
[PHP] Fix segfault in director upcall check when using PHP built with [Python] Fix Python -classic and property setting. Setting properties on classic classes
ZTS enabled. Fixes #155, reported by Pierre Labastie. was broken in swig-3.0.3 by attempting to use __setattr__. This regression is fixed now
by using __dict__ again when using -classic.
2015-01-12: vadz Fixes patch #232.
[Python] Fix #294 #296 - Regression introduced in SWIG-3.0.3 when
wrapping functions with default arguments. Invalid or missing default 2015-01-27: smarchetto
arguments were sometimes being generated into the python layer. [Scilab] Support for the Scilab language has been added
2015-01-08: olly 2015-01-23: olly
Allow C++11 "explicit constexpr". Fixes github issue #284 reported [PHP] When wrapping a returned resource as an object, check if all
by Paweł Tomulik. Also handle "constexpr explicit" and "constexpr cases wrap it in the same class, and if so eliminate the pointless
static". switch statement wrapper we previously generated.
2015-01-08: olly 2015-01-22: wsfulton
When reporting an error for a construct which hasn't been [Octave] Merge patch #297 for SF bug #1277 - Octave shared_ptr support
terminated when the end of the file is reached, report it at the
start line rather than "EOF" as then tools like editors and IDEs 2015-01-15: wsfulton
will take you to a generally more useful place for fixing the [Python] Merge patch #250 - Fixes for using %constant and objects (non-primitive types)
problem.
2015-01-15: wsfulton
2015-01-08: olly [C# Go] Merge patch #308 and fix #307 - C++11 strongly typed enum support
Improve error messages for a few cases which previously gave the in directors
one of the cryptic catch-all errors "Syntax error in input".
2015-01-15: wsfulton
2015-01-08: olly [Python] Second fix for #294 #296 - Regression introduced in SWIG-3.0.3 when
Provide -cppext as a general command line option for setting the wrapping functions with default arguments, this time when using kwargs.
extension used for generated C++ files (previously it was specific
to the PHP backend). Deprecate the equivalent -suffix option
provided by the Ocaml backend, but continue to support that for
now.
...@@ -11,57 +11,62 @@ Portions also copyrighted by: ...@@ -11,57 +11,62 @@ Portions also copyrighted by:
Information-technology Promotion Agency, Japan Information-technology Promotion Agency, Japan
Active SWIG Developers: Active SWIG Developers:
William Fulton (wsf@fultondesigns.co.uk) (SWIG core, Java, C#, Windows, Cygwin) William Fulton (wsf@fultondesigns.co.uk) (SWIG core, Java, C#, Windows, Cygwin)
Olly Betts (olly@survex.com) (PHP) Olly Betts (olly@survex.com) (PHP)
Joseph Wang (joequant@gmail.com) (R) Joseph Wang (joequant@gmail.com) (R)
Xavier Delacour (xavier.delacour@gmail.com) (Octave) Xavier Delacour (xavier.delacour@gmail.com) (Octave)
David Nadlinger (code@klickverbot.at) (D) David Nadlinger (code@klickverbot.at) (D)
Oliver Buchtala (oliver.buchtala@gmail.com) (Javascript) Oliver Buchtala (oliver.buchtala@gmail.com) (Javascript)
Neha Narang (narangneha03@gmail.com) (Javascript) Neha Narang (narangneha03@gmail.com) (Javascript)
Simon Marchetto (simon.marchetto@scilab-enterprises.com) (Scilab)
Past SWIG developers and major contributors include: Past SWIG developers and major contributors include:
Dave Beazley (dave-swig@dabeaz.com) (SWIG core, Python, Tcl, Perl) Dave Beazley (dave-swig@dabeaz.com) (SWIG core, Python, Tcl, Perl)
Henning Thielemann (swig@henning-thielemann.de) (Modula3) Henning Thielemann (swig@henning-thielemann.de) (Modula3)
Matthias Köppe (mkoeppe@mail.math.uni-magdeburg.de) (Guile, MzScheme) Matthias Köppe (mkoeppe@mail.math.uni-magdeburg.de) (Guile, MzScheme)
Luigi Ballabio (luigi.ballabio@fastwebnet.it) (STL wrapping) Luigi Ballabio (luigi.ballabio@fastwebnet.it) (STL wrapping)
Mikel Bancroft (mikel@franz.com) (Allegro CL) Mikel Bancroft (mikel@franz.com) (Allegro CL)
Surendra Singhi (efuzzyone@netscape.net) (CLISP, CFFI) Surendra Singhi (efuzzyone@netscape.net) (CLISP, CFFI)
Marcelo Matus (mmatus@acms.arizona.edu) (SWIG core, Python, UTL[python,perl,tcl,ruby]) Marcelo Matus (mmatus@acms.arizona.edu) (SWIG core, Python, UTL[python,perl,tcl,ruby])
Art Yerkes (ayerkes@speakeasy.net) (Ocaml) Art Yerkes (ayerkes@speakeasy.net) (Ocaml)
Lyle Johnson (lyle@users.sourceforge.net) (Ruby) Lyle Johnson (lyle@users.sourceforge.net) (Ruby)
Charlie Savage (cfis@interserv.com) (Ruby) Charlie Savage (cfis@interserv.com) (Ruby)
Thien-Thi Nguyen (ttn@glug.org) (build/test/misc) Thien-Thi Nguyen (ttn@glug.org) (build/test/misc)
Richard Palmer (richard@magicality.org) (PHP) Richard Palmer (richard@magicality.org) (PHP)
Sam Liddicott - Ananova Ltd (saml@liddicott.com) (PHP) Sam Liddicott - Ananova Ltd (saml@liddicott.com) (PHP)
Tim Hockin - Sun Microsystems (thockin@sun.com) (PHP) Tim Hockin - Sun Microsystems (thockin@sun.com) (PHP)
Kevin Ruland (PHP) Kevin Ruland (PHP)
Shibukawa Yoshiki (Japanese Translation) Shibukawa Yoshiki (Japanese Translation)
Jason Stewart (jason@openinformatics.com) (Perl5) Jason Stewart (jason@openinformatics.com) (Perl5)
Loic Dachary (Perl5) Loic Dachary (Perl5)
David Fletcher (Perl5) David Fletcher (Perl5)
Gary Holt (Perl5) Gary Holt (Perl5)
Masaki Fukushima (Ruby) Masaki Fukushima (Ruby)
Scott Michel (scottm@cs.ucla.edu) (Java directors) Scott Michel (scottm@cs.ucla.edu) (Java directors)
Tiger Feng (songyanf@cs.uchicago.edu) (SWIG core) Tiger Feng (songyanf@cs.uchicago.edu) (SWIG core)
Mark Rose (mrose@stm.lbl.gov) (Directors) Mark Rose (mrose@stm.lbl.gov) (Directors)
Jonah Beckford (beckford@usermail.com) (CHICKEN) Jonah Beckford (beckford@usermail.com) (CHICKEN)
Ahmon Dancy (dancy@franz.com) (Allegro CL) Ahmon Dancy (dancy@franz.com) (Allegro CL)
Dirk Gerrits (Allegro CL) Dirk Gerrits (Allegro CL)
Neil Cawse (C#) Neil Cawse (C#)
Harco de Hilster (Java) Harco de Hilster (Java)
Alexey Dyachenko (dyachenko@fromru.com) (Tcl) Alexey Dyachenko (dyachenko@fromru.com) (Tcl)
Bob Techentin (Tcl) Bob Techentin (Tcl)
Martin Froehlich <MartinFroehlich@ACM.org> (Guile) Martin Froehlich <MartinFroehlich@ACM.org> (Guile)
Marcio Luis Teixeira <marciot@holly.colostate.edu> (Guile) Marcio Luis Teixeira <marciot@holly.colostate.edu> (Guile)
Duncan Temple Lang (R) Duncan Temple Lang (R)
Miklos Vajna <vmiklos@frugalware.org> (PHP directors) Miklos Vajna <vmiklos@frugalware.org> (PHP directors)
Mark Gossage (mark@gossage.cjb.net) (Lua) Mark Gossage (mark@gossage.cjb.net) (Lua)
Raman Gopalan (ramangopalan@gmail.com) (eLua) Raman Gopalan (ramangopalan@gmail.com) (eLua)
Gonzalo Garramuno (ggarra@advancedsl.com.ar) (Ruby, Ruby's UTL) Gonzalo Garramuno (ggarra@advancedsl.com.ar) (Ruby, Ruby's UTL)
John Lenz (Guile, MzScheme updates, Chicken module, runtime system) John Lenz (Guile, MzScheme updates, Chicken module, runtime system)
Ian Lance Taylor (Go) Baozeng Ding <sploving1@163.com> (Scilab)
Vadim Zeitlin (PCRE) Ian Lance Taylor (Go)
Stefan Zager (szager@gmail.com) (Python) Vadim Zeitlin (PCRE)
Stefan Zager (szager@gmail.com) (Python)
Vincent Couvert (Scilab)
Sylvestre Ledru (Scilab)
Wolfgang Frisch (Scilab)
Past contributors include: Past contributors include:
James Michael DuPont, Clark McGrew, Dustin Mitchell, Ian Cooke, Catalin Dumitrescu, Baran James Michael DuPont, Clark McGrew, Dustin Mitchell, Ian Cooke, Catalin Dumitrescu, Baran
......
This diff is collapsed.
...@@ -1727,7 +1727,76 @@ ...@@ -1727,7 +1727,76 @@
</div> </div>
<!-- INDEX --> <!-- INDEX -->
<h3><a href="Tcl.html#Tcl">39 SWIG and Tcl</a></h3> <h3><a href="Scilab.html#Scilab">39 SWIG and Scilab</a></h3>
<!-- INDEX -->
<div class="sectiontoc">
<ul>
<li><a href="Scilab.html#Scilab_preliminaries">Preliminaries</a>
<li><a href="Scilab.html#Scilab_running_swig">Running SWIG</a>
<ul>
<li><a href="Scilab.html#Scilab_running_swig_generating_module">Generating the module</a>
<li><a href="Scilab.html#Scilab_running_swig_building_module">Building the module</a>
<li><a href="Scilab.html#Scilab_running_swig_loading_module">Loading the module</a>
<li><a href="Scilab.html#Scilab_running_swig_using_module">Using the module</a>
<li><a href="Scilab.html#Scilab_running_swig_options">Scilab command line options</a>
</ul>
<li><a href="Scilab.html#Scilab_wrapping">A basic tour of C/C++ wrapping</a>
<ul>
<li><a href="Scilab.html#Scilab_wrapping_overview">Overview</a>
<li><a href="Scilab.html#Scilab_wrapping_identifiers">Identifiers</a>
<li><a href="Scilab.html#Scilab_wrapping_functions">Functions</a>
<ul>
<li><a href="Scilab.html#Scilab_nn13">Argument passing</a>
<li><a href="Scilab.html#Scilab_nn14">Multiple output arguments</a>
</ul>
<li><a href="Scilab.html#Scilab_wrapping_global_variables">Global variables</a>
<li><a href="Scilab.html#Scilab_wrapping_constants_and_enums">Constants and enumerations</a>
<ul>
<li><a href="Scilab.html#Scilab_wrapping_constants">Constants</a>
<li><a href="Scilab.html#Scilab_wrapping_enums">Enumerations</a>
</ul>
<li><a href="Scilab.html#Scilab_wrapping_pointers">Pointers</a>
<ul>
<li><a href="Scilab.html#Scilab_wrapping_pointers_pointer_adresses">Utility functions</a>
<li><a href="Scilab.html#Scilab_wrapping_pointers_null_pointers">Null pointers</a>
</ul>
<li><a href="Scilab.html#Scilab_wrapping_structs">Structures</a>
<li><a href="Scilab.html#Scilab_wrapping_cpp_classes">C++ Classes</a>
<li><a href="Scilab.html#Scilab_wrapping_cpp_inheritance">C++ inheritance</a>
<li><a href="Scilab.html#Scilab_wrapping_pointers_references_values_arrays">Pointers, references, values, and arrays</a>
<li><a href="Scilab.html#Scilab_wrapping_cpp_templates">C++ templates</a>
<li><a href="Scilab.html#Scilab_wrapping_cpp_operators">C++ operators</a>
<li><a href="Scilab.html#Scilab_wrapping_cpp_namespaces">C++ namespaces</a>
<li><a href="Scilab.html#Scilab_wrapping_cpp_exceptions">C++ exceptions</a>
<li><a href="Scilab.html#Scilab_wrapping_cpp_stl">C++ STL</a>
</ul>
<li><a href="Scilab.html#Scilab_typemaps">Type mappings and libraries</a>
<ul>
<li><a href="Scilab.html#Scilab_typemaps_primitive_types">Default primitive type mappings</a>
<li><a href="Scilab.html#Scilab_typemaps_non-primitive_types">Default type mappings for non-primitive types</a>
<li><a href="Scilab.html#Scilab_typemaps_arrays">Arrays</a>
<li><a href="Scilab.html#Scilab_typemaps_pointer-to-pointers">Pointer-to-pointers</a>
<li><a href="Scilab.html#Scilab_typemaps_matrices">Matrices</a>
<li><a href="Scilab.html#Scilab_typemaps_stl">STL</a>
</ul>
<li><a href="Scilab.html#Scilab_module_initialization">Module initialization</a>
<li><a href="Scilab.html#Scilab_building_modes">Building modes</a>
<ul>
<li><a href="Scilab.html#Scilab_building_modes_nobuilder_mode">No-builder mode</a>
<li><a href="Scilab.html#Scilab_building_modes_builder_mode">Builder mode</a>
</ul>
<li><a href="Scilab.html#Scilab_generated_scripts">Generated scripts</a>
<ul>
<li><a href="Scilab.html#Scilab_generated_scripts_builder_script">Builder script</a>
<li><a href="Scilab.html#Scilab_generated_scripts_loader_script">Loader script</a>
</ul>
<li><a href="Scilab.html#Scilab_other_resources">Other resources</a>
</ul>
</div>
<!-- INDEX -->
<h3><a href="Tcl.html#Tcl">40 SWIG and Tcl</a></h3>
<!-- INDEX --> <!-- INDEX -->
<div class="sectiontoc"> <div class="sectiontoc">
...@@ -1793,7 +1862,7 @@ ...@@ -1793,7 +1862,7 @@
</div> </div>
<!-- INDEX --> <!-- INDEX -->
<h3><a href="Extending.html#Extending">40 Extending SWIG to support new languages</a></h3> <h3><a href="Extending.html#Extending">41 Extending SWIG to support new languages</a></h3>
<!-- INDEX --> <!-- INDEX -->
<div class="sectiontoc"> <div class="sectiontoc">
......
This diff is collapsed.
...@@ -334,8 +334,7 @@ major features include: ...@@ -334,8 +334,7 @@ major features include:
</ul> </ul>
<p> <p>
Currently, the only major C++ feature not supported is nested classes--a limitation Most of C++11 is also supported. Details are in the <a href="CPlusPlus11.html">C++11</a> section.
that should be removed in a future release, but has some workarounds for the moment.
</p> </p>
<p> <p>
......
...@@ -120,7 +120,7 @@ SWIG_JAVASCRIPT_JSC Defined when using Javascript for JavascriptCore ...@@ -120,7 +120,7 @@ SWIG_JAVASCRIPT_JSC Defined when using Javascript for JavascriptCore
SWIG_JAVASCRIPT_V8 Defined when using Javascript for v8 or node.js SWIG_JAVASCRIPT_V8 Defined when using Javascript for v8 or node.js
SWIGLUA Defined when using Lua SWIGLUA Defined when using Lua
SWIGMODULA3 Defined when using Modula-3 SWIGMODULA3 Defined when using Modula-3
SWIGMZSCHEME Defined when using Mzscheme SWIGMZSCHEME Defined when using Mzscheme
SWIGOCAML Defined when using Ocaml SWIGOCAML Defined when using Ocaml
SWIGOCTAVE Defined when using Octave SWIGOCTAVE Defined when using Octave
SWIGPERL Defined when using Perl SWIGPERL Defined when using Perl
...@@ -129,6 +129,7 @@ SWIGPIKE Defined when using Pike ...@@ -129,6 +129,7 @@ SWIGPIKE Defined when using Pike
SWIGPYTHON Defined when using Python SWIGPYTHON Defined when using Python
SWIGR Defined when using R SWIGR Defined when using R
SWIGRUBY Defined when using Ruby SWIGRUBY Defined when using Ruby
SWIGSCILAB Defined when using Scilab
SWIGSEXP Defined when using S-expressions SWIGSEXP Defined when using S-expressions
SWIGTCL Defined when using Tcl SWIGTCL Defined when using Tcl
SWIGXML Defined when using XML SWIGXML Defined when using XML
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -3614,18 +3614,52 @@ and the second will take two integer arguments. ...@@ -3614,18 +3614,52 @@ and the second will take two integer arguments.
</p> </p>
<p> <p>
Needless to say, SWIG's template support provides plenty of Needless to say, SWIG's template support provides plenty of opportunities to
opportunities to break the universe. That said, an important final break the universe. That said, an important final point is that <b>SWIG does
point is that <b>SWIG does not perform extensive error checking of not perform extensive error checking of templates!</b> Specifically, SWIG does
templates!</b> Specifically, SWIG does not perform type checking nor not perform type checking nor does it check to see if the actual contents of the
does it check to see if the actual contents of the template template declaration make any sense. Since the C++ compiler checks this when it
declaration make any sense. Since the C++ compiler will hopefully compiles the resulting wrapper file, there is no practical reason for SWIG to
check this when it compiles the resulting wrapper file, there is no duplicate this functionality.
practical reason for SWIG to duplicate this functionality (besides,
none of the SWIG developers are masochistic enough to want to
implement this right now).
</p> </p>
<a name="SWIGPlus_template_nested_class_example"></a>
<p>
As SWIG's template support does not perform type checking <tt>%template</tt>
can be used as early as after a template declaration. You can, and rarely have
to, use <tt>%template</tt> before the template parameters have been declared.
For example:
</p>
<div class="code">
<pre>
template &lt;class T&gt; class OuterTemplateClass {};
// The nested class OuterClass::InnerClass inherits from the template class
// OuterTemplateClass&lt;OuterClass::InnerStruct&gt; and thus the template needs
// to be expanded with %template before the OuterClass declaration.
%template(OuterTemplateClass_OuterClass__InnerStruct)
OuterTemplateClass&lt;OuterClass::InnerStruct&gt;
// Don't forget to use %feature("flatnested") for OuterClass::InnerStruct and
// OuterClass::InnerClass if the target language doesn't support nested classes.
class OuterClass {
public:
// Forward declarations:
struct InnerStruct;
class InnerClass;
};
struct OuterClass::InnerStruct {};
// Expanding the template at this point with %template is too late as the
// OuterClass::InnerClass declaration is processed inside OuterClass.
class OuterClass::InnerClass : public OuterTemplateClass&lt;InnerStruct&gt; {};
</pre>
</div>
<p> <p>
<b>Compatibility Note</b>: The first implementation of template support relied heavily on <b>Compatibility Note</b>: The first implementation of template support relied heavily on
macro expansion in the preprocessor. Templates have been more tightly integrated into macro expansion in the preprocessor. Templates have been more tightly integrated into
...@@ -5000,6 +5034,12 @@ class Bar { ...@@ -5000,6 +5034,12 @@ class Bar {
</pre> </pre>
</div> </div>
<p>
If a nested class, within an outer class, has to be used as a template parameter within the outer class, then the template will
have to be instantiated with <tt>%template</tt> before the beginning of the outer class.
An example can be found in the
<a href="#SWIGPlus_template_nested_class_example">Templates</a> section.
</p>
<p> <p>
<b>Compatibility Note:</b> <b>Compatibility Note:</b>
......
This diff is collapsed.
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<body bgcolor="#ffffff"> <body bgcolor="#ffffff">
<H1><a name="Sections"></a>SWIG-3.0 Documentation</H1> <H1><a name="Sections"></a>SWIG-3.0 Documentation</H1>
Last update : SWIG-3.0.4 (14 Jan 2015) Last update : SWIG-3.0.5 (31 Jan 2015)
<H2>Sections</H2> <H2>Sections</H2>
...@@ -55,6 +55,7 @@ Last update : SWIG-3.0.4 (14 Jan 2015) ...@@ -55,6 +55,7 @@ Last update : SWIG-3.0.4 (14 Jan 2015)
<li><a href="Python.html#Python">Python support</a></li> <li><a href="Python.html#Python">Python support</a></li>
<li><a href="R.html#R">R support</a></li> <li><a href="R.html#R">R support</a></li>
<li><a href="Ruby.html#Ruby">Ruby support</a></li> <li><a href="Ruby.html#Ruby">Ruby support</a></li>
<li><a href="Scilab.html#Scilab">Scilab support</a></li>
<li><a href="Tcl.html#Tcl">Tcl support</a></li> <li><a href="Tcl.html#Tcl">Tcl support</a></li>
</ul> </ul>
......
This diff is collapsed.
...@@ -349,9 +349,9 @@ These can be overridden using command line options, for example: ...@@ -349,9 +349,9 @@ These can be overridden using command line options, for example:
<div class="shell"><pre> <div class="shell"><pre>
$ swig -python -Fstandard example.i $ swig -python -Fstandard example.i
example.i:4: Syntax error in input. example.i:4: Syntax error in input(1).
$ swig -python -Fmicrosoft example.i $ swig -python -Fmicrosoft example.i
example.i(4) : Syntax error in input. example.i(4) : Syntax error in input(1).
</pre></div> </pre></div>
<H2><a name="Warnings_nn9"></a>15.9 Warning number reference</H2> <H2><a name="Warnings_nn9"></a>15.9 Warning number reference</H2>
......
...@@ -36,5 +36,6 @@ Pike.html ...@@ -36,5 +36,6 @@ Pike.html
Python.html Python.html
R.html R.html
Ruby.html Ruby.html
Scilab.html
Tcl.html Tcl.html
Extending.html Extending.html
...@@ -596,7 +596,7 @@ java_cpp: $(SRCDIR_SRCS) ...@@ -596,7 +596,7 @@ java_cpp: $(SRCDIR_SRCS)
# ---------------------------------------------------------------- # ----------------------------