mirror of https://github.com/swig/swig
207 lines
9.3 KiB
Plaintext
207 lines
9.3 KiB
Plaintext
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.
|
|
Issue # numbers mentioned below can be found on Github. For more details, add
|
|
the issue number to the end of the URL: https://github.com/swig/swig/issues/
|
|
|
|
Version 4.4.0 (in progress)
|
|
===========================
|
|
|
|
2025-05-16: wsfulton
|
|
#3179 Fix a regression using -kwargs since swig-4.1 in template expansion of
|
|
function parameter values.
|
|
|
|
2025-05-13: wsfulton
|
|
Fix undefined behaviour in directorout typemaps for void * and const char *& if
|
|
the same wrapped function is called more than once. Note that using returning
|
|
pointers in directors is still full of traps and not recommended. As such,
|
|
warning SWIGWARN_TYPEMAP_DIRECTOROUT_PTR (473) continues to be issued.
|
|
|
|
2025-05-11: wsfulton
|
|
[Python] Move the SwigPyObject, SwigPyPacked, SwigVarLink (renamed from
|
|
swigvarlink) support Python types to the SWIG runtime module (currently called
|
|
swig_runtime_data5).
|
|
|
|
Note that these affect the Python runtime implementation, so the recently bumped
|
|
SWIG_RUNTIME_VERSION to 5 for all scripting languages will now include this change.
|
|
|
|
2025-05-10: jschueller, wsfulton
|
|
[Python] #2881 #3061 #3160 DeprecationWarning fixes when using 'python -Walways'
|
|
or if using one of the types being warned about:
|
|
|
|
DeprecationWarning: builtin type SwigPyPacked has no __module__ attribute
|
|
DeprecationWarning: builtin type SwigPyObject has no __module__ attribute
|
|
DeprecationWarning: builtin type swigvarlink has no __module__ attribute
|
|
|
|
The warning was present if code was generated without using -builtin in 4.3.x.
|
|
The warning was only present if using the Python limited API in 4.2.1 and earlier.
|
|
|
|
2025-04-30: wsfulton
|
|
[Python] #3134 Fix maximum size of strings being marshalled from C/C++
|
|
into Python. This has been changed from INT_MAX to PY_SSIZE_T_MAX in line
|
|
with the Python C API maximum string length handling change in python-2.5.
|
|
|
|
Similarly for the number of elements in the Python STL container wrappers.
|
|
|
|
2025-04-29: r-barnes, wsfulton
|
|
#3027 Remove generation of empty dynamic exception specifications - throw(),
|
|
which are deprecated in c++11. This was only when using the director feature.
|
|
A new macro SWIG_NOEXCEPT is used which ensures that throw() or noexcept is
|
|
used for the appropriate C++ standard that the compiler is compiling for.
|
|
|
|
2025-04-28: jschueller, henryiii
|
|
[Python] #2967 Use __spec__.parent as the first approach to obtaining
|
|
a module's package name when importing the low-level C/C++ module as the
|
|
previous approach looking for __package__ is due to be removed in python-3.15.
|
|
__package__ is now used as a fallback if __spec__.parent fails.
|
|
|
|
2025-04-28: jschueller, henryiii
|
|
[Python] #3066 #3159 Add ht_token slot for python-3.14 support.
|
|
|
|
2025-04-18: akorobka
|
|
#103 Thread safety bugfix in the runtime type system.
|
|
|
|
Replaces the casting linked list with a list of arrays that does not get
|
|
modified at runtime. The content of the cast arrays is sorted during the
|
|
initialization so that subsequent lookups can use binary search over the
|
|
entries obtaining O(log n) performance.
|
|
|
|
Bump SWIG_RUNTIME_VERSION to 5 due to associated changes in runtime type
|
|
system.
|
|
|
|
*** POTENTIAL INCOMPATIBILITY ***
|
|
|
|
2025-04-17: klausspanderen
|
|
[Python] #3137 Add support for free threading Python (aka no-gil) where the
|
|
GIL can be disabled.
|
|
|
|
2025-04-02: wsfulton
|
|
[Java] #3156 Support JDK 21 and std::list. Fixes removeFirst() and removeLast()
|
|
incompatibilities with methods of the same name in the base class,
|
|
AbstractSequentialList, which were added in JDK 21 with a different
|
|
return type. The addFirst() and addLast() methods were also added, all part
|
|
of JEP-431 Sequenced Collections, see https://openjdk.org/jeps/431.
|
|
|
|
If these 4 methods are needed, as SWIG previously generated them, then add
|
|
the following to your interface file after %include <std_list.i>:
|
|
|
|
%extend std::list {
|
|
void removeLast() { $self->pop_back(); }
|
|
void removeFirst() { $self->pop_front(); }
|
|
void addLast(const T &value) { $self->push_back(value); }
|
|
void addFirst(const T &value) { $self->push_front(value); }
|
|
}
|
|
|
|
But note that this will give javac compiler errors when using JDK 21 and
|
|
later for removeFirst() and removeLast().
|
|
|
|
2025-04-02: wsfulton
|
|
[Java] Fix javac -Xlint warning [this-escape] - JDK 21
|
|
|
|
[this-escape] possible 'this' escape before subclass is fully initialized
|
|
|
|
Add @WarningSuppressions("this-escape") annotation to all director
|
|
constructors as the warning is a false positive. Similarly for
|
|
std::list, std::vector, std::set, std::unordered_set constructors.
|
|
|
|
2025-04-02: wsfulton
|
|
[Java] Fix javac -Xlint warnings:
|
|
|
|
- [cast] redundant cast in std::unordered_map wrappers put method
|
|
- [rawtypes] found raw type in std::list constructor wrapper
|
|
|
|
2025-04-02: olly
|
|
#3152 Remove typemaps for `signed wchar_t` and `unsigned wchar_t`
|
|
in C++ mode. These types aren't specified by the C++ standard and
|
|
give an error with modern versions of GCC, clang or MSVC. Older
|
|
GCC and clang did allow them (tested with GCC 8 and clang 8), but
|
|
our typemap code used `UWCHAR_MAX` which doesn't seem to have ever
|
|
been defined by any compiler.
|
|
|
|
2025-04-01: olly
|
|
#920 #2830 [MzScheme/Racket] Remove support for MzScheme/Racket.
|
|
It's a long time since SWIG's support was actively maintained and
|
|
a major overhaul would be needed to support Racket 8, for which
|
|
nobody has stepped forward in over 3 years.
|
|
|
|
2025-03-03: olly
|
|
[Guile] The typemaps in ports.i now generate code which compiles
|
|
even if the wrapper is compiled with in a strict standards
|
|
conformance mode such as -std=c11.
|
|
|
|
2025-02-28: olly
|
|
#3127 Fix bad generated code in some cases when a constant
|
|
expression is split over multiple lines and used as part of a type.
|
|
This manifested in cases where SWIG's parser gets the expression
|
|
text by skipping to the matching closing parenthesis and grabbing
|
|
the skipped program text.
|
|
|
|
2025-02-19: wsfulton
|
|
Add support for $n special variable expansion in the names of typemap
|
|
local variables, such as:
|
|
|
|
%typemap(in) int MYINT (int $1_temp) { ... }
|
|
|
|
$1_temp is typically expanded to arg1_temp, arg2_temp etc depending on
|
|
which argument the typemap is applied to.
|
|
|
|
2025-02-05: wsfulton
|
|
#3075 Regression fix when using -keyword, kwargs or compactdefaultargs
|
|
option. Restore generating a non-const cast to the default value when
|
|
wrapping const pointer default arguments.
|
|
|
|
2024-12-07: arbrauns
|
|
[Lua] #3083 Fix "unsigned long long" being interpreted as "signed
|
|
long long".
|
|
|
|
2024-11-22: wsfulton
|
|
Use new <errno.h> fragment for including this header when needed instead
|
|
of either always including it or relying on it being included elsewhere.
|
|
Fixes the removal of errno.h when defining PY_LIMITED_API for python-3.11
|
|
and later.
|
|
|
|
2024-11-09: wsfulton
|
|
#3064 Perform repeated typedef lookups instead of a single typedef
|
|
lookup on the type being applied in %apply when looking for a family
|
|
of typemaps to apply.
|
|
|
|
2024-11-01: wsfulton
|
|
Fix internal error handling parameters that are typedefs to references
|
|
when using the compactdefaultargs feature.
|
|
|
|
2024-10-30: wsfulton
|
|
#1851 Fix handling of parameters with default arguments that are
|
|
initializer lists when using -keyword or the compactdefaultargs option.
|
|
|
|
2024-10-25: olly
|
|
[Guile] Allow wrapping anything with a `varout` typemap as a
|
|
constant.
|
|
|
|
2024-10-24: olly
|
|
[Perl] https://sourceforge.net/p/swig/bugs/1134/ Ensure C++
|
|
local variables get destroyed before throwing a Perl exception.
|
|
|
|
2024-10-22: olly
|
|
#3034 SWIG's testsuite is now free of SWIG warnings for all target
|
|
languages and the SWIG -Werror option is now enabled automatically
|
|
to ensure this doesn't regress.
|
|
|
|
2024-10-22: olly
|
|
#2998 Drop support for specifying SWIG's internal type string
|
|
representation in interface files. This "secret developer feature"
|
|
was only documented in developer documentation, and had no test
|
|
coverage.
|
|
|
|
It allowed specifying an SWIG internal syntax type string, e.g.:
|
|
|
|
`p.a(10).p.f(int, p.f(int).int)` foo(int, int (*x)(int));
|
|
|
|
In the unlikely event that anyone was using this, we recommend you
|
|
use the standard C/C++ type syntax instead, which will work with
|
|
previous SWIG releases too, e.g.:
|
|
|
|
(*(*foo(int, int (*)(int)))[10])(int, int (*)(int));
|
|
|
|
The C/C++ syntax has the major advantage of being the same syntax
|
|
that C/C++ compilers use.
|