Swig

Latest version: v4.2.1

Safety actively analyzes 638430 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 13

3.0.1

===========================

2014-05-25: hfalcic
[Python] Python 3 byte string output: use errors="surrogateescape"
if available on the version of Python that's in use. This allows
obtaining the original byte string (and potentially trying a fallback
encoding) if the bytes can't be decoded as UTF-8.

Previously, a UnicodeDecodeError would be raised with no way to treat
the data as bytes or try another codec.

2014-05-18: vkalinin
Bug 175 - Restore %extend to work for unnamed nested structures by using a C
symbol comprising the outer structure name and unnamed variable instance name.

2014-05-15: kwwette
Add 166 - 'make check' now works out of source. This required the examples to build
out of source. The main languages have been tested - C, Go, Guile, Java, Javascript,
Lua, Octave, Perl, PHP, Python, Ruby and Tcl.

2014-05-01: Oliver Buchtala
Javascript support added, see Javascript chapter in the documentation.

2014-05-01: olly
[PHP] The generated __isset() method now returns true for read-only properties.

2014-04-24: kwwette
[Go] Fix go ./configure parsing of gccgo --version, and
goruntime.swg typo in __GNUC_PATCHLEVEL__ (SF Bug 1298)

2014-04-24: kwwette
Fix {python|perl5|ruby|tcl}/java examples

In Lib/gcj/cni.i, for compatibility with newer gcj versions:

- remove JvAllocObject() which gcj no longer defines, from gcj Changelog:
2004-04-16 Bryce McKinlay <mckinlayredhat.com>
* gcj/cni.h (JvAllocObject): Remove these obsolete,
undocumented CNI calls.

- change JvCreateJavaVM() argument from void* to JvVMInitArgs*, from gcj Changelog:
2005-02-23 Thomas Fitzsimmons <fitzsimredhat.com>
PR libgcj/16923
...
(JvCreateJavaVM): Declare vm_args as JvVMInitArgs* rather than void*.

*** POTENTIAL INCOMPATIBILITY ***

2014-04-08: wsfulton
SF Bug 1366 - Remove duplicate declarations of strtoimax and strtoumax in inttypes.i

2014-04-08: wsfulton
[Java C] Enums which have been ignored via %ignore and are subsequently
used are handled slightly differently. Type wrapper classes are now generated
which are effectively a wrapper of an empty enum. Previously in Java uncompilable
code was generated and in C an int was used.

2014-04-04: wsfulton
Fix regression in 3.0.0 where legal code following an operator<< definition might
give a syntax error. SF Bug 1365.

2014-04-03: olly
[PHP] Fix wrapping director constructors with default parameters
with a ZTS-enabled build of PHP.

2014-04-02: olly
[PHP] Pass the ZTS context we already have to avoid needing to
call TSRMLS_FETCH, which is relatively expensive.

2014-04-02: olly
[PHP] Pass ZTS context through to t_output_helper() so it works
with a ZTS-enabled build of PHP. Reported by Pierre Labastie in
github PR155.

2014-03-28: wsfulton
[Java C D Go] Fixes for C enums used in an API and the definition of the enum
has not been parsed. For D, this fixes a segfault in SWIG. The other languages
now produce code that compiles, although the definition of the enum is needed
in order to use the enum properly from the target language.

2014-03-23: v-for-vandal
[Lua] Fix for usage of snprintf in Lua runtime which Visual Studio does not have.

3.0.0

===========================

2014-03-16: wsfulton
C++11 support initially developed as C++0x support by Matevz Jekovec as a Google Summer of Code
project has been further extended. The C++11 support is comprehensive, but by no means complete
or without limitations. Full details for each new feature in C++11 is covered in the
CPlusPlus11.html chapter in the documentation which is included in SWIG and also available
online at https://www.swig.org/Doc3.0/CPlusPlus11.html.

2014-03-14: v-for-vandal
[Lua] Numerous Lua improvements:
1. %nspace support has been added. Namespaces are mapped to tables in the module, with the same
name as the C++ namespace.
2. Inheritance is now handled differently. Each class metatable keeps a list of class bases instead
of merging all members of all bases into the derived class.
3. The new metatables result in differences in accessing class members. For example:

%module example
struct Test {
enum { TEST1 = 10, TEST2 = 20 };
static const int ICONST = 12;
};

Now this can be used as follows:
print(example.Test.TEST1)
print(example.Test.ICONST)
The old way was:
print(example.Test_TEST1)
print(example.Test_ICONST)

4. The special class metatable member ".constructor" was removed. Now SWIG generates the proxy
function by itself and assigns it directly to the class table "__call" method.
5. eLua should also now support inheritance.
6. 'const' subtable in eLua is considered deprecated.

Changes in behaviour:
a. You can no longer assign to non-existing class members in classes without a __setitem__ method.
It will cause a Lua error.
b. You can no longer iterate over a module table and copy everything into the global namespace.
Actually, this was never the case, but it is now explicitly prohibited.
c. Now changing a base class will immediately affect all derived classes.
d. There might be some issues with inheritance. Although the bases iteration scheme is the same
as was used for merging base classes into derived one, some unknown issues may arise.

The old metatable behaviour can be restored by using the -no-old-metatable-bindings option.

*** POTENTIAL INCOMPATIBILITY ***

2014-03-06: wsfulton
[Python] Change in default behaviour wrapping C++ bool. Only a Python True or False
will now work for C++ bool parameters. This fixes overloading bool with other types.
Python 2.3 minimum is now required for wrapping bool.

When wrapping:

const char* overloaded(bool value) { return "bool"; }
const char* overloaded(int value) { return "int"; }

Previous behaviour:
>>> overloaded(False)
'int'
>>> overloaded(True)
'int'
>>> overloaded(0)
'int'

Now we get the expected behaviour:
>>> overloaded(False)
'bool'
>>> overloaded(0)
'int'

The consequence is when wrapping bool in non-overloaded functions:

const char* boolfunction(bool value) { return value ? "true" : "false"; }

The previous behaviour was very Pythonic:
>>> boolfunction("")
'false'
>>> boolfunction("hi")
'true'
>>> boolfunction(12.34)
'true'
>>> boolfunction(0)
'false'
>>> boolfunction(1)
'true'

Now the new behaviour more along the lines of C++ due to stricter type checking. The
above calls result in an exception and need to be explicitly converted into a bool as
follows:
>>> boolfunction(0)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: in method 'boolfunction', argument 1 of type 'bool'
>>> boolfunction(bool(0))
'false'

The old behaviour can be resurrected by passing the -DSWIG_PYTHON_LEGACY_BOOL command line
parameter when executing SWIG. Typemaps can of course be written to customise the behaviour
for specific parameters.

*** POTENTIAL INCOMPATIBILITY ***

2014-03-06: wsfulton
Fix SF Bug 1363 - Problem with method overloading when some methods are added by %extend
and others are real methods and using template default parameters with smart pointers.
This is noticeable as a regression since 2.0.12 when using the default smart pointer
handling for some languages when the smart pointer wraps std::map and other STL containers.

2014-03-02: wsfulton
[Python] SF Patch 346 from Jens Krueger. Correct exception thrown attempting to
access a non-existent C/C++ global variable on the 'cvar' object. The exception thrown
used to be a NameError. However, as this access is via a primary, an AttributeError
is more correct and so the exception thrown now is an AttributeError. Reference:
http://docs.python.org/2/reference/expressions.html#attribute-references

*** POTENTIAL INCOMPATIBILITY ***

2014-03-01: wsfulton
[Python] Patch 143 Fix type shown when using type() to include the module and package
name when using -builtin.

2014-03-01: wsfulton
[Python] SF patch 347 Fix missing argument count checking with -modern.
Fixes regression introduced when builtin changes were introduced in SWIG-2.0.3.

2014-02-21: wsfulton
[PHP] Fix warning suppression using %warnfilter for PHP reserved class names.

2014-02-19: olly
[Lua] Add keyword warnings for Lua keywords and Basic Functions.

2014-02-19: olly
-Wallkw now includes keywords for all languages with keyword
warnings (previously Go and R were missing).

