Commit c13afd38 authored by Torsten Landschoff's avatar Torsten Landschoff

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

parent 29448756
This diff is collapsed.
*** ANNOUNCE: SWIG 3.0.7 (3 Aug 2015) ***
*** ANNOUNCE: SWIG 3.0.8 (31 Dec 2015) ***
http://www.swig.org
We're pleased to announce SWIG-3.0.7, the latest SWIG release.
We're pleased to announce SWIG-3.0.8, the latest SWIG release.
What is SWIG?
=============
......@@ -23,20 +23,15 @@ 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.7.tar.gz
http://prdownloads.sourceforge.net/swig/swig-3.0.8.tar.gz
A Windows version is also available at
http://prdownloads.sourceforge.net/swig/swigwin-3.0.7.zip
http://prdownloads.sourceforge.net/swig/swigwin-3.0.8.zip
Please report problems with this release to the swig-devel mailing list,
details at http://www.swig.org/mail.html.
......
......@@ -43,17 +43,21 @@ $(srcdir)/$(PACKAGE_NAME).1: $(srcdir)/ccache.yo
$(srcdir)/web/ccache-man.html: $(srcdir)/ccache.yo
yodl2html -o $(srcdir)/web/ccache-man.html $(srcdir)/ccache.yo
install: $(PACKAGE_NAME)$(EXEEXT) $(srcdir)/$(PACKAGE_NAME).1
install: $(PACKAGE_NAME)$(EXEEXT)
@echo "Installing $(PACKAGE_NAME)"
@echo "Installing $(DESTDIR)${bindir}/`echo $(PACKAGE_NAME) | sed '$(transform)'`$(EXEEXT)"
${INSTALLCMD} -d $(DESTDIR)${bindir}
${INSTALLCMD} -m 755 $(PACKAGE_NAME)$(EXEEXT) $(DESTDIR)${bindir}/`echo $(PACKAGE_NAME) | sed '$(transform)'`$(EXEEXT)
install-docs: $(srcdir)/$(PACKAGE_NAME).1
@echo "Installing $(DESTDIR)${mandir}/man1/`echo $(PACKAGE_NAME) | sed '$(transform)'`.1"
${INSTALLCMD} -d $(DESTDIR)${mandir}/man1
${INSTALLCMD} -m 644 $(srcdir)/$(PACKAGE_NAME).1 $(DESTDIR)${mandir}/man1/`echo $(PACKAGE_NAME) | sed '$(transform)'`.1
uninstall: $(PACKAGE_NAME)$(EXEEXT) $(srcdir)/$(PACKAGE_NAME).1
uninstall: $(PACKAGE_NAME)$(EXEEXT)
rm -f $(DESTDIR)${bindir}/`echo $(PACKAGE_NAME) | sed '$(transform)'`$(EXEEXT)
uninstall-docs: $(srcdir)/$(PACKAGE_NAME).1
rm -f $(DESTDIR)${mandir}/man1/`echo $(PACKAGE_NAME) | sed '$(transform)'`.1
clean:
......
This diff is collapsed.
......@@ -15,6 +15,11 @@ else
SWIG=swig
fi
# fix: Remove ccache from $PATH if it exists
# as it will influence the unit tests
PATH="`echo $PATH | \
sed -e 's!:/usr\(/local\)*/lib\([0-9]\)*/ccache\(/\)*!!g'`"
CCACHE=../ccache-swig
TESTDIR=test.$$
......
......@@ -3,6 +3,123 @@ 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.7 (3 Aug 2015)
==========================
2015-08-02: wsfulton
[Java] Fix potential security exploit in generated Java classes.
The swigCPtr and swigCMemOwn member variables in the generated Java
classes are now declared 'transient' by default. Further details of the exploit
in Android is being published in an academic paper as part of USENIX WOOT '15:
https://www.usenix.org/conference/woot15/workshop-program/presentation/peles.
In the unlikely event that you are relying on these members being serializable,
then you will need to override the default javabody and javabody_derived typemaps
to generate the old generated code. The relevant typemaps are in the Lib directory
in the java.swg, boost_shared_ptr.i and boost_intrusive_ptr.i files. Copy the
relevant default typemaps into your interface file and remove the 'transient' keyword.
*** POTENTIAL INCOMPATIBILITY ***
2015-08-01: vadz
Make configure --without-alllang option more useful: it can now be overridden by the following
--with-xxx options, allowing to easily enable just one or two languages.
2015-07-30: wsfulton
Fix #440 - Initialise all newly created arrays when using %array_functions and %array_class
in the carrays.i library - bug is only relevant when using C++.
2015-07-29: wsfulton
[Python] Improve indentation warning and error messages for code in the following directives:
%pythonprepend
%pythonappend
%pythoncode
%pythonbegin
%feature("shadow")
Old error example:
Error: Line indented less than expected (line 3 of pythoncode)
New error example:
Error: Line indented less than expected (line 3 of %pythoncode or %insert("python") block)
as no line should be indented less than the indentation in line 1
Old warning example:
Warning 740: Whitespace prefix doesn't match (line 2 of %pythoncode or %insert("python") block)
New warning example:
Warning 740: Whitespace indentation is inconsistent compared to earlier lines (line 3 of
%pythoncode or %insert("python") block)
2015-07-28: wsfulton
[Python] Fix #475. Improve docstring indentation handling.
SWIG-3.0.5 and earlier sometimes truncated text provided in the docstring feature.
This occurred when the indentation (whitespace) in the docstring was less in the
second or later lines when compared to the first line.
SWIG-3.0.6 gave a 'Line indented less than expected' error instead of truncating
the docstring text.
Now the indentation for the 'docstring' feature is smarter and is appropriately
adjusted so that no truncation occurs.
2015-07-22: wsfulton
Support for special variable expansion in typemap attributes. Example usage expansion
in the 'out' attribute (C# specific):
%typemap(ctype, out="$*1_ltype") unsigned int& "$*1_ltype"
is equivalent to the following as $*1_ltype expands to 'unsigned int':
%typemap(ctype, out="unsigned int") unsigned int& "unsigned int"
Special variables can be used within special variable macros too. Example usage expansion:
%typemap(cstype) unsigned int "uint"
%typemap(cstype, out="$typemap(cstype, $*1_ltype)") unsigned int& "$typemap(cstype, $*1_ltype)"
Special variables are expanded first and hence the above is equivalent to:
%typemap(cstype, out="$typemap(cstype, unsigned int)") unsigned int& "$typemap(cstype, unsigned int)"
which then expands to:
%typemap(cstype, out="uint") unsigned int& "uint"
2015-07-22: lindleyf
Apply patch #439 - support for $typemap() (aka embedded typemaps or special variable
macros) in typemap attributes. A simple example where $typemap() is expanded in the
'out' attribute (C# specific):
%typemap(cstype) unsigned int "uint"
%typemap(cstype, out="$typemap(cstype, unsigned int)") unsigned int& "$typemap(cstype, unsigned int)"
is equivalent to:
%typemap(cstype, out="uint") unsigned int& "uint"
2015-07-18: m7thon
[Python] Docstrings provided via %feature("docstring") are now quoted and added to
the tp_doc slot when using python builtin classes (-builtin). When no docstring is
provided, the tp_doc slot is set to the fully qualified C/C++ class name.
Github issues #445 and #461.
2015-07-17: kwwette
[octave] Support Octave version 4.0.0 (thanks to patches from Orion Poplawski).
2015-07-07: wsfulton
SWIG no longer generates a wrapper for a class' constructor if that class has
any base class with a private destructor. This is because your compiler should
not allow a class to be instantiated if a base has a private destructor. Some
compilers do, so if you need the old behaviour, use the "notabstract" feature, eg:
%feature("notabstract") Derived;
class Base {
~Base() {}
};
struct Derived : Base {};
Version 3.0.6 (5 Jul 2015)
==========================
......
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>SWIG and Android</title>
<link rel="stylesheet" type="text/css" href="style.css">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF">
<H1><a name="Android"></a>19 SWIG and Android</H1>
<H1><a name="Android">19 SWIG and Android</a></H1>
<!-- INDEX -->
<div class="sectiontoc">
<ul>
......@@ -30,24 +31,24 @@ This chapter describes SWIG's support of Android.
<H2><a name="Android_overview"></a>19.1 Overview</H2>
<H2><a name="Android_overview">19.1 Overview</a></H2>
<p>
The Android chapter is fairly short as support for Android is the same as for Java, where the Java Native Interface (JNI) is
used to call from Android Java into C or C++ compiled code.
Everything in the <a href="Java.html">Java chapter</a> applies to generating code for access from Android Java code.
Everything in the <a href="Java.html#Java">Java chapter</a> applies to generating code for access from Android Java code.
This chapter contains a few Android specific notes and examples.
</p>
<H2><a name="Android_examples"></a>19.2 Android examples</H2>
<H2><a name="Android_examples">19.2 Android examples</a></H2>
<H3><a name="Android_examples_intro"></a>19.2.1 Examples introduction</H3>
<H3><a name="Android_examples_intro">19.2.1 Examples introduction</a></H3>
<p>
The examples require the <a href="http://developer.android.com/sdk/index.html">Android SDK</a> and <a href="http://developer.android.com/sdk/ndk/index.html">Android NDK</a> which can be installed as per instructions in the links.
The examples require the <a href="http://developer.android.com/sdk/index.html">Android SDK</a> and <a href="http://developer.android.com/tools/sdk/ndk/index.html">Android NDK</a> which can be installed as per instructions in the links.
The Eclipse version is not required for these examples as just the command line tools are used (shown for Linux as the host, but Windows will be very similar, if not identical in most places).
Add the SDK tools and NDK tools to your path and create a directory somewhere for your Android projects (adjust PATH as necessary to where you installed the tools):
</p>
......@@ -76,7 +77,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>19.2.2 Simple C example</H3>
<H3><a name="Android_example_simple">19.2.2 Simple C example</a></H3>
<p>
......@@ -209,7 +210,7 @@ When complete your device should be listed in those attached, something like:
<pre>
$ adb devices
List of devices attached
A32-6DBE0001-9FF80000-015D62C3-02018028 device
A32-6DBE0001-9FF80000-015D62C3-02018028 device
</pre>
</div>
......@@ -221,7 +222,7 @@ This means you are now ready to install the application...
<pre>
$ adb install bin/SwigSimple-debug.apk
95 KB/s (4834 bytes in 0.049s)
pkg: /data/local/tmp/SwigSimple-debug.apk
pkg: /data/local/tmp/SwigSimple-debug.apk
Success
</pre>
</div>
......@@ -398,7 +399,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>19.2.3 C++ class example</H3>
<H3><a name="Android_example_class">19.2.3 C++ class example</a></H3>
<p>
......@@ -746,7 +747,7 @@ Run the app to see the result of calling the C++ code from Java:
<center><img src="android-class.png" alt="Android screenshot of SwigClass example"></center>
<H3><a name="Android_examples_other"></a>19.2.4 Other examples</H3>
<H3><a name="Android_examples_other">19.2.4 Other examples</a></H3>
<p>
......@@ -758,7 +759,7 @@ Note that the 'extend' example is demonstrates the directors feature.
Normally C++ exception handling and the STL is not available by default in the version of g++ shipped with Android, but this example turns these features on as described in the next section.
</p>
<H2><a name="Android_stl"></a>19.3 C++ STL</H2>
<H2><a name="Android_stl">19.3 C++ STL</a></H2>
<p>
......
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Argument Handling</title>
<link rel="stylesheet" type="text/css" href="style.css">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#ffffff">
<H1><a name="Arguments"></a>10 Argument Handling</H1>
<H1><a name="Arguments">10 Argument Handling</a></H1>
<!-- INDEX -->
<div class="sectiontoc">
<ul>
......@@ -42,7 +43,7 @@ return multiple values through the arguments of a function. This chapter
describes some of the techniques for doing this.
</p>
<H2><a name="Arguments_nn2"></a>10.1 The typemaps.i library</H2>
<H2><a name="Arguments_nn2">10.1 The typemaps.i library</a></H2>
<p>
......@@ -50,7 +51,7 @@ This section describes the <tt>typemaps.i</tt> library file--commonly used to
change certain properties of argument conversion.
</p>
<H3><a name="Arguments_nn3"></a>10.1.1 Introduction</H3>
<H3><a name="Arguments_nn3">10.1.1 Introduction</a></H3>
<p>
......@@ -59,7 +60,7 @@ Suppose you had a C function like this:
<div class="code"><pre>
void add(double a, double b, double *result) {
*result = a + b;
*result = a + b;
}
</pre></div>
......@@ -194,7 +195,7 @@ else. To clear a typemap, the <tt>%clear</tt> directive should be used. For e
</pre>
</div>
<H3><a name="Arguments_nn4"></a>10.1.2 Input parameters</H3>
<H3><a name="Arguments_nn4">10.1.2 Input parameters</a></H3>
<p>
......@@ -203,7 +204,7 @@ input value:
</p>
<div class="code"><pre>
int *INPUT
int *INPUT
short *INPUT
long *INPUT
unsigned int *INPUT
......@@ -220,7 +221,7 @@ function:
<div class="code"><pre>
double add(double *a, double *b) {
return *a+*b;
return *a+*b;
}
</pre></div>
......@@ -247,7 +248,7 @@ When the function is used in the scripting language interpreter, it will work li
result = add(3,4)
</pre></div>
<H3><a name="Arguments_nn5"></a>10.1.3 Output parameters</H3>
<H3><a name="Arguments_nn5">10.1.3 Output parameters</a></H3>
<p>
......@@ -272,7 +273,7 @@ These methods can be used as shown in an earlier example. For example, if you ha
<div class="code"><pre>
void add(double a, double b, double *c) {
*c = a+b;
*c = a+b;
}
</pre></div>
......@@ -314,7 +315,7 @@ iresult, dresult = foo(3.5, 2)
</pre>
</div>
<H3><a name="Arguments_nn6"></a>10.1.4 Input/Output parameters</H3>
<H3><a name="Arguments_nn6">10.1.4 Input/Output parameters</a></H3>
<p>
......@@ -338,7 +339,7 @@ A C function that uses this might be something like this:</p>
<div class="code"><pre>
void negate(double *x) {
*x = -(*x);
*x = -(*x);
}
</pre></div>
......@@ -379,7 +380,7 @@ rather than directly overwriting the value of the original input object.
SWIG. Backwards compatibility is preserved, but deprecated.
</p>
<H3><a name="Arguments_nn7"></a>10.1.5 Using different names</H3>
<H3><a name="Arguments_nn7">10.1.5 Using different names</a></H3>
<p>
......@@ -413,7 +414,7 @@ Typemap declarations are lexically scoped so a typemap takes effect from the poi
file or a matching <tt>%clear</tt> declaration.
</p>
<H2><a name="Arguments_nn8"></a>10.2 Applying constraints to input values</H2>
<H2><a name="Arguments_nn8">10.2 Applying constraints to input values</a></H2>
<p>
......@@ -423,7 +424,7 @@ insure that a value is positive, or that a pointer is non-NULL. This
can be accomplished including the <tt>constraints.i</tt> library file.
</p>
<H3><a name="Arguments_nn9"></a>10.2.1 Simple constraint example</H3>
<H3><a name="Arguments_nn9">10.2.1 Simple constraint example</a></H3>
<p>
......@@ -449,7 +450,7 @@ the arguments violate the constraint condition, a scripting language
exception will be raised. As a result, it is possible to catch bad
values, prevent mysterious program crashes and so on.</p>
<H3><a name="Arguments_nn10"></a>10.2.2 Constraint methods</H3>
<H3><a name="Arguments_nn10">10.2.2 Constraint methods</a></H3>
<p>
......@@ -465,7 +466,7 @@ NONNULL Non-NULL pointer (pointers only).
</pre></div>
<H3><a name="Arguments_nn11"></a>10.2.3 Applying constraints to new datatypes</H3>
<H3><a name="Arguments_nn11">10.2.3 Applying constraints to new datatypes</a></H3>
<p>
......
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>ccache-swig(1) manpage</title>
<link rel="stylesheet" type="text/css" href="style.css">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#ffffff">
<H1><a name="CCache"></a>17 Using SWIG with ccache - ccache-swig(1) manpage</H1>
<H1><a name="CCache">17 Using SWIG with ccache - ccache-swig(1) manpage</a></H1>
<!-- INDEX -->
<div class="sectiontoc">
<ul>
......@@ -34,7 +35,7 @@
<p>
<H2><a name="CCache_nn2"></a>17.1 NAME</H2>
<H2><a name="CCache_nn2">17.1 NAME</a></H2>
<p>
......@@ -42,7 +43,7 @@
ccache-swig - a fast compiler cache
<p>
<H2><a name="CCache_nn3"></a>17.2 SYNOPSIS</H2>
<H2><a name="CCache_nn3">17.2 SYNOPSIS</a></H2>
<p>
......@@ -52,16 +53,16 @@ ccache-swig &lt;compiler&gt; [COMPILER OPTIONS]
<p>
&lt;compiler&gt; [COMPILER OPTIONS]
<p>
<H2><a name="CCache_nn4"></a>17.3 DESCRIPTION</H2>
<H2><a name="CCache_nn4">17.3 DESCRIPTION</a></H2>
<p>
ccache-swig is a compiler cache. It speeds up re-compilation of C/C++/SWIG code
ccache-swig is a compiler cache. It speeds up re-compilation of C/C++/SWIG code
by caching previous compiles and detecting when the same compile is
being done again. ccache-swig is ccache plus support for SWIG. ccache
and ccache-swig are used interchangeably in this document.
<p>
<H2><a name="CCache_nn5"></a>17.4 OPTIONS SUMMARY</H2>
<H2><a name="CCache_nn5">17.4 OPTIONS SUMMARY</a></H2>
<p>
......@@ -81,7 +82,7 @@ Here is a summary of the options to ccache-swig.
</pre>
<p>
<H2><a name="CCache_nn6"></a>17.5 OPTIONS</H2>
<H2><a name="CCache_nn6">17.5 OPTIONS</a></H2>
<p>
......@@ -98,7 +99,7 @@ statistics are stored spread across the subdirectories of the
cache. Using "ccache-swig -s" adds up the statistics across all
subdirectories and prints the totals.
<p>
<p><dt><strong><strong>-z</strong></strong><dd> Zero the cache statistics.
<p><dt><strong><strong>-z</strong></strong><dd> Zero the cache statistics.
<p>
<p><dt><strong><strong>-V</strong></strong><dd> Print the ccache version number
<p>
......@@ -123,7 +124,7 @@ rounded down to the nearest multiple of 16 kilobytes.
<p>
</dl>
<p>
<H2><a name="CCache_nn7"></a>17.6 INSTALLATION</H2>
<H2><a name="CCache_nn7">17.6 INSTALLATION</a></H2>
<p>
......@@ -135,7 +136,7 @@ some specific projects. The second method is most useful for when you
wish to use ccache for all your compiles.
<p>
To install for usage by the first method just copy ccache-swig to somewhere
in your path.