Commit d5dad25c authored by Torsten Landschoff's avatar Torsten Landschoff

Import upstream release SWIG 3.0.0

parent e6006823
......@@ -26,35 +26,40 @@ matrix:
env: SWIGLANG=python
- compiler: gcc
env: SWIGLANG=python PY3=1
- compiler: gcc
env: SWIGLANG=python PY3=1 VER=3.3
- compiler: gcc
env: SWIGLANG=ruby
- compiler: gcc
env: SWIGLANG=tcl
allow_failures:
# None
# None
before_install:
- date -u
- lsb_release -a
- uname -a
- sudo apt-get -qq update
- time sudo apt-get -qq install libboost-dev
- 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" = "go"; then go env | sed -e 's/^/export /' > goenvsetup && source goenvsetup && rm -f goenvsetup; fi # Until configure.ac is fixed
- if test "$SWIGLANG" = "guile"; then sudo apt-get -qq install guile-2.0-dev; fi
- if test "$SWIGLANG" = "lua"; then sudo apt-get -qq install lua5.1 liblua5.1-dev; fi
- if test "$SWIGLANG" = "octave"; then sudo apt-get -qq install octave3.2 octave3.2-headers; fi
- if test "$SWIGLANG" = "php"; then sudo apt-get install php5-cli php5-dev; fi
- if test "$SWIGLANG" = "python" -a "$PY3"; then sudo apt-get install 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; fi
- if test "$SWIGLANG" = "tcl"; then sudo apt-get -qq install tcl8.4-dev; fi
script:
- export PS4="+ " #Temporary workaround bug in Travis build environment
- ./autogen.sh && ./configure
- make -s $SWIGJOBS
- if test -z "$SWIGLANG"; then make -s check-ccache; fi
- ./swig -version
- ./swig -version && ./swig -pcreversion
- if test -z "$SWIGLANG"; then make -s $SWIGJOBS check-ccache; fi
- if test -z "$SWIGLANG"; then make -s $SWIGJOBS check-errors-test-suite; fi
- if test -z "$SWIGLANG"; then sudo make -s install && swig -version && ccache-swig -V; fi
- if test -n "$SWIGLANG"; then make -s check-$SWIGLANG-version; fi
- if test -n "$SWIGLANG"; then make -k $SWIGJOBS check-$SWIGLANG-examples; fi
- if test -n "$SWIGLANG"; then make -k $SWIGJOBS check-$SWIGLANG-test-suite; fi
branches:
only:
- master
- maintenance-2.0
*** ANNOUNCE: SWIG 2.0.12 (9 Feb 2014) ***
*** ANNOUNCE: SWIG 3.0.0 (16 Mar 2014) ***
http://www.swig.org
We're pleased to announce SWIG-2.0.12, the latest SWIG release.
We're pleased to announce SWIG-3.0.0, the latest SWIG release.
What is SWIG?
=============
......@@ -21,11 +21,11 @@ Availability
============
The release is available for download on Sourceforge at
http://prdownloads.sourceforge.net/swig/swig-2.0.12.tar.gz
http://prdownloads.sourceforge.net/swig/swig-3.0.0.tar.gz
A Windows version is also available at
http://prdownloads.sourceforge.net/swig/swigwin-2.0.12.zip
http://prdownloads.sourceforge.net/swig/swigwin-3.0.0.zip
Please report problems with this release to the swig-devel mailing list,
details at http://www.swig.org/mail.html.
......
......@@ -3,6 +3,72 @@ 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 2.0.12 (9 Feb 2014)
===========================
2014-01-16: wsfulton
[PHP] Fix compilation error in ZTS mode (64 bit windows) due to incorrect placement
of TSRMLS_FETCH() in SWIG_Php_GetModule() as reported by Mark Dawson-Butterworth.
2014-01-13: kwwette
[Octave] update support to Octave version 3.8.0
- Octave 3.8.0 no longer defines OCTAVE_API_VERSION_NUMBER, but 3.8.1
will define OCTAVE_{MAJOR,MINOR,PATCH}_VERSION instead: see
http://hg.savannah.gnu.org/hgweb/octave/rev/b6b6e0dc700e
So we now use a new macro SWIG_OCTAVE_PREREQ(major,minor,patch) to
enable features requiring Octave version major.minor.patch or later.
For Octave versions prior to 3.8.1, we reconstruct values for
OCTAVE_{MAJOR,MINOR,PATCH}_VERSION based on OCTAVE_API_VERSION_NUMBER,
extracted from Octave's ChangeLogs. An additional hack is needed to
distinguish between Octave <= 3.2.x and 3.8.0, neither of which define
OCTAVE_API_VERSION_NUMBER.
- Octave 3.8.0 deprecates symbol_table::varref(), so remove its use
for this and future versions of Octave.
- Octave 3.8.0 removes octave_value::is_real_nd_array(), used in
octave_swig_type::dims(). Its use is not required here, so remove it.
- Retested against Octave versions 3.0.5, 3.2.4, 3.4.3, 3.6.4, and 3.8.0.
- Updated Octave documentation with tested Octave versions, and added a
warning against using versions <= 3.x.x, which are no longer tested.
2013-12-22: wsfulton
C++11 support for new versions of erase and insert in the STL containers.
The erase and insert methods in the containers use const_iterator instead
of iterator in C++11. There are times when the methods wrapped must match
the parameters exactly. Specifically when full type information for
template types is missing or SWIG fails to look up the type correctly,
for example:
%include <std_vector.i>
typedef float Real;
%template(RealVector) std::vector<Real>;
SWIG does not find std::vector<Real>::iterator because %template using
typedefs does not always work and so SWIG doesn't know if the type is
copyable and so uses SwigValueWrapper<iterator> which does
not support conversion to another type (const_iterator). This resulted
in compilation errors when using the C++11 version of the containers.
Closes #73
2013-10-17: wsfulton
[R] Fix SF #1340 - Visual Studio compile error in C++ wrappers due to #include <exception>
within extern "C" block.
2013-10-17: wsfulton
[Python] Fix SF #1345 - Missing #include <stddef.h> for offsetof when using -builtin.
2013-10-12: wsfulton
[Lua] Apply #92 - missing return statements for SWIG_Lua_add_namespace_details()
and SWIG_Lua_namespace_register().
Version 2.0.11 (15 Sep 2013)
============================
......@@ -200,7 +266,7 @@ Version 2.0.10 (27 May 2013)
The macros are silently ignored.
2013-04-17: wsfulton
[C#] Pull patch #34 from BrantKyser to fix smart pointers in conjuction with directors.
[C#] Pull patch #34 from BrantKyser to fix smart pointers in conjunction with directors.
2013-04-15: kwwette
[Octave] Fix bugs in output of cleanup code.
......@@ -3302,8 +3368,8 @@ Version 1.3.36 (24 June 2008)
Makefile target being generated when generating makefiles with the -M family
of options. For example:
$ swig -java -MM -MT overiddenname -c++ example.i
overiddenname: \
$ swig -java -MM -MT overriddenname -c++ example.i
overriddenname: \
example.i \
example.h
......@@ -5205,7 +5271,7 @@ Version 1.3.29 (March 21, 2006)
6146 _std_containers.so
174 _std_containers.so.hidden
Excecution times:
Execution times:
real 0m0.050s user 0m0.039s sys 0m0.005s _std_containers.so
real 0m0.039s user 0m0.026s sys 0m0.007s _std_containers.so.hidden
......@@ -5291,7 +5357,7 @@ Version 1.3.29 (March 21, 2006)
protected methods by default.
In previous releases, you needed to use the 'dirprot'
option to acheive the same.
option to achieve the same.
If you want, you can disable the new default behaviour,
use the 'nodirprot' option:
......@@ -5618,7 +5684,7 @@ Version 1.3.28 (February 12, 2006)
%rename("%(utitle)s",%$isfunction,%$ismember) "";
to avoid clashings with other swig macros/directives.
to avoid clashes with other swig macros/directives.
01/14/2006: cfisavage
[Ruby]
......@@ -11721,7 +11787,7 @@ Version 1.3.20 (December 17, 2003)
11/30/2003: cheetah (William Fulton)
[Java] Fixed [ 766409 ] missing symbol SWIG_JavaThrowException during module load
SWIGs internal functions are all static as there is no need for different SWIG
SWIG's internal functions are all static as there is no need for different SWIG
generated modules to share any code at runtime.
11/30/2003: beazley
......@@ -21302,7 +21368,7 @@ Version 1.1 Patch 4 (January 4, 1998)
12/29/97: Fixed configure script and a few makefiles to support Python 1.5
12/29/97: Added 'embed15.i' library file. This file should be used to
staticly link versions of Python 1.5. To make it the default,
statically link versions of Python 1.5. To make it the default,
simply copy 'swig_lib/python/embed15.i' to 'swig_lib/python/embed.i'
Version 1.1 Patch 3 (November 24, 1997)
......
This diff is collapsed.
This diff is collapsed.
......@@ -347,7 +347,7 @@ Delete(a); /* Destroy a */
All objects are referenced counted and given a reference count of 1 when initially created. The
<tt>Delete()</tt> function only destroys an object when the reference count reaches zero. When
an object is placed in a list or hash table, it's reference count is automatically increased. For example:
an object is placed in a list or hash table, its reference count is automatically increased. For example:
<blockquote>
<pre>
......@@ -844,7 +844,7 @@ Returns a type object corresponding to the type string produced by the Swig_cloc
<li><tt>char *Swig_clocal_deref(DataType *t, char *name)</tt><br>
This function is the inverse of the <tt>clocal()</tt> function. Given a type and a name,
it produces a string containing the code needed to cast/convert the type produced by
<tt>Swig_clocal()</tt> back into it's original type.
<tt>Swig_clocal()</tt> back into its original type.
<p>
<li><tt>char *Swig_clocal_assign(DataType *t, char *name)</tt><br>
......
......@@ -185,7 +185,7 @@ this function merely records that those attributes did not exist in the original
<blockquote>
This function is similar to <tt>Swig_save()</tt> except that adds additional attribute checking. There are different interpretations
of the attribute names. A name of "attr" merely requests that the function check for the presence of an attribute. If the attribute is missing, SWIG will exit with a failed assertion. An attribute name of "?attr" specifies that the attribute "attr" is optional and
that it's old value must be saved (if any). An attribute name of "*attr" specifies that the attribute is required and that
that its old value must be saved (if any). An attribute name of "*attr" specifies that the attribute is required and that
its value must be saved. The saving of attributes is performed in the same manner as with <tt>Swig_save()</tt>. Here is an example:
<pre>
......
This diff is collapsed.
......@@ -5,7 +5,7 @@
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body bgcolor="#FFFFFF">
<H1><a name="Android"></a>18 SWIG and Android</H1>
<H1><a name="Android"></a>19 SWIG and Android</H1>
<!-- INDEX -->
<div class="sectiontoc">
<ul>
......@@ -30,7 +30,7 @@ This chapter describes SWIG's support of Android.
<H2><a name="Android_overview"></a>18.1 Overview</H2>
<H2><a name="Android_overview"></a>19.1 Overview</H2>
<p>
......@@ -40,10 +40,10 @@ Everything in the <a href="Java.html">Java chapter</a> applies to generating cod
This chapter contains a few Android specific notes and examples.
</p>
<H2><a name="Android_examples"></a>18.2 Android examples</H2>
<H2><a name="Android_examples"></a>19.2 Android examples</H2>
<H3><a name="Android_examples_intro"></a>18.2.1 Examples introduction</H3>
<H3><a name="Android_examples_intro"></a>19.2.1 Examples introduction</H3>
<p>
......@@ -76,7 +76,7 @@ $ android list targets
The following examples are shipped with SWIG under the Examples/android directory and include a Makefile to build and install each example.
</p>
<H3><a name="Android_example_simple"></a>18.2.2 Simple C example</H3>
<H3><a name="Android_example_simple"></a>19.2.2 Simple C example</H3>
<p>
......@@ -398,7 +398,7 @@ Run the app again and this time you will see the output pictured below, showing
<center><img src="android-simple.png" alt="Android screenshot of SwigSimple example"></center>
<H3><a name="Android_example_class"></a>18.2.3 C++ class example</H3>
<H3><a name="Android_example_class"></a>19.2.3 C++ class example</H3>
<p>
......@@ -435,11 +435,11 @@ public:
}
virtual ~Shape() {
nshapes--;
};
}
double x, y;
void move(double dx, double dy);
virtual double area(void) = 0;
virtual double perimeter(void) = 0;
virtual double area() = 0;
virtual double perimeter() = 0;
static int nshapes;
};
......@@ -447,18 +447,18 @@ class Circle : public Shape {
private:
double radius;
public:
Circle(double r) : radius(r) { };
virtual double area(void);
virtual double perimeter(void);
Circle(double r) : radius(r) { }
virtual double area();
virtual double perimeter();
};
class Square : public Shape {
private:
double width;
public:
Square(double w) : width(w) { };
virtual double area(void);
virtual double perimeter(void);
Square(double w) : width(w) { }
virtual double area();
virtual double perimeter();
};
</pre>
</div>
......@@ -482,19 +482,19 @@ void Shape::move(double dx, double dy) {