2014-02-19: olly
[PHP] Update the lists of PHP keywords with new ones from PHP 5.4
and newer (and some missing ones from 5.3). Reserved PHP constants
names are now checked against enum values and constants, instead
of against function and method names. Built-in PHP function names
no longer match methods added by %extend. Functions and methods
named '__sleep', '__wakeup', 'not', 'parent', or 'virtual' are no
longer needlessly renamed.

2014-02-15: wsfulton
Fix the %$ismember %rename predicates to also apply to members added via %extend.

Add %$isextendmember for %rename of members added via %extend. This can be used to
distinguish between normal class/struct members and %extend members. For example
'%$ismember, %$not %$isextendmember' will now identify just class/struct members.

*** POTENTIAL INCOMPATIBILITY ***

2014-02-16: hfalcic
[Python] Patch 137 - fix crashes/exceptions in exception handling in Python 3.3

2014-02-15: wsfulton
[Java] Add support for the cdata library.

2014-02-08: vkalinin
Nested class support added. This primarily allows SWIG to properly parse nested
classes and keep the nested class information in the parse tree. Java and C
have utilised this information wrapping the C++ nested classes as Java/C
nested classes. The remaining target languages ignore nested classes as in
previous versions. Help is needed by users of these remaining languages to
design how C++ nested classes can be best wrapped. Please talk to us on the
swig-devel mailing list if you think you can help.

Previously, there was limited nested class support. Nested classes were treated
as opaque pointers. However, the "nestedworkaround" feature provided a way to
wrap a nested class as if it was a global class. This feature no longer exists
and is replaced by the new "flatnested" feature. This effectively does the same
thing with less manual code to be written. Please see the 'Nested classes'
section in the documentation in SWIGPlus.html if you were previously using this
feature.

SWIG now parses the contents of nested classes where previously it did not. You
may find that you will need to make adjustments to your interface file as
effectively extra code is being wrapped.

*** POTENTIAL INCOMPATIBILITY ***

2014-02-06: gjanssens
[Guile] Patch 133. Make scm to string conversion work with non-ascii strings.
Guile 2 has a completely rewritten string implementation. SWIG made some assumptions
that are no longer valid as to the internals of guile's string representation.

2014-01-30: wsfulton
[C] Add new swigtype_inout.i library containing SWIGTYPE *& OUTPUT typemaps.

Example usage wrapping:

void f(XXX *& x) { x = new XXX(111); }

would be:

XXX x = null;
f(out x);
// use x
x.Dispose(); // manually clear memory or otherwise leave out and leave it to the garbage collector

2014-01-21: ianlancetaylor
[Go] Add %go_import directive.

2014-01-21: ianlancetaylor
[Go] Add support for Go 1.3, not yet released.

2014-01-20: wsfulton
Director exceptions (Swig::DirectorException) now derive from std::exception
and hence provide the what() method. In Python and Ruby, this replaces the now
deprecated DirectorException::getMessage() method.

2014-01-14: diorcety
Patch 112 - Fix symbol resolution involving scopes that have multiple levels
of typedefs - fixes some template resolutions as well as some typemap searches.

2014-01-11: wsfulton
Fix and document the naturalvar feature override behaviour - the naturalvar
feature attached to a variable name has precedence over the naturalvar
feature attached to the variable's type. The overriding was not working
when turning the feature off on the variable's name.

Fix so that any use of the naturalvar feature will override the global
setting. Previously when set globally by -naturalvar or %module(naturalvar=1),
use of the naturalvar feature was not always honoured.

2014-01-06: ianlancetaylor
[Go] Fix bug that broke using directors from a thread not
created by Go.

2013-12-24: ptomulik
[Python] SF Bug 1297

Resolve several issues related to python imports.
For example, it's now possible to import modules having the same module
names, but belonging in different packages.

From the user's viewpoint, this patch gives a little bit more control on
import statements generated by SWIG. The user may choose to use relative
or absolute imports.

Some details:
- we (still) generate import statements in the form 'import a.b.c' which
corresponds to absolute imports in python3 and (the only available)
ambiguous one in python2.
- added -relativeimport option to use explicit relative import syntax
(python3),

The "Python Packages" section in the documentation discusses how to work
with importing packages including the new -relativeimport command line option.

2013-12-23: vadz
[Octave, Perl, Python, R, Ruby, Tcl] Change the length of strings created from fixed-size char
buffers in C code.

This is a potential backwards compatibility break: a "char buf[5]" containing "ho\0la" was
returned as a string of length 5 before, but is returned as a string of length 2 now. Also,
it was possible to assign a (non-NUL-terminated) string "hello" to such a buffer before but
now this fails and only "helo" can fit.

Apply "char FIXSIZE[ANY]" typemaps to explicitly choose the old behaviour.

*** POTENTIAL INCOMPATIBILITY ***

2013-12-23: talby
[Perl] Add support for directors.

2013-12-18: ianlancetaylor
[Go] Don't require that Go environment variables be set
when running examples or testsuite when using Go 1 or
later.

2013-12-17: ianlancetaylor
[Go] Remove -longsize option (for backward compatibility,
ignore it if seen).

2013-12-17: ianlancetaylor
[Go] Add -go-pkgpath option.

2013-12-16: ianlancetaylor
[Go] Update for Go 1.2 release. Add support for linking
SWIG code directly into executable, rather than using a
shared library.

2013-12-13: ianlancetaylor
[Go] Add SWIG source file name as comments in generated
files. This can be used by Go documentation tools.

2013-12-12: jleveque
[Lua] Fix typo (wchar instead of wchar_t) which made wchar.i
for Lua useless.

2013-12-12: vmiklos
[PHP] PHP's peculiar call-time pass-by-reference feature was
deprecated in PHP 5.3 and removed in PHP 5.4, so update the REF
typemaps in phppointers.i to specify pass-by-reference in the
function definition. Examples/php/pointer has been updated
accordingly.

2013-12-12: olly
[PHP] The usage of $input in PHP directorout typemaps has been
changed to be consistent with other languages. The typemaps
provided by SWIG have been updated accordingly, but if you
have written your own directorout typemaps, you'll need to
update $input to &$input (or make equivalent changes).

*** POTENTIAL INCOMPATIBILITY ***

2013-11-27: vadz
[C, Java, Python] Add std_auto_ptr.i defining typemaps for returning std::auto_ptr<>.

2013-11-09: wsfulton
[C] Apply patch 79 from Brant Kyser
- Remove using directives from the generated C code and fully qualify the use of all .NET
framework types in order to minimize potential name collisions from input files defining
types, namespace, etc with the same name as .NET framework members.
- Globally qualify the use of .NET framework types in the System namespace
- Remove .NET 1.1 support, .NET 2 is the minimum for the C module

This is a potential backwards compatibility break if code has been added relying on these using
statements that used to be generated:

using System;
using System.Runtime.InteropServices;

The quick fix to add these back in is to add the -DSWIG2_CSHARP command line option when
executing SWIG. See CSharp.html documentation for more info.

*** POTENTIAL INCOMPATIBILITY ***

2013-11-05: wsfulton
[Java] Fix some corner cases for the $packagepath/$javaclassname special variable substitution.

2013-11-05: wsfulton
[Java] Apply patch 91 from Marvin Greenberg - Add director:except feature for improved
exception handling in director methods for Java.

2013-10-15: vadz
Allow using \l, \L, \u, \U and \E in the substitution part of %(regex:/pattern/subst/)
inside %rename to change the case of the text being replaced.

2013-10-12: wsfulton
[CFFI] Apply 96 - superclass not lispify

2013-10-12: wsfulton
Merge in C++11 support from the gsoc2009-matevz branch where Matevz Jekovec first
started the C++0x additions. Documentation of the C++11 features supported is in a
new Chapter of the documentation, "SWIG and C++11" in Doc/Manual/CPlusPlus11.html.

2013-10-04: wsfulton
Fix %naturalvar not having any affect on templated classes instantiated with an
enum as the template parameter type. Problem reported by Vadim Zeitlin.

2013-09-20: wsfulton
[Java] Fix a memory leak for the java char **STRING_ARRAY typemaps.

2.0.12

===========================

2014-01-16: wsfulton
[PHP] Fix compilation error in ZTS mode (64 bit windows) due to incorrect placement
of TSRMLS_FETCH() in SWIG_Php_GetModule() as reported by Mark Dawson-Butterworth.

