Commit 29448756 authored by Torsten Landschoff's avatar Torsten Landschoff

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

parent 9faf6b54
language: cpp
compiler:
- clang
- gcc
env:
- SWIGLANG=
matrix:
include:
- compiler: clang
env: SWIGLANG=
- compiler: gcc
env: SWIGLANG=
- compiler: gcc
env: SWIGLANG= GCC5=1 CPP11=1
- compiler: gcc
env: SWIGLANG= GCC5=1 CPP14=1
- compiler: gcc
env: SWIGLANG=csharp
- compiler: gcc
......@@ -28,6 +31,8 @@ matrix:
env: SWIGLANG=octave SWIGJOBS=-j3 # 3.2
- compiler: gcc
env: SWIGLANG=octave SWIGJOBS=-j3 VER=3.8
- compiler: gcc
env: SWIGLANG=octave SWIGJOBS=-j3 VER=4.0
- compiler: gcc
env: SWIGLANG=perl5
- compiler: gcc
......@@ -62,6 +67,12 @@ matrix:
env: SWIGLANG=scilab
- compiler: gcc
env: SWIGLANG=tcl
- compiler: gcc
env: SWIGLANG=csharp GCC5=1 CPP11=1
- compiler: gcc
env: SWIGLANG=java GCC5=1 CPP11=1
- compiler: gcc
env: SWIGLANG=python GCC5=1 CPP11=1
allow_failures:
# Lots of failing tests currently
- compiler: gcc
......@@ -69,6 +80,9 @@ matrix:
# Occasional gcc internal compiler error
- compiler: gcc
env: SWIGLANG=octave SWIGJOBS=-j3 VER=3.8
# Occasional gcc internal compiler error
- compiler: gcc
env: SWIGLANG=octave SWIGJOBS=-j3 VER=4.0
# Not quite working yet
- compiler: gcc
env: SWIGLANG=python SWIG_FEATURES=-classic
......@@ -83,7 +97,9 @@ before_install:
- uname -a
- lsb_release -a
- sudo apt-get -qq update
- time sudo apt-get -qq install libboost-dev
- if test -n "$GCC5"; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test && sudo apt-get -qq update && sudo apt-get install -qq g++-5 && export CC=gcc-5 && export CXX=g++-5; fi
- if test -z "$GCC5"; then sudo apt-get -qq install libboost-dev; fi
- if test -n "$GCC5"; then sudo add-apt-repository -y ppa:boost-latest/ppa && sudo apt-get -qq update && sudo apt-get install -qq libboost1.55-dev; fi
- if test -z "$SWIGLANG"; then sudo apt-get -qq install yodl; fi
- if test "$SWIGLANG" = "csharp"; then sudo apt-get -qq install mono-devel; fi
- if test "$SWIGLANG" = "d"; then wget http://downloads.dlang.org/releases/2014/dmd_2.066.0-0_amd64.deb; sudo dpkg -i dmd_2.066.0-0_amd64.deb; fi
......@@ -100,18 +116,22 @@ before_install:
- if test "$SWIGLANG" = "php"; then sudo apt-get install php5-cli php5-dev; 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 "$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 && CONFIGOPTS+=("--with-python${PY3}=python${VER}"); fi
- if test "$SWIGLANG" = "r"; then sudo apt-get -qq install r-base; 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 -n "$CPP11"; then CONFIGOPTS+=(--enable-cpp11-testing --without-maximum-compile-warnings "CXXFLAGS=-std=c++11 -Wall -Wextra" "CFLAGS=-std=c11 -Wall -Wextra") && export CSTD=c11 && export CPPSTD=c++11; fi
- if test -n "$CPP14"; then CONFIGOPTS+=(--enable-cpp11-testing --without-maximum-compile-warnings "CXXFLAGS=-std=c++14 -Wall -Wextra" "CFLAGS=-std=c11 -Wall -Wextra") && export CSTD=c11 && export CPPSTD=c++14; fi
- $CC --version
- $CXX --version
# Stricter compile flags for examples. Various headers and SWIG generated code prevents full use of -pedantic.
- export cflags=$(Tools/testflags.py --language $SWIGLANG --cflags) && echo $cflags
- export cxxflags=$(Tools/testflags.py --language $SWIGLANG --cxxflags) && echo $cxxflags
- if test -n "$SWIGLANG"; then export cflags=$(Tools/testflags.py --language $SWIGLANG --cflags --std=$CSTD) && echo $cflags; fi
- if test -n "$SWIGLANG"; then export cxxflags=$(Tools/testflags.py --language $SWIGLANG --cxxflags --std=$CPPSTD) && echo $cxxflags; fi
script:
- echo 'Configuring...' && echo -en 'travis_fold:start:script.1\\r'
- ./autogen.sh && mkdir -p build/build && cd build/build && ../../configure $CONFIGOPTS
- if test -n "$SWIGLANG"; then CONFIGOPTS+=(--without-alllang --with-$SWIGLANG$PY3); fi
- echo "${CONFIGOPTS[@]}"
- ./autogen.sh && mkdir -p build/build && cd build/build && ../../configure "${CONFIGOPTS[@]}"
- echo -en 'travis_fold:end:script.1\\r'
- make -s $SWIGJOBS
- ./swig -version && ./swig -pcreversion
......
*** ANNOUNCE: SWIG 3.0.6 (5 Jul 2015) ***
*** ANNOUNCE: SWIG 3.0.7 (3 Aug 2015) ***
http://www.swig.org
We're pleased to announce SWIG-3.0.6, the latest SWIG release.
We're pleased to announce SWIG-3.0.7, the latest SWIG release.
What is SWIG?
=============
......@@ -18,15 +18,25 @@ include generation of scripting language extension modules, rapid
prototyping, testing, and user interface development for large
C/C++ systems.
Release Notes
=============
Detailed release notes are available with the release and are also
published on the SWIG web site at http://swig.org/release.html.
SWIG-3.0.7 summary:
- Add support for Octave-4.0.0.
- Remove potential Android security exploit in generated Java classes.
- Minor new features and bug fixes.
Availability
============
The release is available for download on Sourceforge at
http://prdownloads.sourceforge.net/swig/swig-3.0.6.tar.gz
http://prdownloads.sourceforge.net/swig/swig-3.0.7.tar.gz
A Windows version is also available at
http://prdownloads.sourceforge.net/swig/swigwin-3.0.6.zip
http://prdownloads.sourceforge.net/swig/swigwin-3.0.7.zip
Please report problems with this release to the swig-devel mailing list,
details at http://www.swig.org/mail.html.
......
......@@ -3,6 +3,208 @@ SWIG (Simplified Wrapper and Interface Generator)
See the CHANGES.current file for changes in the current version.
See the RELEASENOTES file for a summary of changes in each release.
Version 3.0.6 (5 Jul 2015)
==========================
2015-07-02: wsfulton
Fix syntax error when the template keyword is used in types, eg:
std::template vector<int> v;
2015-07-02: ngladitz
[Lua] Push characters as unformatted 1-character strings to avoid
unprintable characters such as (char)127 being converted to
"<\127>" with Lua 5.3 and later. (github PR #452)
2015-06-29: olly
[Python] Improve handling of whitespace in %pythoncode.
Previously SWIG looked at the indentation of the first line and
removed that many characters from each subsequent line, regardless
of what those characters were. This was made worse because SWIG's
preprocessor removes any whitespace before a '#'. Fixes github
issue #379, reported by Joe Orton.
2015-06-12: wsfulton
[R] Fix #430 - call to SWIG_createNewRef in copyToC was incorrectly named.
2015-06-11: sghirate
[C#] Patch #427 adds in new command line option -outfile to combine all the
generated C# code into a single file.
2015-06-09: wsfulton
Fix seg fault processing C++11 type aliasing. Issue #424.
2015-05-28: wsfulton
[Python] Add new feature "python:cdefaultargs" to control default argument
code generation. By default, SWIG attempts to convert C/C++ default argument values
into Python values and generates code into the Python layer with these values.
Recent versions of SWIG are able to convert more of these values, however, the
new behaviour can be circumvented if desired via this new feature, such that
the default argument values are obtained from the C layer and not the Python layer.
For example:
struct CDA {
int fff(int a = 1, bool b = false);
};
The default code generation in the Python layer is:
class CDA(_object):
...
def fff(self, a=1, b=False):
return _default_args.CDA_fff(self, a, b)
Adding the feature:
%feature("python:cdefaultargs") CDA::fff;
Results in:
class CDA(_object):
...
def fff(self, *args):
return _default_args.CDA_fff(self, *args)
Some code generation modes, eg -builtin and -fastproxy, are unaffected by this as
the default values are always obtained from the C layer.
2015-05-27: wsfulton
[Python] Deal with an integer as the default value of a typedef to bool
parameter in the C++ prototype. See #327. Regression from 3.0.0 onwards.
2015-05-19: olly
[Python] Fix warning when compiling generated code with MSVC.
(Fixes https://sourceforge.net/p/swig/patches/351/ reported by
Mateusz Szyma¿ski).
2015-05-14: wsfulton
Fix seg fault wrapping shared_ptr of classes with private constructors and destructors.
This also fixes the "unref" feature when used on classes with private destructors.
2015-05-10: wsfulton
[Java] Fix multi-argument typemaps (char *STRING, size_t LENGTH)
so that they can be applied to a wider range of types. Fixes #385.
2015-05-07: olly
[Python] Deal with an integer as the default value of a bool
parameter in the C++ prototype. Fixes github #327, reported by
Greg Allen.
2015-05-07: LindleyF
[Java] Allow feature("director") and feature("ref") to be used
together. Github PR#403.
2015-05-05: olly
Suppress warning 325 "Nested class not currently supported (Foo
ignored)" when Foo has already been explicitly ignored with "%ignore".
2015-05-04: wsfulton
Add support for friend templates, including operator overloading - fixes #196. Considering
the example below, previously the operator gave a syntax error and friendfunc incorrectly
warned with:
"Warning 503: Can't wrap 'friendfunc<(Type)>' unless renamed to a valid identifier."
template <class Type> class MyClass {
friend int friendfunc <Type>(double is, MyClass <Type> & x);
friend int operator<< <Type>(double un, const MyClass <Type> &x);
};
The following also previously incorrectly warned with:
"Warning 302: Identifier 'template_friend' redefined (ignored),"
template<typename T> T template_friend(T);
struct MyTemplate {
template<typename T> friend T template_friend(T);
};
2015-05-01: wsfulton
Fix handling of conversion operators where the operator is split over multiple
lines or has comments within the operator type. Fixes #401.
Also fix similar problem with normal operators which gave a syntax error if split over
multiple lines or had a comment within the operator declaration.
2015-04-30: olly
Ignore unknown preprocessor directives which are inside an inactive
conditional (github issue #394, reported by Dan Wilcox).
Regression introduced in 3.0.3.
2015-04-27: vadz
[Python] Fix "default" typemap used after an argument with "numinputs=0" (#377).
2015-04-24: wsfulton
[Python] Fix #256. Code generated with '-builtin -modernargs' segfaults for any
method taking zero arguments.
Also fixes: "SystemError: error return without exception set" during error checking
when using just -builtin and the incorrect number of arguments is passed to a class
method expecting zero arguments.
2015-04-23: wsfulton
[Java] Bug #386 - Memory leak fix in (char *STRING, size_t LENGTH) typemaps.
2015-04-23: vadz
[Python] Make "default" typemap work again (#330, #377).
2015-04-23: vadz
[Python] Fix the use of default values for the pointer types (#365, #376).
2015-04-23: wsfulton
Fix 'make check-ccache' which is part of 'make check' when one of the CCACHE_
environment variables, for example CCACHE_DISABLE, is set.
2015-04-14: wsfulton
Clearer warning message for badly constructed typecheck typemaps. For example, was:
example.i:3: Warning 467: Overloaded foo(int) not supported (no type checking
rule for 'int').
Now:
example.i:3: Warning 467: Overloaded foo(int) not supported (incomplete type checking
rule - no precedence level in typecheck typemap for 'int').
2015-04-11: wsfulton
[Java] Fix #353 - Linker multiple definition of 'ExceptionMatches' when
using directors and multiple modules.
2015-04-11: wsfulton
Merge #320 - Make __dict__ accessible for Python builtin classes.
2015-04-07: wsfulton
Fix #375 - parsing of extern "C" and typedef for example:
extern "C" typedef void (*Hook2_t)(int, const char *);
extern "C" typedef int Integer;
2015-03-12: olly
-DSWIG_DIRECTOR_STATIC is now supported for all languages with
director support, not only Python and PHP.
2015-03-02: ianlancetaylor
[Go] Add -cgo option, required for Go versions 1.5 and
later.
2015-02-26: olly
Fix segmentation fault when top==NULL, introduced by nested class
handling (reported in issue#346 by Pawe¿ Tomulik).
2015-02-09: wsfulton
[Guile] Fix generated code for static const char member variables when
defined and declared inline.
2015-02-09: mishas
[Go] Fix %import of files in sub directories.
2015-02-05: ianlancetaylor
[Go] Ignore Go specific type maps (goin, goout, etc.) if they are empty.
2015-02-05: ianlancetaylor
[Go] Generated Go code no longer calls _swig_goallocate or
_swig_makegostring, as they will no longer work as of Go 1.5.
Version 3.0.5 (31 Jan 2015)
===========================
......@@ -1524,7 +1726,7 @@ Version 2.0.6 (30 April 2012)
[Lua] Fix uninitialised variable in SWIGTYPE **OUTPUT typemaps as reported by Jim Anderson.
2012-04-28: wsfulton
[Python] Fix compilation errors when wrapping STL containers on Mac OSX and possibly other systems.
[Python] Fix compilation errors when wrapping STL containers on Mac OS X and possibly other systems.
2012-04-28: wsfulton
[Java] Patch 3521811 from Leo Davis - char **STRING_ARRAY typemaps fixed to handle
......@@ -2219,7 +2421,7 @@ Version 2.0.2 (20 February 2011)
Update chapter name to MzScheme/Racket accounting for the rename of MzScheme to Racket.
2011-02-05: wsfulton
[C#] SF #3085906 - Possible fix running test-suite on Mac OSX.
[C#] SF #3085906 - Possible fix running test-suite on Mac OS X.
2011-02-05: wsfulton
SF #3173367 Better information during configure about Boost prerequisite for running
......@@ -3872,7 +4074,7 @@ Version 1.3.37 (13 January 2009)
in Allegro CL
2008-07-19: wsfulton
Fix building of Tcl examples/test-suite on Mac OSX reported by Gideon Simpson.
Fix building of Tcl examples/test-suite on Mac OS X reported by Gideon Simpson.
2008-07-17: wsfulton
Fix SF #2019156 Configuring with --without-octave or --without-alllang
......@@ -12693,7 +12895,7 @@ Version 1.3.20 (December 17, 2003)
Suggested by Kerim Borchaev.
11/11/2003: beazley
Configuration changes to make SWIG work on Mac OSX 10.3.x (Panther).
Configuration changes to make SWIG work on Mac OS X 10.3.x (Panther).
Tested with Python, Tcl, Perl, and Ruby---all of which seem to work.
11/08/2003: cheetah (William Fulton)
......
This diff is collapsed.
......@@ -441,6 +441,8 @@
<li><a href="Typemaps.html#Typemaps_special_macro_descriptor">$descriptor(type)</a>
<li><a href="Typemaps.html#Typemaps_special_macro_typemap">$typemap(method, typepattern)</a>
</ul>
<li><a href="Typemaps.html#Typemaps_special_variable_attributes">Special variables and typemap attributes</a>
<li><a href="Typemaps.html#Typemaps_special_variables_and_macros">Special variables combined with special variable macros</a>
</ul>
<li><a href="Typemaps.html#Typemaps_nn25">Common typemap methods</a>
<ul>
......@@ -1070,7 +1072,7 @@
</ul>
<li><a href="Javascript.html#Javascript_embedded_webkit">Embedded Webkit</a>
<ul>
<li><a href="Javascript.html#Javascript_osx">OSX</a>
<li><a href="Javascript.html#Javascript_osx">Mac OS X</a>
<li><a href="Javascript.html#Javascript_gtk">GTK</a>
</ul>
<li><a href="Javascript.html#Javascript_applications_webkit">Creating Applications with node-webkit</a>
......
......@@ -2390,8 +2390,8 @@ The default proxy class for our previous example looks like this:
<div class="code">
<pre>
public class Foo {
private long swigCPtr;
protected boolean swigCMemOwn;
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected Foo(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
......@@ -2641,8 +2641,8 @@ The base class is generated much like any other proxy class seen so far:
<div class="code"><pre>
public class Base {
private long swigCPtr;
protected boolean swigCMemOwn;
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected Base(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
......@@ -2682,7 +2682,7 @@ The <tt>Derived</tt> class extends <tt>Base</tt> mirroring the C++ class inherit
<div class="code"><pre>
public class Derived extends Base {
private long swigCPtr;
private transient long swigCPtr;
protected Derived(long cPtr, boolean cMemoryOwn) {
super(exampleJNI.SWIGDerivedUpcast(cPtr), cMemoryOwn);
......@@ -2960,8 +2960,8 @@ and the Java proxy class generated by SWIG:
<div class="code"><pre>
public class Test {
private long swigCPtr;
protected boolean swigCMemOwn;
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected Test(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
......@@ -3034,7 +3034,7 @@ The generated type wrapper class, for say an <tt>int *</tt>, looks like this:
<div class="code"><pre>
public class SWIGTYPE_p_int {
private long swigCPtr;
private transient long swigCPtr;
protected SWIGTYPE_p_int(long cPtr, boolean bFutureUse) {
swigCPtr = cPtr;
......@@ -5900,8 +5900,8 @@ If you are invoking SWIG more than once and generating the wrapped classes into
<div class="code">
<pre>
%typemap(javabody) SWIGTYPE %{
private long swigCPtr;
protected boolean swigCMemOwn;
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected $javaclassname(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
......@@ -5929,7 +5929,7 @@ For the typemap to be used in all type wrapper classes, all the different types
<div class="code">
<pre>
%typemap(javabody) SWIGTYPE *, SWIGTYPE &amp;, SWIGTYPE [], SWIGTYPE (CLASS::*) %{
private long swigCPtr;
private transient long swigCPtr;
protected $javaclassname(long cPtr, boolean bFutureUse) {
swigCPtr = cPtr;
......
......@@ -25,7 +25,7 @@
</ul>
<li><a href="#Javascript_embedded_webkit">Embedded Webkit</a>
<ul>
<li><a href="#Javascript_osx">OSX</a>
<li><a href="#Javascript_osx">Mac OS X</a>
<li><a href="#Javascript_gtk">GTK</a>
</ul>
<li><a href="#Javascript_applications_webkit">Creating Applications with node-webkit</a>
......@@ -156,7 +156,7 @@ $ make check-javascript-examples V8_VERSION=0x032530 ENGINE=v8</pre>
<li><p><code>instanceOf</code> does not work under JSC</p></li>
</ul>
<p>The primary development environment has been Linux (Ubuntu 12.04). Windows and OSX have been tested sporadically. Therefore, the generators might have more issues on those platforms. Please report back any problem you observe to help us improving this module quickly.</p>
<p>The primary development environment has been Linux (Ubuntu 12.04). Windows and Mac OS X have been tested sporadically. Therefore, the generators might have more issues on those platforms. Please report back any problem you observe to help us improving this module quickly.</p>
<H2><a name="Javascript_integration"></a>26.3 Integration</H2>
......@@ -166,7 +166,7 @@ $ make check-javascript-examples V8_VERSION=0x032530 ENGINE=v8</pre>
<H3><a name="Javascript_node_extensions"></a>26.3.1 Creating node.js Extensions</H3>
<p>To install <code>node.js</code> you can download an installer from their <a href="https://launchpad.net/~chris-lea/+archive/node.js">web-site</a> for OSX and Windows. For Linux you can either build the source yourself and run <code>sudo checkinstall</code> or keep to the (probably stone-age) packaged version. For Ubuntu there is a <a href="https://launchpad.net/~chris-lea/+archive/node.js/">PPA</a> available.</p>
<p>To install <code>node.js</code> you can download an installer from their <a href="https://launchpad.net/~chris-lea/+archive/node.js">web-site</a> for Mac OS X and Windows. For Linux you can either build the source yourself and run <code>sudo checkinstall</code> or keep to the (probably stone-age) packaged version. For Ubuntu there is a <a href="https://launchpad.net/~chris-lea/+archive/node.js/">PPA</a> available.</p>
<div class="shell">
<pre>
$ sudo add-apt-repository ppa:chris-lea/node.js
......@@ -224,9 +224,9 @@ $ sudo apt-get remove gyp</pre>
<H3><a name="Javascript_embedded_webkit"></a>26.3.2 Embedded Webkit</H3>
<p>Webkit is pre-installed on OSX and available as a library for GTK.</p>
<p>Webkit is pre-installed on Mac OS X and available as a library for GTK.</p>
<H4><a name="Javascript_osx"></a>26.3.2.1 OSX</H4>
<H4><a name="Javascript_osx"></a>26.3.2.1 Mac OS X</H4>
<p>There is general information about programming with WebKit on <a href="https://developer.apple.com/library/mac/documentation/cocoa/conceptual/DisplayWebContent/DisplayWebContent.html">Apple Developer Documentation</a>. Details about <code>Cocoa</code> programming are not covered here.</p>
......
......@@ -59,7 +59,7 @@ Also, there are a dozen or so examples in the Examples/octave directory, and hun
<p>
As of SWIG 3.0.3, the Octave module has been tested with Octave versions 3.2.4, 3.4.3, 3.6.4, and 3.8.1.
As of SWIG 3.0.7, the Octave module is regularly tested with Octave versions 3.2.4, 3.8.1, and 4.0.0.
Use of older Octave versions is not recommended, as these versions are no longer tested with SWIG.
</p>
......
......@@ -602,6 +602,10 @@ PRE { font-family: monospace }
typepattern)</A></LI>
</UL>
</LI>
<LI><A HREF="#Typemaps_special_variable_attributes">11.4.5 Special
variables and typemap attributes</A></LI>
<LI><A HREF="#Typemaps_special_variables_and_macros">11.4.6 Special
variables combined with special variable macros</A></LI>
</UL>
</LI>
<LI><A HREF="#Typemaps_nn25">11.5 Common typemap methods</A>
......@@ -1325,7 +1329,7 @@ PRE { font-family: monospace }
</LI>
<LI><A HREF="#Javascript_embedded_webkit">26.3.2 Embedded Webkit</A>
<UL>
<LI><A HREF="#Javascript_osx">26.3.2.1 OSX</A></LI>
<LI><A HREF="#Javascript_osx">26.3.2.1 Mac OS X</A></LI>
<LI><A HREF="#Javascript_gtk">26.3.2.2 GTK</A></LI>
</UL>
</LI>
......@@ -2252,7 +2256,7 @@ PRE { font-family: monospace }
</UL>
<HR NOSHADE>
<H1><A name="Sections"></A>SWIG-3.0 Documentation</H1>
Last update : SWIG-3.0.6 (5 Jul 2015)
Last update : SWIG-3.0.7 (3 Aug 2015)
<H2><A NAME="1_1">Sections</A></H2>
<H3><A NAME="1_1_1">SWIG Core Documentation</A></H3>
<UL>
......@@ -13759,6 +13763,10 @@ NONNULL Non-NULL pointer (pointers only).
typepattern)</A></LI>
</UL>
</LI>
<LI><A href="#Typemaps_special_variable_attributes">Special variables
and typemap attributes</A></LI>
<LI><A href="#Typemaps_special_variables_and_macros">Special variables
combined with special variable macros</A></LI>
</UL>
</LI>
<LI><A href="#Typemaps_nn25">Common typemap methods</A>
......@@ -15588,6 +15596,51 @@ Defining a typemap</A> section.</P>
%}
</PRE>
</DIV>
<H3><A name="Typemaps_special_variable_attributes"></A>11.4.5 Special
variables and typemap attributes</H3>
<P> As of SWIG-3.0.7 typemap attributes will also expand special
variables and special variable macros.</P>
<P> Example usage showing the expansion in the 'out' attribute (C#
specific) as well as the main typemap body:</P>
<DIV class="code">
<PRE>
%typemap(ctype, out=&quot;$*1_ltype&quot;) unsigned int&amp; &quot;$*1_ltype&quot;
</PRE>
</DIV>
<P> is equivalent to the following as <TT>$*1_ltype</TT> expands to <TT>
unsigned int</TT>:</P>
<DIV class="code">
<PRE>
%typemap(ctype, out=&quot;unsigned int&quot;) unsigned int&amp; &quot;unsigned int&quot;
</PRE>
</DIV>
<H3><A name="Typemaps_special_variables_and_macros"></A>11.4.6 Special
variables combined with special variable macros</H3>
<P> Special variables can also be used within special variable macros.
The special variables are expanded before they are used in the special
variable macros.</P>
<P> Consider the following C# typemaps:</P>
<DIV class="code">
<PRE>
%typemap(cstype) unsigned int &quot;uint&quot;
%typemap(cstype, out=&quot;$typemap(cstype, $*1_ltype)&quot;) unsigned int&amp; &quot;$typemap(cstype, $*1_ltype)&quot;
</PRE>
</DIV>
<P> Special variables are expanded first and hence the above is
equivalent to:</P>
<DIV class="code">
<PRE>
%typemap(cstype) unsigned int &quot;uint&quot;
%typemap(cstype, out=&quot;$typemap(cstype, unsigned int)&quot;) unsigned int&amp; &quot;$typemap(cstype, unsigned int)&quot;
</PRE>
</DIV>
<P> which then expands to:</P>
<DIV class="code">
<PRE>
%typemap(cstype) unsigned int &quot;uint&quot;
%typemap(cstype, out=&quot;uint&quot;) unsigned int&amp; &quot;uint&quot;
</PRE>
</DIV>
<H2><A name="Typemaps_nn25"></A>11.5 Common typemap methods</H2>
<P> The set of typemaps recognized by a language module may vary.
However, the following typemap methods are nearly universal:</P>
......@@ -29773,8 +29826,8 @@ peer classes</A>. The default proxy class for our previous example looks
<DIV class="code">
<PRE>
public class Foo {
private long swigCPtr;
protected boolean swigCMemOwn;
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected Foo(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
......@@ -29979,8 +30032,8 @@ public:
<DIV class="code">
<PRE>
public class Base {
private long swigCPtr;
protected boolean swigCMemOwn;
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected Base(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
......@@ -30019,7 +30072,7 @@ public class Base {
<DIV class="code">
<PRE>
public class Derived extends Base {
private long swigCPtr;
private transient long swigCPtr;
protected Derived(long cPtr, boolean cMemoryOwn) {
super(exampleJNI.SWIGDerivedUpcast(cPtr), cMemoryOwn);
......@@ -30297,8 +30350,8 @@ public:
<DIV class="code">
<PRE>
public class Test {
private long swigCPtr;
protected boolean swigCMemOwn;
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected Test(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
......@@ -30373,7 +30426,7 @@ for (int i=0; i&lt;100000; i++) {
<DIV class="code">
<PRE>
public class SWIGTYPE_p_int {
private long swigCPtr;
private transient long swigCPtr;
protected SWIGTYPE_p_int(long cPtr, boolean bFutureUse) {
swigCPtr = cPtr;
......@@ -32678,8 +32731,8 @@ public synchronized void <I>delete</I>() [ javadestruct OR javadestruct_derived
<DIV class="code">
<PRE>
%typemap(javabody) SWIGTYPE %{
private long swigCPtr;
protected boolean swigCMemOwn;
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected $javaclassname(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
......@@ -32704,7 +32757,7 @@ public synchronized void <I>delete</I>() [ javadestruct OR javadestruct_derived
<DIV class="code">
<PRE>
%typemap(javabody) SWIGTYPE *, SWIGTYPE &amp;, SWIGTYPE [], SWIGTYPE (CLASS::*) %{
private long swigCPtr;
private transient long swigCPtr;
protected $javaclassname(long cPtr, boolean bFutureUse) {
swigCPtr = cPtr;
......@@ -34771,7 +34824,7 @@ arrays_java.i</TT>. Try and minimise the expensive JNI calls to C/C++
</LI>
<LI><A href="#Javascript_embedded_webkit">Embedded Webkit</A>
<UL>
<LI><A href="#Javascript_osx">OSX</A></LI>
<LI><A href="#Javascript_osx">Mac OS X</A></LI>
<LI><A href="#Javascript_gtk">GTK</A></LI>
</UL>
</LI>
......@@ -34940,7 +34993,7 @@ $ make check-javascript-examples V8_VERSION=0x032530 ENGINE=v8</PRE>
</LI>
</UL>
<P>The primary development environment has been Linux (Ubuntu 12.04).
Windows and OSX have been tested sporadically. Therefore, the
Windows and Mac OS X have been tested sporadically. Therefore, the
generators might have more issues on those platforms. Please report
back any problem you observe to help us improving this module quickly.</P>
<H2><A name="Javascript_integration"></A>26.3 Integration</H2>
......@@ -34951,9 +35004,9 @@ $ make check-javascript-examples V8_VERSION=0x032530 ENGINE=v8</PRE>
Extensions</H3>
<P>To install <CODE>node.js</CODE> you can download an installer from
their <A href="https://launchpad.net/~chris-lea/+archive/node.js">
web-site</A> for OSX and Windows. For Linux you can either build the
source yourself and run <CODE>sudo checkinstall</CODE> or keep to the
(probably stone-age) packaged version. For Ubuntu there is a <A href="https://launchpad.net/~chris-lea/+archive/node.js/">
web-site</A> for Mac OS X and Windows. For Linux you can either build
the source yourself and run <CODE>sudo checkinstall</CODE> or keep to
the (probably stone-age) packaged version. For Ubuntu there is a <A href="https://launchpad.net/~chris-lea/+archive/node.js/">
PPA</A> available.</P>
<DIV class="shell">
<PRE>
......@@ -35016,8 +35069,9 @@ Examples</A> section.</P>
$ sudo apt-get remove gyp</PRE>
</DIV>
<H3><A name="Javascript_embedded_webkit"></A>26.3.2 Embedded Webkit</H3>
<P>Webkit is pre-installed on OSX and available as a library for GTK.</P>
<H4><A name="Javascript_osx"></A>26.3.2.1 OSX</H4>
<P>Webkit is pre-installed on Mac OS X and available as a library for
GTK.</P>
<H4><A name="Javascript_osx"></A>26.3.2.1 Mac OS X</H4>
<P>There is general information about programming with WebKit on <A href="https://developer.apple.com/library/mac/documentation/cocoa/conceptual/DisplayWebContent/DisplayWebContent.html">
Apple Developer Documentation</A>. Details about <CODE>Cocoa</CODE>
programming are not covered here.</P>
......@@ -40099,9 +40153,9 @@ directorin, directorout, directorargout</TT></H4>
Examples/octave directory, and hundreds in the test suite
(Examples/test-suite and Examples/test-suite/octave).</P>
<H2><A name="Octave_nn2"></A>32.1 Preliminaries</H2>
<P> As of SWIG 3.0.3, the Octave module has been tested with Octave
versions 3.2.4, 3.4.3, 3.6.4, and 3.8.1. Use of older Octave versions
is not recommended, as these versions are no longer tested with SWIG.</P>
<P> As of SWIG 3.0.7, the Octave module is regularly tested with Octave
versions 3.2.4, 3.8.1, and 4.0.0. Use of older Octave versions is not
recommended, as these versions are no longer tested with SWIG.</P>
<H2><A name="Octave_nn3"></A>32.2 Running SWIG</H2>
<P> Let's start with a very simple SWIG interface file, example.i:</P>
<DIV class="code">
......@@ -6,7 +6,7 @@
<body bgcolor="#ffffff">
<H1><a name="Sections"></a>SWIG-3.0 Documentation</H1>
Last update : SWIG-3.0.6 (5 Jul 2015)
Last update : SWIG-3.0.7 (3 Aug 2015)
<H2>Sections</H2>
......
......@@ -48,6 +48,8 @@
<li><a href="#Typemaps_special_macro_descriptor">$descriptor(type)</a>
<li><a href="#Typemaps_special_macro_typemap">$typemap(method, typepattern)</a>
</ul>
<li><a href="#Typemaps_special_variable_attributes">Special variables and typemap attributes</a>
<li><a href="#Typemaps_special_variables_and_macros">Special variables combined with special variable macros</a>
</ul>
<li><a href="#Typemaps_nn25">Common typemap methods</a>
<ul>
......@@ -2425,6 +2427,76 @@ The result is the following expansion
</pre>
</div>
<H3><a name="Typemaps_special_variable_attributes"></a>11.4.5 Special variables and typemap attributes</H3>
<p>
As of SWIG-3.0.7 typemap attributes will also expand special variables and special variable macros.
</p>
<p>
Example usage showing the expansion in the 'out' attribute (C# specific) as well as the main typemap body: