diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000..596615322
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+.gitattributes export-ignore
+.gitignore export-ignore
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000..eb3aa012c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,130 @@
+# Compiled Source
+*.o
+*.class
+
+# Editor files and various other junk
+*.sw?
+*.bak
+
+# Local PCRE
+pcre
+*.gz
+
+# C/C++ object files, based on:
+# https://github.com/github/gitignore/blob/master/C.gitignore
+# https://github.com/github/gitignore/blob/master/C%2B%2B.gitignore
+*.slo
+*.lo
+
+# C/C++ dynamic libraries, based on:
+# https://github.com/github/gitignore/blob/master/C.gitignore
+# https://github.com/github/gitignore/blob/master/C%2B%2B.gitignore
+*.dll
+*.so
+*.so.*
+*.dylib
+
+# C/C++ static libraries, based on:
+# https://github.com/github/gitignore/blob/master/C.gitignore
+# https://github.com/github/gitignore/blob/master/C%2B%2B.gitignore
+*.lib
+*.lai
+*.la
+*.a
+
+# C/C++ executables, based on:
+# https://github.com/github/gitignore/blob/master/C.gitignore
+# https://github.com/github/gitignore/blob/master/C%2B%2B.gitignore
+*.exe
+*.out
+*.app
+
+# Generated by autogen.sh
+CCache/autom4te.cache/
+CCache/config.h.in
+CCache/configure
+Source/Include/swigconfig.h.in
+Source/Include/swigconfig.h.in~
+Source/Makefile.in
+Tools/config/compile
+Tools/config/config.guess
+Tools/config/config.sub
+Tools/config/depcomp
+Tools/config/install-sh
+Tools/config/missing
+Tools/config/ylwrap
+aclocal.m4
+autom4te.cache/
+configure
+
+# Generated by ./configure
+CCache/Makefile
+CCache/ccache_swig_config.h
+CCache/config.h
+CCache/config.log
+CCache/config.status
+Examples/Makefile
+Examples/guile/Makefile
+Examples/test-suite/*/Makefile
+Examples/xml/Makefile
+Lib/ocaml/swigp4.ml
+/Makefile
+Source/Include/stamp-h1
+Source/Include/swigconfig.h
+Source/Makefile
+.deps
+config.log
+config.status
+preinst-swig
+swig.spec
+
+# Build Artifacts
+.dirstamp
+CCache/ccache-swig
+CCache/ccache-swig.1
+Source/CParse/parser.c
+Source/CParse/parser.h
+Source/eswig
+swig
+
+# Generated documentation
+Doc/Manual/CCache.html
+Doc/Manual/SWIGDocumentation.html
+Doc/Manual/SWIGDocumentation.pdf
+Doc/Manual/*.book
+
+# Test Suite Generated Files
+Examples/test-suite/allegrocl/*/
+Examples/test-suite/cffi/*/
+Examples/test-suite/chicken/*/
+Examples/test-suite/clisp/*/
+Examples/test-suite/csharp/*/
+Examples/test-suite/d/*/
+Examples/test-suite/go/*/
+Examples/test-suite/guile/*/
+Examples/test-suite/java/*/
+Examples/test-suite/lua/*/
+Examples/test-suite/mzscheme/*/
+Examples/test-suite/ocaml/*/
+Examples/test-suite/octave/*/
+Examples/test-suite/perl5/*/
+Examples/test-suite/php/*/
+Examples/test-suite/pike/*/
+Examples/test-suite/python/*/
+Examples/test-suite/r/*/
+Examples/test-suite/ruby/*/
+Examples/test-suite/tcl/*/
+Examples/test-suite/uffi/*/
+
+# Python generated files, based on:
+# https://github.com/github/gitignore/blob/master/Python.gitignore
+*.py[cod]
+*/__pycache__/
+/__pycache__/
+
+# C# generated files
+*_runme.exe.mdb
+*_runme.exe
+
+# Scratch directories
+Examples/scratch
diff --git a/.project b/.project
deleted file mode 100644
index 86af75213..000000000
--- a/.project
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
- SWIG
-
-
-
-
-
-
-
-
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000000000..13502de0b
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,57 @@
+language: cpp
+compiler:
+ - clang
+ - gcc
+env:
+ - SWIGLANG=
+matrix:
+ include:
+ - compiler: gcc
+ env: SWIGLANG=csharp
+ - compiler: gcc
+ env: SWIGLANG=go
+ - compiler: gcc
+ env: SWIGLANG=guile
+ - compiler: gcc
+ env: SWIGLANG=java
+ - compiler: gcc
+ env: SWIGLANG=lua
+ - compiler: gcc
+ env: SWIGLANG=octave SWIGJOBS=-j4
+ - compiler: gcc
+ env: SWIGLANG=perl5
+ - compiler: gcc
+ env: SWIGLANG=php
+ - compiler: gcc
+ env: SWIGLANG=python
+ - compiler: gcc
+ env: SWIGLANG=python PY3=1
+ - compiler: gcc
+ env: SWIGLANG=ruby
+ - compiler: gcc
+ env: SWIGLANG=tcl
+ allow_failures:
+ # None
+before_install:
+ - lsb_release -a
+ - uname -a
+ - time sudo apt-get -qq install libboost-dev
+ - 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" = "tcl"; then sudo apt-get -qq install tcl8.4-dev; fi
+script:
+ - ./autogen.sh && ./configure
+ - make -s $SWIGJOBS
+ - if test -z "$SWIGLANG"; then make -s check-ccache; fi
+ - ./swig -version
+ - 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
diff --git a/ANNOUNCE b/ANNOUNCE
index 825837614..1c3297a5c 100644
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,31 +1,31 @@
-*** ANNOUNCE: SWIG 2.0.6 (30 April 2012) ***
+*** ANNOUNCE: SWIG 2.0.10 (in progress) ***
http://www.swig.org
-We're pleased to announce SWIG-2.0.6, the latest SWIG release.
+We're pleased to announce SWIG-2.0.10, the latest SWIG release.
What is SWIG?
=============
SWIG is a software development tool that reads C/C++ header files and
generates the wrapper code needed to make C and C++ code accessible
-from other languages including Perl, Python, Tcl, Ruby, PHP, Java,
-Scheme (Guile, MzScheme, CHICKEN), D, Ocaml, Lua, Pike, C#, Modula-3,
-Octave, R, Common Lisp (CLISP, Allegro CL, CFFI, UFFI). SWIG can also
-export its parse tree in the form of XML and Lisp s-expressions. Major
-applications of SWIG include generation of scripting language extension
-modules, rapid prototyping, testing, and user interface development for
-large C/C++ systems.
+from other programming languages including Perl, Python, Tcl, Ruby,
+PHP, C#, Go, Java, Lua, Scheme (Guile, MzScheme, CHICKEN), D, Ocaml,
+Pike, Modula-3, Octave, R, Common Lisp (CLISP, Allegro CL, CFFI, UFFI).
+SWIG can also export its parse tree in the form of XML and Lisp
+s-expressions. Major applications of SWIG include generation of
+scripting language extension modules, rapid prototyping, testing,
+and user interface development for large C/C++ systems.
Availability
============
The release is available for download on Sourceforge at
- http://prdownloads.sourceforge.net/swig/swig-2.0.6.tar.gz
+ http://prdownloads.sourceforge.net/swig/swig-2.0.10.tar.gz
A Windows version is also available at
- http://prdownloads.sourceforge.net/swig/swigwin-2.0.6.zip
+ http://prdownloads.sourceforge.net/swig/swigwin-2.0.10.zip
Please report problems with this release to the swig-devel mailing list,
details at http://www.swig.org/mail.html.
diff --git a/CCache/ccache.c b/CCache/ccache.c
index d1696da88..e7dd1d30a 100644
--- a/CCache/ccache.c
+++ b/CCache/ccache.c
@@ -712,12 +712,13 @@ static void from_cache(int first)
passfail = retrieve_from_cache(hashname, output_file, hardlink);
}
- free(stderr_file);
if (passfail == -1) {
close(fd_stderr);
unlink(stderr_file);
+ free(stderr_file);
return;
}
+ free(stderr_file);
}
/* get rid of the intermediate preprocessor file */
diff --git a/CCache/ccache.h b/CCache/ccache.h
index 668ce8288..3c3e22311 100644
--- a/CCache/ccache.h
+++ b/CCache/ccache.h
@@ -159,7 +159,7 @@ int asprintf(char **ptr, const char *format, ...);
int snprintf(char *,size_t ,const char *, ...);
#endif
-void cleanup_dir(const char *dir, size_t maxfiles, size_t maxsize);
+void cleanup_dir(const char *dir, size_t maxfiles, size_t maxsize, size_t minfiles);
void cleanup_all(const char *dir);
void wipe_all(const char *dir);
diff --git a/CCache/cleanup.c b/CCache/cleanup.c
index 99312283e..f54ee54d9 100644
--- a/CCache/cleanup.c
+++ b/CCache/cleanup.c
@@ -75,21 +75,40 @@ static void traverse_fn(const char *fname, struct stat *st)
/* sort the files we've found and delete the oldest ones until we are
below the thresholds */
-static void sort_and_clean(void)
+static void sort_and_clean(size_t minfiles)
{
unsigned i;
+ size_t adjusted_minfiles = minfiles;
if (num_files > 1) {
/* sort in ascending data order */
qsort(files, num_files, sizeof(struct files *),
(COMPAR_FN_T)files_compare);
}
+ /* ensure newly cached files (minfiles) are kept - instead of matching
+ the filenames of those newly cached, a faster and simpler approach
+ assumes these are the most recent in the cache and if any other
+ cached files have an identical time stamp, they will also be kept -
+ this approach would not be needed if the cleanup was done at exit. */
+ if (minfiles != 0 && minfiles < num_files) {
+ unsigned minfiles_index = num_files - minfiles;
+ time_t minfiles_time = files[minfiles_index]->mtime;
+ for (i=1; i<=minfiles_index; i++) {
+ if (files[minfiles_index-i]->mtime == minfiles_time)
+ adjusted_minfiles++;
+ else
+ break;
+ }
+ }
/* delete enough files to bring us below the threshold */
for (i=0;ifname) != 0 && errno != ENOENT) {
fprintf(stderr, "unlink %s - %s\n",
files[i]->fname, strerror(errno));
@@ -103,7 +122,7 @@ static void sort_and_clean(void)
}
/* cleanup in one cache subdir */
-void cleanup_dir(const char *dir, size_t maxfiles, size_t maxsize)
+void cleanup_dir(const char *dir, size_t maxfiles, size_t maxsize, size_t minfiles)
{
unsigned i;
@@ -117,7 +136,7 @@ void cleanup_dir(const char *dir, size_t maxfiles, size_t maxsize)
traverse(dir, traverse_fn);
/* clean the cache */
- sort_and_clean();
+ sort_and_clean(minfiles);
stats_set_sizes(dir, total_files, total_size);
@@ -151,7 +170,8 @@ void cleanup_all(const char *dir)
cleanup_dir(dname,
counters[STATS_MAXFILES],
- counters[STATS_MAXSIZE]);
+ counters[STATS_MAXSIZE],
+ 0);
free(dname);
free(sfile);
}
diff --git a/CCache/configure.in b/CCache/configure.ac
similarity index 100%
rename from CCache/configure.in
rename to CCache/configure.ac
diff --git a/CCache/stats.c b/CCache/stats.c
index 92bc4a835..d2122bcd3 100644
--- a/CCache/stats.c
+++ b/CCache/stats.c
@@ -168,7 +168,8 @@ static void stats_update_size(enum stats stat, size_t size, size_t numfiles)
if (need_cleanup) {
char *p = dirname(stats_file);
- cleanup_dir(p, counters[STATS_MAXFILES], counters[STATS_MAXSIZE]);
+ cleanup_dir(p, counters[STATS_MAXFILES], counters[STATS_MAXSIZE],
+ numfiles);
free(p);
}
}
diff --git a/CCache/test.sh b/CCache/test.sh
index 9581c85e3..f64c3e3de 100755
--- a/CCache/test.sh
+++ b/CCache/test.sh
@@ -142,7 +142,7 @@ basetests() {
testname="non-regular"
mkdir testd
$CCACHE_COMPILE -o testd -c test1.c > /dev/null 2>&1
- rmdir testd
+ rm -rf testd
checkstat 'output to a non-regular file' 1
testname="no-input"
@@ -315,7 +315,7 @@ swigtests() {
testname="non-regular"
mkdir testd
$CCACHE_COMPILE -o testd -java testswig1.i > /dev/null 2>&1
- rmdir testd
+ rm -rf testd
checkstat 'output to a non-regular file' 1
testname="no-input"
diff --git a/CHANGES b/CHANGES
index 70af78333..488bf7286 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,659 @@ 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.10 (27 May 2013)
+============================
+
+2013-05-25: wsfulton
+ [Python] Fix Python 3 inconsistency when negative numbers are passed
+ where a parameter expects an unsigned C type. An OverFlow error is
+ now consistently thrown instead of a TypeError.
+
+2013-05-25: Artem Serebriyskiy
+ SVN Patch ticket #338 - fixes to %attribute macros for template usage
+ with %arg.
+
+2013-05-19: wsfulton
+ Fix ccache-swig internal error bug due to premature file cleanup.
+
+ Fixes SF bug 1319 which shows up as a failure in the ccache tests on
+ Debian 64 bit Wheezy, possibly because ENABLE_ZLIB is defined.
+
+ This is a corner case which will be hit when the maximum number of files
+ in the cache is set to be quite low (-F option), resulting in a cache miss.
+
+2013-05-09: kwwette
+ [Octave] Fix bugs in Octave module loading:
+ - fix a memory leak in setting of global variables
+ - install functions only once, to speed up module loads
+
+2013-04-28: gjanssens
+ [Guile] Updates in guile module:
+ - Add support for guile 2.0
+ - Drop support for guile 1.6
+ - Drop support for generating wrappers using guile's gh interface.
+ All generated wrappers will use the scm interface from now on.
+ - Deprecate -gh and -scm options. They are no longer needed.
+ A warning will be issued when these options are still used.
+ - Fix all tests and examples to have a successful travis test
+
+2013-04-18: wsfulton
+ Apply Patch #36 from Jesus Lopez to add support for $descriptor() special variable macro expansion
+ in fragments. For example:
+
+ %fragment("nameDescriptor", "header")
+ %{
+ static const char *nameDescriptor = "$descriptor(Name)";
+ %}
+
+ which will generate into the wrapper if the fragment is used:
+
+ static const char *nameDescriptor = "SWIGTYPE_Name";
+
+2013-04-18: wsfulton
+ Fix SF Bug #428 - Syntax error when preprocessor macros are defined inside of enum lists, such as:
+
+ typedef enum {
+ eZero = 0
+ #define ONE 1
+ } EFoo;
+
+ The macros are silently ignored.
+
+2013-04-17: wsfulton
+ [C#] Pull patch #34 from BrantKyser to fix smart pointers in conjuction with directors.
+
+2013-04-15: kwwette
+ [Octave] Fix bugs in output of cleanup code.
+ - Cleanup code is now written also after the "fail:" label, so it will be called if
+ a SWIG_exception is raised by the wrapping function, consistent with other modules.
+ - Octave module now also recognises the "$cleanup" special variable, if needed.
+
+2013-04-08: kwwette
+ Add -MP option to SWIG for generating phony targets for all dependencies.
+ - Prevents make from complaining if header files have been deleted before
+ the dependency file has been updated.
+ - Modelled on similar option in GCC.
+
+2013-04-09: olly
+ [PHP] Add missing directorin typemap for char* and char[] which
+ fixes director_string testcase failure.
+
+2013-04-05: wsfulton
+ [Ruby] SF Bug #1292 - Runtime fixes for Proc changes in ruby-1.9 when using STL
+ wrappers that override the default predicate, such as:
+
+ %template(Map) std::map >;
+
+2013-04-05: wsfulton
+ [Ruby] SF Bug #1159 - Correctly check rb_respond_to call return values to fix some
+ further 1.9 problems with functors and use of Complex wrappers.
+
+2013-04-02: wsfulton
+ [Ruby] Runtime fixes for std::complex wrappers for ruby-1.9 - new native Ruby complex numbers are used.
+
+2013-03-30: wsfulton
+ [Ruby] Fix seg fault when using STL containers of generic Ruby types, GC_VALUE or LANGUAGE_OBJECT,
+ on exit of the Ruby interpreter. More frequently observed in ruby-1.9.
+
+2013-03-29: wsfulton
+ [Ruby] Fix delete_if (reject!) for the STL container wrappers which previously would
+ sometimes seg fault or not work.
+
+2013-03-25: wsfulton
+ [Python] Fix some undefined behaviour deleting slices in the STL containers.
+
+2013-03-19: wsfulton
+ [C#, Java, D] Fix seg fault in SWIG using directors when class and virtual method names are
+ the same except being in different namespaces when the %nspace feature is not being used.
+
+2013-02-19: kwwette
+ Fix bug in SWIG's handling of qualified (e.g. const) variables of array type. Given the typedef
+ a(7).q(volatile).double myarray // typedef volatile double[7] myarray;
+ the type
+ q(const).myarray // const myarray
+ becomes
+ a(7).q(const volatile).double // const volatile double[7]
+ Previously, SwigType_typedef_resolve() produces the type
+ q(const).a(7).q(volatile).double // non-sensical type
+ which would never match %typemap declarations, whose types were parsed correctly.
+ Add typemap_array_qualifiers.i to the test suite which checks for the correct behaviour.
+
+2013-02-18: wsfulton
+ Deprecate typedef names used as constructor and destructor names in %extend. The real
+ class/struct name should be used.
+
+ typedef struct tagEStruct {
+ int ivar;
+ } EStruct;
+
+ %extend tagEStruct {
+ EStruct() // illegal name, should be tagEStruct()
+ {
+ EStruct *s = new EStruct();
+ s->ivar = ivar0;
+ return s;
+ }
+ ~EStruct() // illegal name, should be ~tagEStruct()
+ {
+ delete $self;
+ }
+ }
+
+ For now these trigger a warning:
+
+ extend_constructor_destructor.i:107: Warning 522: Use of an illegal constructor name 'EStruct' in
+ %extend is deprecated, the constructor name should be 'tagEStruct'.
+ extend_constructor_destructor.i:111: Warning 523: Use of an illegal destructor name 'EStruct' in
+ %extend is deprecated, the destructor name should be 'tagEStruct'.
+
+ These %extend destructor and constructor names were valid up to swig-2.0.4, however swig-2.0.5 ignored
+ them altogether for C code as reported in SF bug #1306. The old behaviour of using them has been
+ restored for now, but is officially deprecated. This does not apply to anonymously defined typedef
+ classes/structs such as:
+
+ typedef struct {...} X;
+
+2013-02-17: kwwette
+ When generating functions provided by %extend, use "(void)" for no-argument functions
+ instead of "()". This prevents warnings when compiling with "gcc -Wstrict-prototypes".
+
+2013-02-17: kwwette
+ [Octave] Minor fix to autodoc generation: get the right type for functions returning structs.
+
+2013-02-15: wsfulton
+ Deprecate typedef names used in %extend that are not the real class/struct name. For example:
+
+ typedef struct StructBName {
+ int myint;
+ } StructB;
+
+ %extend StructB {
+ void method() {}
+ }
+
+ will now trigger a warning:
+
+ swig_extend.i:19: Warning 326: Deprecated %extend name used - the struct name StructBName
+ should be used instead of the typedef name StructB.
+
+ This is only partially working anyway (the %extend only worked if placed after the class
+ definition).
+
+2013-02-09: wsfulton
+ [CFFI] Apply patch #22 - Fix missing package before &body
+
+2013-01-29: wsfulton
+ [Java] Ensure 'javapackage' typemap is used as it stopped working from version 2.0.5.
+
+2013-01-28: wsfulton
+ [Python] Apply patch SF #334 - Fix default value conversions "TRUE"->True, "FALSE"->False.
+
+2013-01-28: wsfulton
+ [Java] Apply patch SF #335 - Truly ignore constructors in directors with %ignore.
+
+2013-01-18: Brant Kyser
+ [Java] Patch #15 - Allow the use of the nspace feature without the -package commandline option.
+ This works as long and the new jniclasspackage pragma is used to place the JNI intermediate class
+ into a package and the nspace feature is used to place all exposed types into a package.
+
+2013-01-15: wsfulton
+ Fix Visual Studio examples to work when SWIG is unzipped into a directory containing spaces.
+
+2013-01-15: wsfulton
+ [C#] Fix cstype typemap lookup for member variables so that a fully qualified variable name
+ matches. For example:
+ %typemap(cstype) bool MVar::mvar "MyBool"
+ struct MVar {
+ bool mvar;
+ };
+
+2013-01-11: Brant Kyser
+ [Java, C#, D] SF Bug #1299 - Fix generated names for when %nspace is used on
+ classes with the same name in two different namespaces.
+
+2013-01-11: Vladimir Kalinin
+ [C#] Add support for csdirectorin 'pre', 'post' and 'terminator' attributes.
+
+2013-01-08: olly
+ [PHP] Fix to work with a ZTS build of PHP (broken in 2.0.7).
+
+2013-01-07: olly
+ Fix bashism in configure, introduced in 2.0.9.
+
+2013-01-06: wsfulton
+ Pull patch #4 from ptomulik to fix SF Bug #1296 - Fix incorrect warning for virtual destructors
+ in templates, such as:
+ Warning 521: Illegal destructor name B< A >::~B(). Ignored.
+
+2013-01-05: wsfulton
+ [Python] Pull patch #3 from ptomulik to fix SF Bug #1295 - standard exceptions as
+ classes using the SWIG_STD_EXCEPTIONS_AS_CLASSES macro.
+
+2013-01-04: wsfulton
+ [Java] Pull patch #2 from BrantKyser to fix SF Bug #1283 - fix smart pointers in conjuction
+ with directors.
+
+2013-01-03: wsfulton
+ [Java] Pull patch #1 from BrantKyser to fix SF Bug #1278 - fix directors and nspace feature when
+ multilevel namespaces are used.
+
+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 occurrences 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 class Base {};
+ %template() Base;
+ class Derived : public Base {};
+
+ 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)
+==============================
+
+2012-08-15: wsfulton
+ [Perl] Add size_type, value_type, const_reference to the STL containers.
+
+2012-08-15: wsfulton
+ [Python] Add discard and add methods to std::set wrappers so that pyabc.i can be used ensuring
+ MutableSet is a valid abstract base class for std::set. As reported by Alexey Sokolov.
+ Similarly for std::multiset.
+
+2012-08-15: wsfulton
+ [Python] Fix #3541744 - Missing PyInt_FromSize_t calls for Python 3.
+
+2012-08-13: wsfulton
+ [Java] Patch from David Baum to add the assumeoverride feature for Java directors to
+ improve performance when all overridden methods can be assumed to be overridden.
+
+2012-08-05: wsfulton
+ [Python] #3530021 Fix unused variable warning.
+
+2012-08-05: wsfulton
+ [C#] Fix #3536360 - Invalid code sometimes being generated for director methods
+ with many arguments.
+
+2012-08-05: wsfulton
+ [Perl] #3545877 - Don't undefine bool if defined by C99 stdbool.h - problem using
+ Perl 5.16 and later.
+
+2012-08-04: wsfulton
+ Remove incorrect warning (314) about target language keywords which were triggered
+ by using declarations and using directives. For example 'string' is a keyword in C#:
+ namespace std { class string; }
+ using std::string;
+
+2012-07-21: wsfulton
+ Fix display of pointers in various places on 64 bit systems - only 32 bits were being shown.
+
+2012-07-21: wsfulton
+ Fix gdb debugger functions 'swigprint' and 'locswigprint' to display to the gdb output window
+ rather than stdout. This fixes display problems in gdbtui and the ensures the output
+ appears where expected in other gdb based debuggers such as Eclipse CDT.
+
+2012-07-20: kwwette
+ [Octave] segfault-on-exit prevention hack now preserves exit status, and uses C99 _Exit().
+
+2012-07-02: wsfulton
+ Fix Debian bug http://bugs.debian.org/672035, typemap copy failure - regression introduced
+ in swig-2.0.5:
+ %include
+ using std::pair;
+ %template(StrPair) pair;
+
+2012-07-02: wsfulton
+ Fix using declarations combined with using directives with forward class declarations so that
+ types are correctly found in scope for templates. Example:
+
+ namespace Outer2 {
+ namespace Space2 {
+ template class Thing2;
+ }
+ }
+ using namespace Outer2;
+ using Space2::Thing2;
+ template class Thing2 {};
+ // STILL BROKEN void useit2(Thing2 t) {}
+ void useit2a(Outer2::Space2::Thing2 t) {}
+ void useit2b(::Outer2::Space2::Thing2 t) {}
+ void useit2c(Space2::Thing2 t) {}
+ namespace Outer2 {
+ void useit2d(Space2::Thing2 t) {}
+ }
+
+ %template(Thing2Int) Thing2;
+
+
+2012-06-30: wsfulton
+ Fix template namespace problems for symbols declared with a forward class declarations, such as:
+
+ namespace Space1 {
+ namespace Space2 {
+ template struct YYY;
+ }
+ template struct Space2::YYY {
+ T yyy(T h) {
+ return h;
+ }
+ };
+ void testYYY1(Space1::Space2::YYY yy) {}
+ void testYYY2(Space2::YYY yy) {}
+ void testYYY3(::Space1::Space2::YYY yy) {}
+ }
+
+ %template(YYYInt) Space1::Space2::YYY;
+
+2012-06-30: wsfulton
+ Fix namespace problems for symbols declared with a forward class declarations, such as:
+
+ namespace Space1 {
+ namespace Space2 {
+ struct XXX;
+ struct YYY;
+ }
+
+ struct Space2::YYY {};
+ struct Space1::Space2::XXX {};
+
+ void testXXX2(Space2::XXX xx) {}
+ void testYYY2(Space2::YYY yy) {}
+ }
+
+ where xx and yy were not recognised as the proxy classes XXX and YYY.
+
+2012-06-30: wsfulton
+ Fix using declarations combined with using directives with forward class declarations so that
+ types are correctly found in scope.
+
+ namespace Outer2 {
+ namespace Space2 {
+ class Thing2;
+ }
+ }
+ using namespace Outer2;
+ using Space2::Thing2;
+ class Thing2 {};
+ // None of the methods below correctly used the Thing2 proxy class
+ void useit2(Thing2 t) {}
+ void useit2a(Outer2::Space2::Thing2 t) {}
+ void useit2b(::Outer2::Space2::Thing2 t) {}
+ void useit2c(Space2::Thing2 t) {}
+ namespace Outer2 {
+ void useit2d(Space2::Thing2 t) {}
+ }
+
+2012-06-25: wsfulton
+ Fix using declarations combined with using directives so that types are correctly found in scope.
+ Example:
+
+ namespace Outer2 {
+ namespace Space2 {
+ class Thing2 {};
+ }
+ }
+ using namespace Outer2; // using directive
+ using Space2::Thing2; // using declaration
+ void useit2(Thing2 t) {}
+
+ Similarly for templated classes.
+
+2012-05-29: wsfulton
+ Fix #3529601 - seg fault when a protected method has the "director"
+ feature but the parent class does not. Also fix similar problems with
+ the allprotected feature.
+
+2012-05-28: wsfulton
+ Fix seg fault when attempting to warn about an illegal destructor - #3530055, 3530078 and #3530118.
+
+Version 2.0.7 (26 May 2012)
+===========================
+2012-05-26: wsfulton
+ std::string typemap modifications so they can be used with %apply for other string
+ classes.
+
+2012-05-25: wsfulton
+ [Lua] Fixes for -external-runtime to work again.
+
+2012-05-22: szager
+ [python] Disambiguate SWIG_From_unsigned_SS_int and SWIG_From_unsigned_SS_long.
+
+2012-05-18: olly
+ [PHP] Fix getters for template members. (SF#3428833, SF#3528035)
+
+2012-05-14: wsfulton
+ Fix some language's std::map wrappers to recognise difference_type, size_type, key_type
+ and mapped_type.
+
+2012-05-14: kwwette (signed off by xavier98)
+ [Octave] Prevent Octave from seg-faulting at exit when SWIG
+ modules are loaded, due to bugs in Octave's cleanup code:
+ * Wrapping functions now declared with Octave DEFUN_DLD macro,
+ and loaded through Octave's dynamic module loader
+ * Global variables of swigref type are now assigned a new()
+ copy of the swigref class, to prevent double-free errors
+ * SWIG module at-exit cleanup function now created in Octave
+ through eval(), so not dependent on loaded .oct library
+ * For Octave versions 3.1.* to 3.3.*, register C-level at-exit
+ function which terminates Octave immediately (with correct
+ status code) without performing memory cleanup. This function
+ can be controlled with macros in Lib/octave/octruntime.swg
+
+ [Octave] New syntax for determing whether SWIG module should be
+ loaded globally or non-globally. To load module "example" globally,
+ type the module name
+ $ example;
+ as before; to load module non-globally, assign it to a variable:
+ $ example = example;
+ or
+ $ ex = example;
+ for a shorter (local) module name. -global/-noglobal command-line
+ options and module command line are deprecated. Added usage info
+ to module, so typing
+ $ help example
+ or incorrect usage should display proper usage, with examples.
+
+ *** POTENTIAL INCOMPATIBILITY ***
+
+2012-05-12: olly
+ [PHP] Fix memory leak in code generated for a callback. Patch from
+ SF bug #3510806.
+
+2012-05-12: olly
+ [PHP] Avoid using zend_error_noreturn() as it doesn't work with all
+ builds of PHP (SF bug #3166423). Instead we now wrap it in a
+ SWIG_FAIL() function which we annotate as "noreturn" for GCC to
+ avoids warnings. This also reduces the size of the compiled
+ wrapper (e.g. the stripped size is reduced by 6% for Xapian's PHP
+ bindings).
+
+2012-05-11: wsfulton
+ [Java] SF patch #3522855 Fix unintended uninitialised memory access in OUTPUT typemaps.
+
+2012-05-11: wsfulton
+ [Java] SF patch #3522674 Fix possible uninitialised memory access in char **STRING_OUT
+ typemap.
+
+2012-05-11: wsfulton
+ [Java] SF patch #3522611 Fix uninitialised size regression in char **STRING_ARRAY
+ introduced in swig-2.0.6.
+
+2012-05-11: wsfulton
+ SF bug #3525050 - Fix regression introduced in swig-2.0.5 whereby defining one typemap
+ method such as an 'out' typemap may hide another typemap method such as an 'in' typemap -
+ only occurs when the type is a template type where the template parameters are the same
+ via a typedef.
+
+2012-05-10: olly
+ [PHP] Fix the constant typemaps for SWIGTYPE, etc - previously
+ these used the wrong name for renamed constants. Add
+ autodoc_runme.php to the testsuite as a regression test for this.
+
+2012-05-02: ianlancetaylor
+ [Go] Remove compatibility support for gccgo 4.6. Using
+ SWIG with gccgo will now require gccgo 4.7. Using SWIG
+ with the more commonly used gc compiler is unaffected.
+
+2012-05-01: wsfulton
+ Fix generated code for C forward enum declarations in some languages.
+
+Version 2.0.6 (30 April 2012)
+=============================
+
+2012-04-25: wsfulton
+ [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.
+
+2012-04-28: wsfulton
+ [Java] Patch 3521811 from Leo Davis - char **STRING_ARRAY typemaps fixed to handle
+ null pointers.
+
Version 2.0.5 (19 April 2012)
=============================
@@ -349,7 +1002,7 @@ Version 2.0.5 (19 April 2012)
namespace std {
template struct map {
class iterator;
- }
+ };
}
iterator was scoped as std::iterator, but now it is correctly std::map::iterator;
@@ -361,10 +1014,10 @@ Version 2.0.5 (19 April 2012)
template struct Map {
typedef Key key_type;
typedef T mapped_type;
- }
+ };
}
- tyepdef double DOUBLE;
- %typemap(MM) Std::Map;
+ typedef double DOUBLE;
+ %template(MM) Std::Map;
All symbols within Map will be resolved correctly, eg key_type and mapped_type no matter if the
wrapped code uses Std::Map or std::Map or Std::Map
@@ -3199,7 +3852,7 @@ Version 1.3.32 (November 15, 2007)
[C#] Added missing support for C++ class member pointers.
08/09/2007: wsfulton
- [C#, Java] Add support for $owner in the "out" typemaps like in the the scripting
+ [C#, Java] Add support for $owner in the "out" typemaps like in the scripting
language modules. Note that $owner has always been supported in the "javaout" / "csout"
typemaps.
@@ -3899,7 +4552,7 @@ Version 1.3.30 (November 13, 2006)
10/12/2006: wsfulton
[Java] Remove potential race condition on the proxy class' delete() method
(it is now a synchronized method, but is now customisable by changing the
- methodmodifiers attribute in the the javadestruct or javadestruct_derived typemap)
+ methodmodifiers attribute in the javadestruct or javadestruct_derived typemap)
[C#] Remove potential race condition on the proxy class' Dispose() method,
similar to Java's delete() above.
@@ -4707,7 +5360,7 @@ Version 1.3.28 (February 12, 2006)
%naturalvar std::string;
%include
- that will tell swig to use the the 'natural' wrapping
+ that will tell swig to use the 'natural' wrapping
mechanism to all std::string global and member
variables.
@@ -8214,7 +8867,7 @@ Version 1.3.23 (November 11, 2004)
b = B()
b.bar(1)
- note the the methods are emitted inside the classes,
+ note the methods are emitted inside the classes,
and hence, the %template name refers to the 'member'
method name, not a global namespace name.
@@ -11728,7 +12381,7 @@ Version 1.3.20 (December 17, 2003)
06/25/2003: mrose (Mark Rose)
[Python] Director typemap marshalling checks for null pointers when
walking the parameter list instead of relying soley on the parameter
- count. Cures a segfault that occured for multiple argument inv typemaps.
+ count. Cures a segfault that occurred for multiple argument inv typemaps.
Someone with more Swig experience should probably review this code.
06/24/2003: mkoeppe (Matthias Koeppe)
@@ -16162,7 +16815,7 @@ Version 1.3.12 (June 2, 2002)
%feature, %rename, %ignore, %exception, and related directives:
- Namespaces are fully integrated into the the renaming and declaration
+ Namespaces are fully integrated into the renaming and declaration
matcher. For example:
%rename(display) Foo::print; // Rename in namespace Foo
@@ -17203,7 +17856,7 @@ Version 1.3.10 (December 10, 2001)
shadow classes. In early implementations, shadow classes were
merely Python wrappers around typed pointer objects. However,
some users actually wanted to receive the shadow class object in C.
- To accomodate this, the dereferencing of the "this" pointer in
+ To accommodate this, the dereferencing of the "this" pointer in
a shadow class was moved to C as described in CHANGES [8/8/99].
However, the process of returning pointers to Python was still
somewhat problematic. Specifically, shadow classes never worked
@@ -19117,7 +19770,7 @@ Version 1.3.6 (July 9, 2001)
[Java] destructor (_delete()) was not aware of %name renaming
[Java] extends baseclass did not know about %name renaming
[Java] extends baseclass did extend even when the baseclass was not known to swig
- [Java] sometimes enum-declarations occured before the Java class declaration
+ [Java] sometimes enum-declarations occurred before the Java class declaration
[Java] unrelated enum initialisations no longer appear in Java class
[Java] if module ends in '_' correct JNI names are now produced
@@ -20270,7 +20923,7 @@ Version 1.3 Alpha 1 (February 11, 2000)
names or use %apply to map typemaps to alternate names.
8/8/99 : Handling of the 'this' pointer has been changed in Python shadow
- classes. Previously, dereferencing of '.this' occured in the
+ classes. Previously, dereferencing of '.this' occurred in the
Python shadow class itself. Now, this step occurs in the C
wrappers using the following function:
@@ -20827,7 +21480,7 @@ Version 1.1 Patch 1 (August 27, 1997)
Would generate completely bogus code with garbage replacing
the '%d'. Caused by one faulty use of printf (wasn't able to find
- any other occurences).
+ any other occurrences).
7/7/97 : Fixed bug in Python shadow class generation with non-member
functions that are returning more than one value.
@@ -20943,7 +21596,7 @@ Version 1.1 (June 24, 1997)
.... later ...
int OldName(int);
- Unlike %name, %rename will rename any occurence of the old name.
+ Unlike %name, %rename will rename any occurrence of the old name.
This applies to functions, variables, class members and so forth.
There is no way to disable %rename once set, but you can change the
name by redeclaring it to something else.
diff --git a/CHANGES.current b/CHANGES.current
index cb64a7937..98166efca 100644
--- a/CHANGES.current
+++ b/CHANGES.current
@@ -2,16 +2,6 @@ Below are the changes for the current release.
See the CHANGES file for changes in older releases.
See the RELEASENOTES file for a summary of changes in each release.
-Version 2.0.6 (30 April 2012)
-=============================
-
-2012-04-25: wsfulton
- [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.
-
-2012-04-28: wsfulton
- [Java] Patch 3521811 from Leo Davis - char **STRING_ARRAY typemaps fixed to handle
- null pointers.
+Version 2.0.11 (in progress)
+============================
diff --git a/COPYRIGHT b/COPYRIGHT
index e86a994fa..d0954a3eb 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -66,7 +66,7 @@ Past contributors include:
James Michael DuPont, Clark McGrew, Dustin Mitchell, Ian Cooke, Catalin Dumitrescu, Baran
Kovuk, Oleg Tolmatcev, Tal Shalif, Lluis Padro, Chris Seatory, Igor Bely, Robin Dunn,
Edward Zimmermann, David Ascher, Dominique Dumont, Pier Giorgio Esposito, Hasan Baran Kovuk,
- Klaus Wiederänders
+ Klaus Wiederänders, Richard Beare, Hans Oesterholt.
(See CHANGES and CHANGES.current and the bug tracker for a more complete list).
Past students:
diff --git a/Doc/Devel/engineering.html b/Doc/Devel/engineering.html
index 2e78fbe35..c12eb1328 100644
--- a/Doc/Devel/engineering.html
+++ b/Doc/Devel/engineering.html
@@ -25,7 +25,7 @@
8. Naming Conventions
9. Visibility
10. Miscellaneous Coding Guidelines
-11. SVN Tagging Conventions
+11. Git Tagging Conventions
@@ -119,8 +119,8 @@ are case-insensitive on Windows so this convention will prevent you from inadver
creating two files that differ in case-only.
-Each file should include a short abstract, license information and
-a SVN revision tag like this:
+Each file should include a short abstract and license information
+like this:
@@ -137,8 +137,6 @@ a SVN revision tag like this:
* This file defines ...
* ----------------------------------------------------------------------------- */
-static char cvs[] = "$Id$";
-
#include "swig.h"
/* Declarations */
@@ -159,12 +157,6 @@ static int avariable;
-The SVN revision tag should be placed into a static string as shown
-above mangled with the name of the file.
-This adds the revision information to the SWIG executable and
-makes it possible to extract version information from a raw binary
-(sometimes useful in debugging).
-
As a general rule, files start to get unmanageable once they exceed
about 2000 lines. Files larger than this should be broken up into
@@ -379,10 +371,10 @@ making your changes.
These are largely covered in the main documentation in the Extending.html file.
-11. SVN Tagging Conventions
+11. Git Tagging Conventions
-Use svn tag to declare some set of file revisions as related in some
+Use git tag to declare some set of file revisions as related in some
symbolic way. This eases reference, retrieval and manipulation of these files
later. At the moment (2001/01/16 14:02:53), the conventions are very simple;
let's hope they stay that way!
@@ -390,10 +382,10 @@ let's hope they stay that way!
There are two types of tags, internal (aka personal) and external.
Internal tags are used by SWIG developers primarily, whereas external
-tags are used when communicating with people w/ anonymous svn access.
+tags are used when communicating with people w/ anonymous git access.
- Internal tags should start with the developer name and a hyphen.
-
- External tags should start with "v-".
+
- External tags should start with "rel-".
That's all there is to it. Some example tags:
@@ -402,10 +394,8 @@ That's all there is to it. Some example tags:
ttn-pre-xml-patch
ttn-post-xml-patch
ttn-going-on-vacation-so-dutifully-tagging-now
- v-1-3-a37-fixes-bug-2432
- v-1-3-a37-fixes-bug-2433
- v-1-3-a37-fixes-bug-2432-again
- v-1-3-a37-release
+ rel-1.3.40
+ rel-2.0.9
diff --git a/Doc/Devel/internals.html b/Doc/Devel/internals.html
index d24869d10..94a82519d 100644
--- a/Doc/Devel/internals.html
+++ b/Doc/Devel/internals.html
@@ -42,6 +42,7 @@
7. Debugging SWIG
@@ -1179,6 +1180,34 @@ Either
+
+7.2 Debugging DOH memory allocation problems
+
+
+
+The DOH objects are reference counted and use pools for memory allocation.
+The implementation is in memory.c. When there are memory corruption problems,
+various memory allocator tools are normally used to diagnose problems. These can be used
+on SWIG and can be very useful. However, they won't necessarily find use of stale DOH objects,
+that is, DOH objects
+that are used after they have been deleted. This is because the DOH memory allocator
+grabs a chunk of memory from the C memory allocator and manages the usage internally.
+Stale DOH object usage can be checked for by defining DOH_DEBUG_MEMORY_POOLS in
+memory.c. If an attempt to use an object is made after the reference count is
+zero, an assertion is triggered instead of quietly re-using the stale object...
+
+
+
+
+swig: DOH/memory.c:91: DohCheck: Assertion `!DOH_object_already_deleted' failed.
+
+
+
+
+This can be memory intensive as previously used memory in the pool is not re-used so is
+only recommended for diagnosing memory corruption problems.
+
+
Copyright (C) 1999-2010 SWIG Development Team.
diff --git a/Doc/Manual/Allegrocl.html b/Doc/Manual/Allegrocl.html
index 5d00c4cd0..12b915ee2 100644
--- a/Doc/Manual/Allegrocl.html
+++ b/Doc/Manual/Allegrocl.html
@@ -1118,7 +1118,7 @@ namespace BAR {
function that returns an object (or pointer/reference) of C/C++
type X, the wrapping defun (or defmethod) on the Lisp
side will automatically wrap the pointer returned in an instance
- of the apropriate class. This makes it much easier to write and
+ of the appropriate class. This makes it much easier to write and
debug code than if pointers were passed around as a jumble of
integer values.
@@ -1613,7 +1613,7 @@ opoverload>
Variable length argument lists are not supported, by default. If
such a function is encountered, a warning will generated to
- stderr. Varargs are supported via the SWIG %vararg
+ stderr. Varargs are supported via the SWIG %varargs
directive. This directive allows you to specify a (finite)
argument list which will be inserted into the wrapper in place
of the variable length argument indicator. As an example,
@@ -1624,7 +1624,7 @@ opoverload>
See the following section
on Variable Length arguments
- provides examples on how %vararg can be used, along
+ provides examples on how %varargs can be used, along
with other ways such functions can be wrapped.
diff --git a/Doc/Manual/Android.html b/Doc/Manual/Android.html
index 443d77691..4d1be3944 100644
--- a/Doc/Manual/Android.html
+++ b/Doc/Manual/Android.html
@@ -15,7 +15,9 @@
Examples introduction
Simple C example
C++ class example
+Other examples
+C++ STL
@@ -45,7 +47,7 @@ This chapter contains a few Android specific notes and examples.
-The examples require the the Android SDK and Android NDK which can be installed as per instructions in the links.
+The examples require the Android SDK and Android NDK 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):
@@ -744,6 +746,36 @@ Run the app to see the result of calling the C++ code from Java:
+18.2.4 Other examples
+
+
+
+The Examples/android directory contains further examples which can be run and installed in a similar manner to the previous two examples.
+
+
+
+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.
+
+
+18.3 C++ STL
+
+
+
+Should the C++ Standard Template Library (STL) be required, an Application.mk file needs to be created
+in the same directory as the Android.mk directory containing information about the STL to use.
+See the NDK documentation in the $NDKROOT/docs folder especially CPLUSPLUS-SUPPORT.html.
+Below is an example of the Application.mk file to make the STLport static library available for use:
+
+
+
+
+# File: Application.mk
+APP_STL := gnustl_static
+
+
+
+