2014-01-13: kwwette
[Octave] update support to Octave version 3.8.0

- Octave 3.8.0 no longer defines OCTAVE_API_VERSION_NUMBER, but 3.8.1
will define OCTAVE_{MAJOR,MINOR,PATCH}_VERSION instead: see
http://hg.savannah.gnu.org/hgweb/octave/rev/b6b6e0dc700e
So we now use a new macro SWIG_OCTAVE_PREREQ(major,minor,patch) to
enable features requiring Octave version major.minor.patch or later.

For Octave versions prior to 3.8.1, we reconstruct values for
OCTAVE_{MAJOR,MINOR,PATCH}_VERSION based on OCTAVE_API_VERSION_NUMBER,
extracted from Octave's ChangeLogs. An additional hack is needed to
distinguish between Octave <= 3.2.x and 3.8.0, neither of which define
OCTAVE_API_VERSION_NUMBER.

- Octave 3.8.0 deprecates symbol_table::varref(), so remove its use
for this and future versions of Octave.

- Octave 3.8.0 removes octave_value::is_real_nd_array(), used in
octave_swig_type::dims(). Its use is not required here, so remove it.

- Retested against Octave versions 3.0.5, 3.2.4, 3.4.3, 3.6.4, and 3.8.0.

- Updated Octave documentation with tested Octave versions, and added a
warning against using versions <= 3.x.x, which are no longer tested.

2013-12-22: wsfulton
C++11 support for new versions of erase and insert in the STL containers.

The erase and insert methods in the containers use const_iterator instead
of iterator in C++11. There are times when the methods wrapped must match
the parameters exactly. Specifically when full type information for
template types is missing or SWIG fails to look up the type correctly,
for example:

%include <std_vector.i>
typedef float Real;
%template(RealVector) std::vector<Real>;

SWIG does not find std::vector<Real>::iterator because %template using
typedefs does not always work and so SWIG doesn't know if the type is
copyable and so uses SwigValueWrapper<iterator> which does
not support conversion to another type (const_iterator). This resulted
in compilation errors when using the C++11 version of the containers.

Closes 73

2013-10-17: wsfulton
[R] Fix SF 1340 - Visual Studio compile error in C++ wrappers due to include <exception>
within extern "C" block.

2013-10-17: wsfulton
[Python] Fix SF 1345 - Missing include <stddef.h> for offsetof when using -builtin.

2013-10-12: wsfulton
[Lua] Apply 92 - missing return statements for SWIG_Lua_add_namespace_details()
and SWIG_Lua_namespace_register().

2.0.11

============================

2013-09-15: wsfulton
[R] Fix attempt to free a non-heap object in OUTPUT typemaps for:
unsigned short *OUTPUT
unsigned long *OUTPUT
signed long long *OUTPUT
char *OUTPUT
signed char*OUTPUT
unsigned char*OUTPUT

2013-09-12: wsfulton
[Lua] Pull Git patch 62.
1) Static members and static functions inside class can be accessed as
ModuleName.ClassName.FunctionName (MemberName respectively). Old way such as
ModuleName.ClassName_FunctionName still works.
2) Same goes for enums inside classes: ModuleName.ClassName.EnumValue1 etc.

2013-09-12: wsfulton
[UTL] Infinity is now by default an acceptable value for type 'float'. This fix makes
the handling of type 'float' and 'double' the same. The implementation requires the
C99 isfinite() macro, or otherwise some platform dependent equivalents, to be available.

Users requiring the old behaviour of not accepting infinity, can define a 'check' typemap
wherever a float is used, such as:

%typemap(check,fragment="<float.h>") float, const float & %{
if ($1 < -FLT_MAX || $1 > FLT_MAX) {
SWIG_exception_fail(SWIG_TypeError, "Overflow in type float");
}
%}

*** POTENTIAL INCOMPATIBILITY ***

2013-08-30: wsfulton
[Lua] Pull Git patch 81: Include Lua error locus in SWIG error messages.
This is standard information in Lua error messages, and makes it much
easier to find bugs.

2013-08-29: wsfulton
Pull Git patch 75: Handle UTF-8 files with BOM at beginning of file. Was giving an
'Illegal token' syntax error.

