SWIG (Simplified Wrapper and Interface Generator) Version: 2.0.5 (19 April 2012) Tagline: SWIG is a compiler that integrates C and C++ with languages including Perl, Python, Tcl, Ruby, PHP, Java, Ocaml, Lua, Scheme (Guile, MzScheme, CHICKEN), Pike, C#, Modula-3, Common Lisp (CLISP, Allegro CL, CFFI, UFFI), Octave and R. SWIG reads annotated C/C++ header files and creates wrapper code (glue code) in order to make the corresponding C/C++ libraries available to the listed languages, or to extend C/C++ programs with a scripting language. Up-to-date SWIG related information can be found at http://www.swig.org A SWIG FAQ and other hints can be found on the SWIG Wiki: http://www.dabeaz.com/cgi-bin/wiki.pl License ======= Please see the LICENSE file for details of the SWIG license. Release Notes ============= Please see the CHANGES.current file for a detailed list of bug fixes and new features for the current release. The CHANGES file contains bug fixes and new features for older versions. A summary of changes in each release can be found in the RELEASENOTES file. Backwards Compatibility ======================= The developers strive their best to preserve backwards compatibility between releases, but this is not always possible as the overriding aim is to provide the best wrapping experience. Where backwards compatibility is known to be broken, it is clearly marked as an incompatibility in the CHANGES and CHANGES.current files. See the documentation for details of the SWIG_VERSION preprocessor symbol if you have backward compatibility issues and need to use more than one version of SWIG. Windows Installation ==================== Please see the Doc/Manual/Windows.html file for instructions on installing SWIG on Windows and running the examples. The Windows distribution is called swigwin and includes a prebuilt SWIG executable, swig.exe, included in the same directory as this README file. Otherwise it is exactly the same as the main SWIG distribution. There is no need to download anything else. Unix Installation ================= You must use GNU `make' to build SWIG. http://www.gnu.org/software/make/ PCRE needs to be installed on your system to build SWIG, in particular pcre-config must be available. If you have PCRE headers and libraries but not pcre-config itself or, alternatively, wish to override the compiler or linker flags returned by pcre-config, you may set PCRE_LIBS and PCRE_CFLAGS variables to be used instead. And if you don't have PCRE at all, the configure script will provide instructions for obtaining it. To build and install SWIG, simply type the following: % ./configure % make % make install By default SWIG installs itself in /usr/local. If you need to install SWIG in a different location or in your home directory, use the --prefix option to ./configure. For example: % ./configure --prefix=/home/yourname/projects % make % make install Note: the directory given to --prefix must be an absolute pathname. Do *NOT* use the ~ shell-escape to refer to your home directory. SWIG won't work properly if you do this. The file INSTALL details more about using configure. Also try % ./configure --help. The configure script will attempt to locate various packages on your machine including Tcl, Perl5, Python and all the other target languages that SWIG uses. Don't panic if you get 'not found' messages--SWIG does not need these packages to compile or run. The configure script is actually looking for these packages so that you can try out the SWIG examples contained in the 'Examples' directory without having to hack Makefiles. Note that the --without-xxx options, where xxx is a target language, have minimal effect. All they do is reduce the amount of testing done with 'make check'. The SWIG executable and library files installed cannot currently be configured with a subset of target languages. Please see the Documentation section below on installing documentation as none is installed by default. SWIG used to include a set of runtime libraries for some languages for working with multiple modules. These are no longer built during the installation stage. However, users can build them just like any wrapper module as described in the documentation, Doc/Manual/Modules.html. The CHANGES file also lists some examples which build the runtime library. Notes: (1) If you checked the code out via SVN, you will have to run ./autogen.sh before typing 'configure'. In addition, a full build of SWIG requires the a number of packages to be installed. Full instructions at http://www.swig.org/svn.html Macintosh OS X Installation ============================ SWIG is known to work on various flavors of OS X. Follow the Unix installation instructions above. However, as of this writing, there is still great deal of inconsistency with how shared libaries are handled by various scripting languages on OS X. We've tried to resolve these differences to the extent of our knowledge. Users of OS X should be aware that Darwin handles shared libraries and linking in a radically different way than most Unix systems. In order to test SWIG and run the examples, SWIG configures itself to use flat namespaces and to allow undefined symbols (-flat_namespace -undefined suppress). This mostly closely follows the Unix model and makes it more likely that the SWIG examples will work with whatever installation of software you might have. However, this is generally not the recommended technique for building larger extension modules. Instead, you should utilize Darwin's two-level namespaces. Some details about this can be found here http://developer.apple.com/documentation/ReleaseNotes/DeveloperTools/TwoLevelNamespaces.html Needless to say, you might have to experiment a bit to get things working at first. Testing ======= If you want to test SWIG before installation, type the following: % make -k check 'make -k check' requires at least one of the target languages to be installed. If it fails, it may mean that you have an uninstalled language module or that the file 'Examples/Makefile' has been incorrectly configured. It may also fail due to compiler issues such as broken C++ compiler. Even if 'make -k check' fails, there is a pretty good chance SWIG still works correctly---you will just have to mess around with one of the examples and some makefiles to get it to work. Some tests may also fail due to missing dependency packages, eg PCRE or Boost, but this will require careful analysis of the configure output. The testing suite executed by 'make -k check' is designed to stress-test many parts of the implementation including obscure corner cases. If some of these tests fail or generate warning messages, there is no reason for alarm---the test may be related to some new SWIG feature or a difficult bug that we're trying to resolve. Chances are that SWIG will work just fine for you. Note that if you have more than one CPU/core, then you can use parallel make to speed up the check as it does take quite some time to run, for example: % make -j2 -k check Also, SWIG's support for C++ is sufficiently advanced that certain tests may fail on older C++ compilers (for instance if your compiler does not support member templates). These errors are harmless if you don't intend to use these features in your own programs. Note: The test-suite currently contains over 500 tests. If you have many different target languages installed and a slow machine, it might take more than an hour to run the test-suite. Examples ======== The Examples directory contains a variety of examples of using SWIG and it has some browsable documentation. Simply point your browser to the file "Example/index.html". The Examples directory also includes Visual C++ project (.dsp) files for building some of the examples on Windows. Known Issues ============ There are minor known bugs, details of which are in the bug tracker, see http://www.swig.org/bugs.html. Troubleshooting =============== In order to operate correctly, SWIG relies upon a set of library files. If after building SWIG, you get error messages like this, % swig foo.i :1. Unable to find 'swig.swg' :3. Unable to find 'tcl8.swg' it means that SWIG has either been incorrectly configured or installed. To fix this: 1. Make sure you remembered to do a 'make install' and that the installation actually worked. Make sure you have write permission on the install directory. 2. If that doesn't work, type 'swig -swiglib' to find out where SWIG thinks its library is located. 3. If the location is not where you expect, perhaps you supplied a bad option to configure. Use ./configure --prefix=pathname to set the SWIG install location. Also, make sure you don't include a shell escape character such as ~ when you specify the path. 4. The SWIG library can be changed by setting the SWIG_LIB environment variable. However, you really shouldn't have to do this. If you are having other troubles, you might look at the SWIG Wiki at http://www.dabeaz.com/cgi-bin/wiki.pl. Documentation ============= The Doc/Manual directory contains the most recent set of updated documentation for this release. The documentation is available in three different formats, each of which contains identical content. These format are, pdf (Doc/Manual/SWIGDocumentation.pdf), single page html (Doc/Manual/SWIGDocumentation.html) or multiple page html (other files in Doc/Manual). Please select your chosen format and copy/install to wherever takes your fancy. There is some technical developer documentation available in the Doc/Devel subdirectory. This is not necessarily up-to-date, but it has some information on SWIG internals. Participate! ============ Please report any errors and submit patches (if possible)! We only have access to a limited variety of hardware (Linux, Solaris, OS-X, and Windows). All contributions help. If you would like to join the SWIG development team or contribute a language module to the distribution, please contact the swig-devel mailing list, details at http://www.swig.org/mail.html. -- The SWIG Maintainers 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.5 (19 April 2012) ============================= 2012-04-14: wsfulton [Lua] Apply patch #3517435 from Miles Bader - prefer to use Lua_pushglobaltable 2012-04-14: wsfulton [Ruby] Apply patch #3517769 from Robin Stocker to fix compile error on MacRuby using RSTRING_PTR. 2012-04-13: wsfulton Apply patch #3511009 from Leif Middelschulte for slightly optimised char * variable wrappers. 2012-04-13: wsfulton [Lua] Apply #3219676 from Shane Liesegang which adds: - support for %factory - a __tostring method - a __disown method 2012-04-13: wsfulton [Xml] Apply #3513569 which adds a catchlist to the xml output. 2012-04-05: olly [Lua] Add support for Lua 5.2 (patch SF#3514593 from Miles Bader) 2012-03-26: xavier98 [octave] Apply patch #3425993 from jgillis: add extra logic to the octave_swig_type::dims(void) method: it checks if the user has defined a __dims__ method and uses this in stead of returning (1,1) [octave] Apply patch #3424833 from jgillis: make is_object return true for swig types 2012-03-24: wsfulton [D] Apply #3502431 to fix duplicate symbols in multiple modules. 2012-03-21: wsfulton Fix #3494791 - %$isglobal for %rename matching. 2012-03-20: wsfulton Fix #3487706 and #3391906 - missing stddef.h include for ptrdiff_t when using %import for STL containers and compiling with g++-4.6. An include of stddef.h is now only generated when SWIG generates STL helper templates which require ptrdiff_t. If you were previously relying on "#include " always being generated when using a %include of an STL header, you may now need to add this in manually. 2012-03-16: wsfulton Apply patch #3392264 from Sebastien Bine to parse (unsigned) long long types in enum value assignment. 2012-03-16: wsfulton Apply patch #3505530 from Karl Wette to allow custom allocators in STL string classes for the UTL languages. 2012-03-13: wsfulton Apply patch #3468362 from Karl Wette to fix %include inside %define. 2012-03-13: wsfulton [Python, Ruby, Octave, R] Fix #3475492 - iterating through std::vector wrappers of enumerations. 2012-02-27: xavier98 (patches from Karl Wette) [Octave] Use -globals . to load global variables in module namespace [Octave] Comment declaration of unimplemented function swig_register_director [Octave] Fix OCTAVE_PATH in octave Makefiles [Octave] Add support for std::list - fix li_std_containers_int test [Octave] Fix imports test 2012-02-16: wsfulton [Java] Make generated support functions in arrays_java.i static so that generated code from multiple instances of SWIG can be compiled and linked together - problem reported by Evan Krause. 2012-01-24: wsfulton Fix crash with bad regex - bug #3474250. 2012-01-24: wsfulton [Python] Add Python stepped slicing support to the STL wrappers (std::vector, std::list). Assigning to a slice, reading a slice and deleting a slice with steps now work. For example: %template(vector_i) std::vector vi = vector_i(range(10)) print list(vi) vi[1:4:2] = [111, 333] print list(vi) del vi[3:10:3] print list(vi) print list(vi[::-1]) gives (same behaviour as native Python sequences such as list): [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] [0, 111, 2, 333, 4, 5, 6, 7, 8, 9] [0, 111, 2, 4, 5, 7, 8] [8, 7, 5, 4, 2, 111, 0] 2012-01-23: klickverbot [D] Correctly annotate function pointers with C linkage. [D] Exception and Error have become blessed names; removed d_exception_name test case. 2012-01-20: wsfulton [Python] Fix some indexing bugs in Python STL wrappers when the index is negative, eg: %template(vector_i) std::vector iv=vector_i([0,1,2,3,4,5]) iv[-7:] now returns [0, 1, 2, 3, 4, 5] instead of [5]. vv[7:9] = [22,33] now returns [0, 1, 2, 3, 4, 5, 22, 33] instead of "index out range" error. Also fix some segfaults when replacing ranges, eg when il is a std::list wrapper: il[0:2] = [11] 2012-01-17: wsfulton [Go] Fix forward class declaration within a class when used as a base. 2012-01-07: wsfulton [C#] Add support for %nspace when using directors. 2012-01-06: wsfulton [Java] Patch #3452560 from Brant Kyser - add support for %nspace when using directors. 2011-12-21: wsfulton The 'directorin' typemap now accepts $1, $2 etc expansions instead of having to use workarounds - $1_name, $2_name etc. 2011-12-20: wsfulton [Java] Add (char *STRING, size_t LENGTH) director typemaps. 2011-12-20: wsfulton [C#, Go, Java, D] Add support for the 'directorargout' typemap. 2011-12-20: wsfulton [Ocaml, Octave, PHP, Python, Ruby] Correct special variables in 'directorargout' typemap. This change will break any 'directorargout' typemaps you may have written. Please change: $result to $1 $input to $result Also fix the named 'directorargout' DIRECTOROUT typemaps for these languages which didn't previously compile and add in $1, $2 etc expansion. *** POTENTIAL INCOMPATIBILITY *** 2011-12-10: talby [perl5] SWIG_error() now gets decorated with perl source file/line number. [perl5] error handling now conforms to public XS api (fixes perl v5.14 issue). 2011-12-10: wsfulton [Android/Java] Fix directors to compile on Android. Added documentation and examples for Android. 2011-12-08: vadz Bug fix: Handle methods renamed or ignored in the base class correctly in the derived classes (they could be sometimes mysteriously not renamed or ignored there before). 2011-12-03: klickverbot [D] Fix exception glue code for newer DMD 2 versions. [D] Do not default to 32 bit glue code for DMD anymore. [D] Use stdc.config.c_long/c_ulong to represent C long types. 2011-12-01: szager [python] Fixed bug 3447426: memory leak in vector.__getitem__. 2011-11-30: wsfulton [R] Remove C++ comments from generated C code. 2011-11-27: olly [Python] Fix some warnings when compiling generated wrappers with certain GCC warning options (Debian bug #650246). 2011-11-28: wsfulton Fix #3433541 %typemap(in, numinputs=0) with 10+ arguments. 2011-11-28: olly [Perl] Fix warnings when compiling generated wrappers with certain GCC warning options (Debian bug #436711). 2011-11-28: olly [PHP] Update keyword list to include keywords added in PHP releases up to 5.3. 2011-11-25: wsfulton [C#] Provide an easy way to override the default visibility for the proxy class pointer constructors and getCPtr() method. The visibility is 'internal' by default and if multiple SWIG modules are being used and compiled into different assemblies, then they need to be 'public' in order to use the constructor or getCPtr() method from a different assembly. Use the following macros to change the visibilities in the proxy and type wrapper class: SWIG_CSBODY_PROXY(public, public, SWIGTYPE) SWIG_CSBODY_TYPEWRAPPER(public, public, public, SWIGTYPE) [Java] Provide an easy way to override the default visibility for the proxy class pointer constructors and getCPtr() method. The visibility is 'protected' by default and if multiple SWIG modules are being used and compiled into different packages, then they need to be 'public' in order to use the constructor or getCPtr() method from a different package. Use the following macros to change the visibilities in the proxy and type wrapper class: SWIG_JAVABODY_PROXY(public, public, SWIGTYPE) SWIG_JAVABODY_TYPEWRAPPER(public, public, public, SWIGTYPE) The default for Java has changed from public to protected for the proxy classes. Use the SWIG_JAVABODY_PROXY macro above to restore to the previous visibilities. *** POTENTIAL INCOMPATIBILITY *** 2011-11-22: szager [python] Bug 3440044: #ifdef out SWIG_Python_NonDynamicSetAttr if -builtin isn't being used, to avoid unnecessary binary incompatibilities between python installations. 2011-11-17: wsfulton Bug fix: Remove root directory from directory search list in Windows. 2011-11-13: wsfulton [Ruby] Apply patch #3421876 from Robin Stocker to fix #3416818 - same class name in different namespaces confusion when using multiple modules. 2011-11-11: wsfulton Fix pcre-build.sh to work with non-compressed tarballs - problem reported by Adrian Blakely. 2011-11-03: wsfulton Expand special variables in typemap warnings, eg: %typemap(in, warning="1000:Test warning for 'in' typemap for $1_type $1_name") int "..." 2011-11-01: wsfulton Fix named output typemaps not being used when the symbol uses a qualifier and contains a number, eg: %typemap(out) double ABC::m1 "..." 2011-10-24: talby [perl5] SF bug #3423119 - overload dispatch stack corruption fix. Better, but more research is needed on a stable path for tail calls in XS. Also, fix for large long longs in 32 bit perl. 2011-10-13: xavier98 [octave] Allow Octave modules to be re-loaded after a "clear all". 2011-09-19: wsfulton Fix regression introduced in swig-2.0.1 reported by Teemu Ikonone leading to uncompilable code when using typedef and function pointer references, for example: typedef int FN(const int &a, int b); void *typedef_call1(FN *& precallback, FN * postcallback); 2011-09-14: wsfulton [Lua] Patch #3408012 from Raman Gopalan - add support for embedded Lua (eLua) including options for targeting Lua Tiny RAM (LTR). 2011-09-14: wsfulton [C#] Add boost_intrusive_ptr.i library contribution from patch #3401571. 2011-09-13: wsfulton Add warnings for badly named destructors, eg: struct KStruct { ~NOT_KStruct() {} }; cpp_extend_destructors.i:92: Warning 521: Illegal destructor name ~NOT_KStruct. Ignored. 2011-09-13: wsfulton Fix %extend and destructors for templates. The destructor in %extend was not always wrapped, for example: %extend FooT { ~FooT() { delete $self; } // was not wrapped as expected }; template class FooT {}; %template(FooTi) FooT; 2011-09-13: wsfulton Fix special variables such as "$decl" and "$fulldecl" in destructors to include the ~ character. 2011-09-10: talby [perl5] SF bug #1481958 - Improve range checking for integer types. Enhance li_typemaps_runme.pl 2011-09-08: wsfulton Fix %extend on typedef classes in a namespace using the typedef name, for example: namespace Space { %extend CStruct { ... } typedef struct tagCStruct { ... } CStruct; } 2011-08-31: xavier98 [octave] patches from Karl Wette: improvements to module loading behavior; added example of friend operator to operator example; fixed octave panic/crash in 3.0.5; documentation improvements 2011-08-30: szager [python] Bug 3400486, fix error signalling for built-in constructors. 2011-08-26: wsfulton [Go] Fix file/line number display for "gotype" when using typemap debugging options -tmsearch and -tmused. 2011-08-26: wsfulton [C#, D] Fix %callback which was generating uncompileable code. 2011-08-25: wsfulton Fix constructors in named typedef class declarations as reported by Gregory Bronner: typedef struct A { A(){} // Constructor which was not accepted by SWIG B(){} // NOT a constructor --illegal, but was accepted by SWIG } B; For C code, the fix now results in the use of 'struct A *' instead of just 'B *' in the generated code when wrapping members in A, but ultimately this does not matter, as they are the same thing. 2011-08-23: wsfulton Fix %newobject when used in conjunction with %feature("ref") as reported by Jan Becker. The code from the "ref" feature was not always being generated for the function specified by %newobject. Documentation for "ref" and "unref" moved from Python to the C++ chapter. 2011-08-22: szager [python] Fixed memory leak with --builtin option (bug 3385089). 2011-08-22: wsfulton [Lua] SF patch #3394339 from Torsten Landschoff - new option -nomoduleglobal to disable installing the module table into the global namespace. Require call also returns the module table instead of a string. 2011-08-09: xavier98 Fix bug 3387394; Octave patches for 3.4.0 compatibility, etc. (from Karl Wette) 2011-08-04: wsfulton Add in $symname expansion for director methods. 2011-07-29: olly [PHP] Don't generate "return $r;" in cases where $r hasn't been set. This was basically harmless, except it generated a PHP E_NOTICE if the calling code had enabled them. 2011-07-26: wsfulton Fix scoping of forward class declarations nested within a class (for C++). Previously the symbol was incorrectly put into the outer namespace, eg namespace std { template struct map { class iterator; } } iterator was scoped as std::iterator, but now it is correctly std::map::iterator; Also fixed is %template and template parameters that are a typedef when the template contains default template parameters, eg: namespace Std { template struct Map { typedef Key key_type; typedef T mapped_type; } } tyepdef double DOUBLE; %typemap(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 Also fixes bug #3378145 - regression introduced in 2.0.4 - %template using traits. 2011-07-20 szager [python] Fix closure for tp_call slot. 2011-07-16: wsfulton [python] Fix director typemap using PyObject *. 2011-07-13: szager [python] SF patch #3365908 - Add all template parameters to map support code in std_map.i 2011-07-13: szager [python] Fix for bug 3324753: %rename member variables with -builtin. 2011-07-01: wsfulton Fix some scope and symbol lookup problems when template default parameters are being used with typedef. For example: template struct Foo { typedef XX X; typedef TT T; }; template struct UsesFoo { void x(typename Foo::T, typename Foo::X); }; Also fixes use of std::vector::size_type for Python as reported by Aubrey Barnard. 2011-06-23: olly [PHP] Fix director code to work when PHP is built with ZTS enabled, which is the standard configuration on Microsoft Windows. 2011-06-21: mutandiz [allegrocl] - various small tweaks and bug fixes. - Avoid name conflicts between smart pointer wrappers and the wrappers for the actual class. - Fix default typemaps for C bindings, which were incorrectly attempting to call non-existent destructors on user-defined types. - New feature, feature:aclmixins, for adding superclass to the foreign class wrappers. - Improve longlong typemaps. 2011-06-19: wsfulton Fix incorrect typemaps being used for a symbol within a templated type, eg: A::value_type would incorrectly use a typemap for type A. 2011-06-18: olly [Tcl] Fix variable declarations in middle of blocks which isn't permitted in C90 (issue probably introduced in 2.0.3 by patch #3224663). Reported by Paul Obermeier in SF#3288586. 2011-06-17: wsfulton [Java] SF #3312505 - slightly easier to wrap char[] or char[ANY] with a Java byte[] using arrays_java.i. 2011-06-13: wsfulton [Ruby, Octave] SF #3310528 Autodoc fixes similar to those described below for Python. 2011-06-10: wsfulton [Python] Few subtle bugfixes in autodoc documentation generation, - Unnamed argument names fix for autodoc levels > 0. - Display of template types fixed for autodoc levels > 1. - Fix SF #3310528 - display of typedef structs for autodoc levels > 1. - Add missing type for self for autodoc levels 1 and 3. - autodoc levels 2 and 3 documented. - Minor tweaks to autodoc style to conform with PEP8. 2011-05-30: olly [PHP] Fix handling of directors when -prefix is used. 2011-05-24: olly [PHP] Fix handling of methods of classes with a virtual base class (SF#3124665). This file contains a brief overview of the changes made in each release. A detailed description of changes are available in the CHANGES.current and CHANGES files. Release Notes ============= SWIG-2.0.5 summary: - Official Android support added including documentation and examples. - Improvements involving templates: 1) Various fixes with templates and typedef types. 2) Some template lookup problems fixed. 3) Templated type fixes to use correct typemaps. - Autodoc documentation generation improvements. - Python STL container wrappers improvements including addition of stepped slicing. - Approximately 70 fixes and minor enhancements for the following target languages: AllegroCL, C#, D, Go, Java, Lua, Ocaml, Octave, Perl, PHP, Python, R, Ruby, Tcl, Xml. SWIG-2.0.4 summary: - This is mainly a Python oriented release including support for Python built-in types for superior performance with the new -builtin option. The -builtin option is especially suitable for performance-critical libraries and applications that call wrapped methods repeatedly. See the python-specific chapter of the SWIG manual for more info. - Python 3.2 support has also been added and various Python bugs have been fixed. - Octave 3.4 support has also been added. - There are also the usual minor generic improvements, as well as bug fixes and enhancements for D, Guile, Lua, Octave, Perl and Tcl. SWIG-2.0.3 summary: - A bug fix release including a couple of fixes for regressions in the 2.0 series. SWIG-2.0.2 summary: - Support for the D language has been added. - Various bug fixes and minor enhancements. - Bug fixes particular to the Clisp, C#, Go, MzScheme, Ocaml, PHP, R, Ruby target languages. SWIG-2.0.1 summary: - Support for the Go language has been added. - New regular expression (regex) encoder for renaming symbols based on the Perl Compatible Regular Expressions (PCRE) library. - Numerous fixes in reporting file and line numbers in error and warning messages. - Various bug fixes and improvements in the C#, Lua, Perl, PHP, Ruby and Python language modules. SWIG-2.0.0 summary: - License changes, see LICENSE file and http://www.swig.org/legal.html. - Much better nested class/struct support. - Much improved template partial specialization and explicit specialization handling. - Namespace support improved with the 'nspace' feature where namespaces can be automatically translated into Java packages or C# namespaces. - Improved typemap and symbol table debugging. - Numerous subtle typemap matching rule changes when using the default (SWIGTYPE) type. These now work much like C++ class template partial specialization matching. - Other small enhancements for typemaps. Typemap fragments are also now official and documented. - Warning and error display refinements. - Wrapping of shared_ptr is improved and documented now. - Numerous C++ unary scope operator (::) fixes. - Better support for boolean expressions. - Various bug fixes and improvements in the Allegrocl, C#, Java, Lua, Octave, PHP, Python, R, Ruby and XML modules. SWIG-1.3.40 summary: - SWIG now supports directors for PHP. - PHP support improved in general. - Octave 3.2 support added. - Various bug fixes/enhancements for Allegrocl, C#, Java, Octave, Perl, Python, Ruby and Tcl. - Other generic fixes and minor new features. SWIG-1.3.39 summary: - Some new small feature enhancements. - Improved C# std::vector wrappers. - Bug fixes: mainly Python, but also Perl, MzScheme, CFFI, Allegrocl and Ruby SWIG-1.3.38 summary: - Output directory regression fix and other minor bug fixes SWIG-1.3.37 summary: - Python 3 support added - SWIG now ships with a version of ccache that can be used with SWIG. This enables the files generated by SWIG to be cached so that repeated use of SWIG on unchanged input files speeds up builds quite considerably. - PHP 4 support removed and PHP support improved in general - Improved C# array support - Numerous Allegro CL improvements - Bug fixes/enhancements for Python, PHP, Java, C#, Chicken, Allegro CL, CFFI, Ruby, Tcl, Perl, R, Lua. - Other minor generic bug fixes and enhancements SWIG-1.3.36 summary: - Enhancement to directors to wrap all protected members - Optimisation feature for objects returned by value - A few bugs fixes in the PHP, Java, Ruby, R, C#, Python, Lua and Perl modules - Other minor generic bug fixes SWIG-1.3.35 summary: - Octave language module added - Bug fixes in Python, Lua, Java, C#, Perl modules - A few other generic bugs and runtime assertions fixed SWIG-1.3.34 summary: - shared_ptr support for Python - Support for latest R - version 2.6 - Various minor improvements/bug fixes for R, Lua, Python, Java, C# - A few other generic bug fixes, mainly for templates and using statements SWIG-1.3.33 summary: - Fix regression for Perl where C++ wrappers would not compile - Fix regression parsing macros SWIG-1.3.32 summary: - shared_ptr support for Java and C# - Enhanced STL support for Ruby - Windows support for R - Fixed long-standing memory leak in PHP Module - Numerous fixes and minor enhancements for Allegrocl, C#, cffi, Chicken, Guile, Java, Lua, Ocaml, Perl, PHP, Python, Ruby, Tcl. - Improved warning support SWIG-1.3.31 summary: - Python modern classes regression fix SWIG-1.3.30 summary: - Python-2.5 support - New language module: R - Director support added for C# - Numerous director fixes and improvements - Improved mingw/msys support - Better constants support in Guile and chicken modules - Support for generating PHP5 class wrappers - Important Java premature garbage collection fix - Minor improvements/fixes in cffi, php, allegrocl, perl, chicken, lua, ruby, ocaml, python, java, c# and guile language modules - Many many other bug fixes SWIG-1.3.29 summary: - Numerous important bug fixes - Few minor new features - Some performance improvements in generated code for Python SWIG-1.3.28 summary: - More powerful renaming (%rename) capability. - More user friendly warning handling. - Add finer control for default constructors and destructors. We discourage the use of the 'nodefault' option, which disables both constructors and destructors, leading to possible memory leaks. Use instead 'nodefaultctor' and/or 'nodefaultdtor'. - Automatic copy constructor wrapper generation via the 'copyctor' option/feature. - Better handling of Windows extensions and types. - Better runtime error reporting. - Add the %catches directive to catch and dispatch exceptions. - Add the %naturalvar directive for more 'natural' variable wrapping. - Better default handling of std::string variables using the %naturalvar directive. - Add the %allowexcept and %exceptionvar directives to handle exceptions when accessing a variable. - Add the %delobject directive to mark methods that act like destructors. - Add the -fastdispatch option to enable smaller and faster overload dispatch mechanism. - Template support for %rename, %feature and %typemap improved. - Add/doc more debug options, such as -dump_module, -debug_typemaps, etc. - Unified typemap library (UTL) potentially providing core typemaps for all scripting languages based on the recently evolving Python typemaps. - New language module: Common Lisp with CFFI. - Python, Ruby, Perl and Tcl use the new UTL, many old reported and hidden errors with typemaps are now fixed. - Initial Java support for languages using the UTL via GCJ, you can now use Java libraries in your favorite script language using gcj + swig. - Tcl support for std::wstring. - PHP4 module update, many error fixes and actively maintained again. - Allegrocl support for C++, also enhanced C support. - Ruby support for bang methods. - Ruby support for user classes as native exceptions. - Perl improved dispatching in overloaded functions via the new cast and rank mechanism. - Perl improved backward compatibility, 5.004 and later tested and working. - Python improved backward compatibility, 1.5.2 and later tested and working. - Python can use the same cast/rank mechanism via the -castmode option. - Python implicit conversion mechanism similar to C++, via the %implicitconv directive (replaces and improves the implicit.i library). - Python threading support added. - Python STL support improved, iterators are supported and STL containers can use now the native PyObject type. - Python many performance options and improvements, try the -O option to test all of them. Python runtime benchmarks show up to 20 times better performance compared to 1.3.27 and older versions. - Python support for 'multi-inheritance' on the python side. - Python simplified proxy classes, now swig doesn't need to generate the additional 'ClassPtr' classes. - Python extended support for smart pointers. - Python better support for static member variables. - Python backward compatibility improved, many projects that used to work only with swig-1.3.21 to swig-1.3.24 are working again with swig-1.3.28 - Python test-suite is now 'valgrinded' before release, and swig also reports memory leaks due to missing destructors. - Minor bug fixes and improvements to the Lua, Ruby, Java, C#, Python, Guile, Chicken, Tcl and Perl modules. SWIG-1.3.27 summary: - Fix bug in anonymous typedef structures which was leading to strange behaviour SWIG-1.3.26 summary: - New language modules: Lua, CLISP and Common Lisp with UFFI. - Big overhaul to the PHP module. - Change to the way 'extern' is handled. - Minor bug fixes specific to C#, Java, Modula3, Ocaml, Allegro CL, XML, Lisp s-expressions, Tcl, Ruby and Python modules. - Other minor improvements and bug fixes. SWIG-1.3.25 summary: - Improved runtime type system. Speed of module loading improved in modules with lots of types. SWIG_RUNTIME_VERSION has been increased from 1 to 2, but the API is exactly the same; only internal changes were made. - The languages that use the runtime type system now support external access to the runtime type system. - Various improvements with typemaps and template handling. - Fewer warnings in generated code. - Improved colour documentation. - Many C# module improvements (exception handling, prevention of early garbage collection, C# attributes support added, more flexible type marshalling/asymmetric types.) - Minor improvements and bug fixes specific to the C#, Java, TCL, Guile, Chicken, MzScheme, Perl, Php, Python, Ruby and Ocaml modules). - Various other bug fixes and memory leak fixes. SWIG-1.3.24 summary: - Improved enum handling - More runtime library options - More bugs fixes for templates and template default arguments, directors and other areas. - Better smart pointer support, including data members, static members and %extend. SWIG-1.3.23 summary: - Improved support for callbacks - Python docstring support and better error handling - C++ default argument support for Java and C# added. - Improved c++ default argument support for the scripting languages plus option to use original (compact) default arguments. - %feature and %ignore/%rename bug fixes and mods - they might need default arguments specified to maintain compatible behaviour when using the new default arguments wrapping. - Runtime library changes: Runtime code can now exist in more than one module and so need not be compiled into just one module - Further improved support for templates and namespaces - Overloaded templated function support added - More powerful default typemaps (mixed default typemaps) - Some important %extend and director code bug fixes - Guile now defaults to using SCM API. The old interface can be obtained by the -gh option. - Various minor improvements and bug fixes for C#, Chicken, Guile, Java, MzScheme, Perl, Python and Ruby - Improved dependencies generation for constructing Makefiles. SWIG-1.3.22 summary: - Improved exception handling and translation of C errors or C++ exceptions into target language exceptions. - Improved enum support, mapping to built-in Java 1.5 enums and C# enums or the typesafe enum pattern for these two languages. - Python - much better STL suppport and support for std::wstring, wchar_t and FILE *. - Initial support for Modula3 and Allegro CL. - 64 bit TCL support. - Java and C#'s proxy classes are now nearly 100% generated from typemaps and/or features for finer control on the generated code. - SWIG runtime library support deprecation. - Improved documentation. SWIG now additionally provides documentation in the form of a single HTML page as well as a pdf document. - Enhanced C++ friend declaration support. - Better support for reference counted classes. - Various %fragment improvements. - RPM fixes. - Various minor improvements and bug fixes for C#, Chicken, Guile, Java, MzScheme, Perl, Php, Python, Ruby and XML.