2013-08-29: wsfulton
[C] Pull Git patch 77: Allow exporting std::map using non-default comparison function.

2013-08-28: wsfulton
[Python] %implicitconv is improved for overloaded functions. Like in C++, the methods
with the actual types are considered before trying implicit conversions. Example:

%implicitconv A;
struct A {
A(int i);
};
class CCC {
public:
int xx(int i) { return 11; }
int xx(const A& i) { return 22; }
};

The following python code:

CCC().xx(-1)

will now return 11 instead of 22 - the implicit conversion is not done.

2013-08-23: olly
[Python] Fix clang++ warning in generated wrapper code.

2013-08-16: wsfulton
[Python] %implicitconv will now accept None where the implicit conversion takes a C/C++ pointer.
Problem highlighted by Bo Peng. Closes SF patch 230.

2013-08-07: wsfulton
[Python] SF Patch 326 from Kris Thielemans - Remove SwigPyObject_print and SwigPyObject_str and
make the generated wrapper use the default python implementations, which will fall back to repr
(for -builtin option).

Advantages:
- it avoids the swig user having to jump through hoops to get print to work as expected when
redefining repr/str slots.
- typing the name of a variable on the python prompt now prints the result of a (possibly redefined)
repr, without the swig user having to do any extra work.
- when redefining repr, the swig user doesn't necessarily have to redefine str as it will call the
redefined repr
- the behaviour is exactly the same as without the -builtin option while requiring no extra work
by the user (aside from adding the %feature("python:slot...) statements of course)

Disadvantage:
- default str() will give different (but clearer?) output on swigged classes

2013-07-30: wsfulton
[Python, Ruby] Fix 64 65: Missing code in std::multimap wrappers. Previously an instantiation
of a std::map was erroneously required in addition to an instantiation of std::multimap with the
same template parameters to prevent compilation errors for the wrappers of a std::multimap.

2013-07-14: joequant
[R] Change types file to allow for SEXP return values

2013-07-05: wsfulton
[Python] Add %pythonbegin directive which works like %pythoncode, except the specified code is
added at the beginning of the generated .py file. This is primarily needed for importing from
__future__ statements required to be at the very beginning of the file. Example:

%pythonbegin %{
from __future__ import print_function
print("Loading", "Whizz", "Bang", sep=' ... ')
%}

2013-07-01: wsfulton
[Python] Apply SF patch 340 - Uninitialized variable fix in SWIG_Python_NonDynamicSetAttr
when using -builtin.

2013-07-01: wsfulton
[Python, Ruby, Ocaml] Apply SF patch 341 - fix a const_cast in generated code that was generating
a <:: digraph when using the unary scope operator (::) (global scope) in a template type.

2013-07-01: wsfulton
[Python] Add SF patch 342 from Christian Delbaere to fix some director classes crashing on
object deletion when using -builtin. Fixes SF bug 1301.

2013-06-11: wsfulton
[Python] Add SWIG_PYTHON_INTERPRETER_NO_DEBUG macro which can be defined to use the Release version
of the Python interpreter in Debug builds of the wrappers. The Visual Studio .dsp example
files have been modified to use this so that Debug builds will now work without having
to install or build a Debug build of the interpreter.

2013-06-07: wsfulton
[Ruby] Git issue 52. Fix regression with missing rb_complex_new function for Ruby
versions prior to 1.9 using std::complex wrappers if just using std::complex as an output type.
Also fix the Complex helper functions external visibility (to static by default).

2013-06-04: olly
[PHP] Fix SWIG_ZTS_ConvertResourcePtr() not to dereference NULL
if the type lookup fails.

2.0.10

============================

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 conjunction 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<swig::LANGUAGE_OBJ, swig::LANGUAGE_OBJ, swig::BinaryPredicate<> >;

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.

2.0.9

================================

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, Classmethods and Classconstants 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 $parentclassname $parentclasssymname, 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:
$parentclassname - The parent class name (if any) for a method.
$parentclasssymname - 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 <typename T> class Base {};
%template() Base<int>;
class Derived : public Base<int> {};

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)

Page 4 of 13

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.