-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCHANGES.current
More file actions
741 lines (575 loc) · 34.2 KB
/
Copy pathCHANGES.current
File metadata and controls
741 lines (575 loc) · 34.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
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.5.0 (in progress)
===========================
2026-06-07: larskanis, jschueller
[Ruby] #3170 #3326 #3456 Generated wrappers now use Ruby's TypedData API
instead of the deprecated untyped Data API (Data_Wrap_Struct, Data_Get_Struct,
DATA_PTR). Ruby 3.4 warns about the untyped Data API by default
(an error under -Werror) and Ruby 4.0 removes it entirely.
This is not fully backwards compatible: hand written code (typically
in a typemap or %extend block) that reached the wrapped C/C++ pointer
through the removed Ruby DATA_PTR macro or Data_Get_Struct must be changed to
use the SWIG conversion functions, which work with both old and new SWIG.
Read the pointer with
void *ptr = 0;
SWIG_ConvertPtr(self, &ptr, NULL, 0);
and detach (clear) it with
SWIG_ConvertPtr(self, NULL, NULL, SWIG_POINTER_CLEAR);
See Examples/test-suite/ruby_manual_proxy.i for a worked example.
*** POTENTIAL INCOMPATIBILITY ***
2026-06-08: wsfulton
Names referring to a C++ class nested inside another class now
resolve even when the nested class itself is not wrapped (the usual
case for all target languages except Java and C#).
A using declaration whose scope qualifier reaches the nested class through
a typedef, such as 'using Outer::Nested::Me::method;' where 'Me' is a
typedef naming the nested class, now resolves instead of giving a
spurious 'Nothing known about ...' warning (Warning 315) and silently
dropping the member.
An out of line nested class definition written inside the enclosing class,
such as:
struct Outer::Nested { ... };
is likewise now resolved instead of reporting an 'Outer is not defined
as a valid scope' error.
2026-06-04: Nerixyz
[Python] #3414 Fix PEP 484 type annotations for multi-argument
pytyping typemaps. A typemap matching more than one argument, such
as %typemap(pytyping) (int argc, char **argv), is now applied to the
whole argument group, so the generated annotation uses the type from
the typemap instead of only annotating the first argument with its
plain C++ type.
2026-06-02: wsfulton
#2694 Improve resolution of qualified names whose scope qualifier is
reached through a typedef, including a typedef to a template
instantiation. A using declaration such as
'using BaseAlias::Me::Integer;', where 'BaseAlias' and 'Me' are
typedefs naming a class, previously gave a 'Nothing known about ...'
warning (Warning 315). This includes a typedef to a template
instantiation whose template name is itself introduced by a using
declaration. It now resolves.
2026-06-01: wsfulton
[Go] Fix crash (null pointer dereference) on the first call to a
director method returning a reference or pointer type, such as
int&, const int& or a class pointer.
2026-06-01: jschueller
[Go] #3441 Fix director returning reference to local variable in int&
and int&& typemaps.
2026-05-31: wsfulton
[Ruby] #3385 Fix segmentation fault when using STL containers of
swig::GC_VALUE - the type that wraps an arbitrary Ruby object - such
as std::vector<swig::GC_VALUE> or a std::map or std::set with a
swig::BinaryPredicate comparator proc, while the Ruby 3.x garbage
collector compacts the heap (GC.compact or GC.auto_compact). The
Ruby objects stored in such containers are now retained correctly
across a compaction, instead of occasionally crashing the interpreter.
2026-05-30: erezgeva
[Lua] #3394 Drop support for Lua 5.0 and Lua 5.1.
Minimum supported Lua version is now 5.2.
SWIG no longer compiles wrappers for Lua 5.0 or 5.1
(this includes LuaJIT consumers still using the 5.1 ABI).
Removed -squash-bases command-line option
(and the SWIG_LUA_SQUASH_BASES runtime path).
The implementation was broken;
classes now always use the standard base-lookup path.
Using this command-line option will generate error
swig error : Unrecognized option -squash-bases
Removed deprecated -no-old-metatable-bindings command-line option.
Old-style metatable bindings are always generated,
matching the long-standing default.
Using this command-line option will generate error
swig error : Unrecognized option -no-old-metatable-bindings
*** POTENTIAL INCOMPATIBILITY ***
2026-05-30: wsfulton
C++17: parse user-defined deduction guides used for class
template argument deduction, for example:
template <typename T> struct Box { Box(T); };
Box(int) -> Box<int>; // non-template deduction guide
template <typename T> Box(T) -> Box<T>; // templated deduction guide
A guide is written at the same scope as the class template, either
as a non-template declaration or, when itself a template, under a
template parameter list. A deduction guide is not a function and
emits no symbol - it only steers argument deduction at compile time -
so there is nothing to wrap and SWIG parses and ignores it.
Previously any deduction guide resulted in a syntax error.
2026-05-28: wsfulton
#2951 A using-declaration whose qualifier is a type-template
parameter used directly as the base class - the mixin idiom -
template <typename I>
struct Derived : I {
using I::I;
using I::call;
};
now has its template parameter substituted during instantiation,
so wrappers for the inherited members - including inheriting
constructors via 'using I::I;' - are emitted on the instantiated
derived class. Previously SWIG warned "Nothing known about
'I::call'" and no wrapper was generated.
2026-05-27: wsfulton
C++20: parse and support constrained alias templates. Both the
type-constraint shorthand and the requires-clause long form are
now accepted:
template<Numeric T> using NumBox = Box<T>;
template<typename T> requires Numeric<T> using ReqBox = Box<T>;
The requires-clause form previously resulted in a syntax error.
Both forms wrap identically to an unconstrained alias template.
Note that the constraint does not affect the generated wrappers.
The C++ compiler enforces it when compiling the emitted
wrapper. Wrapping continues to use the documented two-step
pattern: %template(Name) on the underlying template, followed by
an empty %template() for each alias.
2026-05-26: wsfulton
[Python] Class docstrings under -builtin now match the non-builtin
proxy module. When neither %feature("docstring") nor a doxygen
comment is supplied, inspect.getdoc(MyClass) previously returned
the qualified C++ name such as "::MyClass"; it now returns
"Proxy of C++ MyClass class." (or "Proxy of C MyStruct struct.")
when %feature("autodoc") is enabled, and the empty string
otherwise. Alternative documentation strings can of course still
be set via %feature("python:tp_doc", "...") on the class.
*** POTENTIAL INCOMPATIBILITY ***
2026-05-25: wsfulton
[Python] %nokwargs on an individual function now correctly opts that
function out of keyword argument handling using the -keyword option
or a module-wide %feature("kwargs") has enabled kwargs globally. The
change is visible under -builtin, where the affected function's
wrapper is now generated with METH_VARARGS instead of
METH_VARARGS|METH_KEYWORDS, so calling it by keyword raises
TypeError as expected. Previously, %nokwargs was silently ignored
once -keyword was passed.
2026-05-25: wsfulton, jschueller
#3448 Fix ccache-swig (and the bundled CCache test suite) failing
cache lookups when used with Apple clang 21 or upstream LLVM
clang 21. These compilers now emit
clang: warning: argument unused during compilation: '-c' [-Wunused-command-line-argument]
when -c and -E are passed together. ccache-swig invoked the
preprocessor as "cc -c -E foo.c" and hashed its stderr, so the
warning text was folded into the cache key and prevented a cache hit
between compiling foo.c and the equivalent preprocessed foo.i.
ccache-swig now omits -c when invoking the preprocessor.
2026-05-24: wsfulton
Fixed a one-byte buffer overflow in the cdata.i memmove typemap that
occurred when the data length exactly matched the destination buffer size.
2026-05-20: erezgeva
[Guile, JavaScript, Python, Scilab, Tcl] #3383 The cdata.i library
functions (cdata, memmove and similar) now use a binary data type
instead of a string, so that all byte values 0-255 round-trip
correctly.
The target language type used by the cdata.i functions has changed:
- Python: bytes object (was str)
- JavaScript: Uint8Array (was string)
- Tcl: list of integers (was string)
- Scilab: list of uint8 values (was string)
In Python, passing a str now fails with:
TypeError: in method 'memmove', argument 2 of type 'void const *'
so pass a bytes object instead. Guile cdata now also handles all
byte values correctly.
*** POTENTIAL INCOMPATIBILITY ***
2026-05-19: jmarrec
#3415 Fix segmentation fault when a class declares a public
'using Base::method;' that names a base-class member template with
no %template instantiations and also declares a protected concrete
override of the same name.
2026-05-16: erezgeva
[Lua, Octave, Perl, PHP, Python, Ruby, Scilab, Tcl] #3409 Add memory allocation
failure protection to the argcargv typemaps and to the string duplication paths
in pystrings.swg, perlstrings.swg, rubystrings.swg and rfragments.swg.
Potentially incompatible change: the `%new_copy_array` macro
has been removed. User interface files calling `%new_copy_array(ptr, size, T)`
will be passed through to the C/C++ compiler unchanged and fail with
an error such as:
error: expected expression before '%' token
Replace such calls with an explicit allocate and copy that checks
for allocation failure, e.g.
T *p = %new_array(size, T);
if (p) memcpy(p, ptr, size * sizeof(T));
Potentially incompatible change: the `%typemaps_string` macro in
`Lib/typemaps/strings.swg` now takes an additional argument naming a
`SWIG_NewCopyCharArray` style fragment, and the related
`%typemaps_string_alloc` macro has been removed (its allocator
customisation is now expressed by passing the new argument to
`%typemaps_string` directly). Existing callers of
`%typemaps_string` with the old signature will fail with:
Error: Macro '%typemaps_string' expects 13 arguments
Existing callers of `%typemaps_string_alloc` will fail with:
Error: Unknown directive '%typemaps_string_alloc'.
Update such calls to pass the additional fragment, modelled on
`SWIG_NewCopyWCharArray` in `Lib/typemaps/wstring.swg`.
*** POTENTIAL INCOMPATIBILITY ***
2026-05-18: wsfulton
[Python] Doxygen comments on constructors are now emitted on
__init__ when wrapping with -builtin, matching the default
(non-builtin) behaviour. Previously inspect.getdoc(Cls.__init__)
returned the generic "Initialize self. See help(type(self)) for
accurate signature." regardless of the Doxygen documentation on
the C++ constructor.
2026-05-15: blowekamp
[R] #3407 Fix compilation with R 4.6.0 which removed the non-API macro
SET_S4_OBJECT and made CHARACTER_POINTER return a const pointer.
Use Rf_asS4, SET_STRING_ELT and STRING_ELT instead. These replacement
APIs have been available since R 2.x so no version guards are required.
2026-05-28: wsfulton
C++17: parse and support pack expansion in a using-declaration
(P0195), e.g.
template <typename... Ts>
struct Overloaded : Ts... {
using Ts::operator()...;
};
The names introduced by the using-declaration depend on an
unexpanded template parameter pack, so SWIG accepts the syntax
but produces no wrappers until %template instantiates the
class. %template now expands the pack using-declaration into
one concrete using-declaration per base type, so the
instantiated proxy class has a wrapper for each inherited
member - matching how an ordinary 'using Base::name;' inside
a class template behaves after instantiation.
Combined with %rename(call) *::operator(); the proxy of
Overloaded<IntCase, DoubleCase> has overloaded call(int) and
call(double) methods that dispatch to the matching base.
2026-05-14: wsfulton
C++17: detect class template argument deduction (CTAD) in a
variable declaration, where a variable is declared with a bare
class template name and the template arguments are deduced from
the initializer, e.g.
template <typename T>
struct Box {
T value;
Box(T v) : value(v) {}
};
Box bx{42}; // CTAD deduces Box<int> from the constructor
(and, with C++20 P1816, also for aggregates with no deduction
guide). CTAD is only valid for variables, so this is the only
declaration kind affected. SWIG performs no template argument
deduction, so it now issues Warning 347 and skips the variable
instead of generating uncompilable wrapper code that names the
template without arguments.
2026-05-12: wsfulton
C++20: %template can now instantiate abbreviated function templates
that mix 'auto' parameters with a variadic explicit template pack,
e.g.
template<typename... Ts>
std::string f_mix(auto x, Ts... ys);
%template(f_mix_isd) f_mix<int, std::string, double>;
Per the C++20 standard ([dcl.fct]/19) the invented type template-
parameter for each 'auto' parm is appended after the explicit list,
so the %template argument list is bound positionally: leading
non-variadic parameters first, the variadic pack absorbs the middle
args, then one trailing arg per 'auto' in declaration order. Above,
Ts={int, std::string} (absorbed by the pack) and the trailing
'double' binds to the invented parm for 'x', giving the effective
wrapper signature as:
f_mix(double x, int y1, std::string y2)
2026-05-12: wsfulton
C++20: parse and support decorated 'auto' parameters in abbreviated
function templates:
int h(auto& x); // reference
int i(auto* x); // pointer
int j(auto&& x); // forwarding reference
int k(const auto x); // const by value
int l(const auto& x); // const reference
int m(Numeric auto& x); // constrained reference
int n(const Numeric auto& x); // const constrained reference
2026-05-12: wsfulton
C++20: fix segmentation fault when mixing abbreviated function template
'auto' parameters with an explicit template parameter list, e.g.
template<typename T>
T mix(T x, auto y) { return T(x + y); }
%template(mix_id) mix<int, double>;
Each 'auto' parameter introduces an invented type template parameter
appended to the explicit template parameter list. When using
%template, supply arguments for the explicit parameters first, then
one for each 'auto' parameter in declaration order.
2026-05-11: wsfulton
C++20: warning 332 (unresolved type-constraint in a templated
parameter list) is no longer emitted. The remap to 'typename T' is
still applied silently, so wrappers continue to compile when the
concept definition is visible only to the C++ compiler.
2026-05-10: wsfulton
C++20: template parameters with a type-constraint now accept a
template-id concept-id as the constraint, the form most often seen with
STL concepts like 'std::convertible_to', 'std::same_as', 'std::derived_from'
or 'std::predicate'. Examples:
template<std::convertible_to<int> T> int to_int(T x);
template<typename T, typename U> concept Pair = std::convertible_to<T, U>;
template<Pair<int> T> int first_int(T x);
2026-05-09: wsfulton
C++20: parse abbreviated function templates with a constrained auto return
type, including the trailing return form:
Numeric auto half(int x) -> int { return x / 2; }
Numeric auto cube_constrained(Sized auto x) -> int { return x*x*x; }
%template(cube_constrained_int) cube_constrained<int>;
When an explicit (non-auto) trailing return type is provided the function
wraps normally (the trailing return is the wrapped type); without one, the
function is ignored with a warning since SWIG cannot deduce the return type,
matching plain 'auto fn(...)' behaviour. As a side fix, plain 'auto
fn(Concept auto x) -> Type' now correctly introduces an invented type template
parameter for the auto parameter so '%template' instantiates it.
2026-05-09: wsfulton
C++20: parse and support type-constraints on template parameters.
'template<Numeric T>' is now accepted as the standard shorthand for
'template<typename T> requires Numeric<T>', as per the C++20 standard. This includes
::-qualified concept-ids, variadic packs, default arguments and class templates.
template<typename T>
concept Numeric = std::integral<T> || std::floating_point<T>;
template<Numeric T> T cube(T x) { return x * x * x; }
%template(cube_int) cube<int>;
If the type-constraint identifier has not been parsed by SWIG, the parameter
is silently remapped to 'typename T'; the generated wrapper compiles when
the concept is visible to the C++ compiler.
2026-05-09: wsfulton
C++20: parse abbreviated function templates with constrained auto parameters.
Each auto parameter with a type-constraint (e.g. 'Numeric auto') introduces
an invented type template parameter carrying the type-constraint as a
captured constraint.
int twice_numeric(Numeric auto x) { return x + x; }
%template(twice_numeric_int) twice_numeric<int>;
2026-05-09: wsfulton
C++14: parse generic lambdas - lambdas with one or more 'auto' parameters.
Like non-templated lambdas, generic lambdas are not wrapped, but they no
longer cause a syntax error when SWIG parses a header that contains them.
auto twice = [](auto x) { return x + x; };
auto add = [](auto a, auto b) { return a + b; };
2026-05-09: wsfulton
C++20: parse abbreviated function templates - ordinary functions with one or
more 'auto' parameters. C++20 treats the function as a function template with
invented type template parameters for each auto parameter. Abbreviated
function templates can now be wrapped with %template, just like a regular
templated function. Note that an explicit (non-auto) return type is required.
The return type is not included in the %template instantiation and SWIG
remains unable to deduce auto return types.
double scale(auto x, auto factor) { return x * factor; }
%template(scale_id) scale<int, double>;
2026-05-09: wsfulton
#3413 C++20: accept prefix requires-clauses on templated lambdas, and trailing
requires-clauses placed after the lambda's return type.
auto prefix = []<typename T> requires Numeric<T> (T x) { return x + x; };
2026-05-07: wsfulton
#3413 %template applied to a C++20 concept now reports an error instead of
silently producing a malformed wrapper.
2026-05-05: wsfulton
#3413 C++20: parse a requires-expression as a primary in expression position,
not just inside a requires-clause. This allows a namespace scope variable
template to be initialised from a requires-expression.
template<typename T>
constexpr bool Addable = requires (T t) { t + t; };
%template(addable_int) Addable<int>;
2026-05-05: wsfulton
Document existing coverage for C++14 variable templates which requires a
%template instantiation of the variable template, resulting in a read only
variable wrapper.
template<typename T>
constexpr int bits_in = sizeof(T) * 8;
%template(bits_in_char) bits_in<char>;
2026-05-04: wsfulton
#3413 Basic support for C++20 concept declarations and requires-clauses on
function templates, in both the trailing position and the prefix position
(between the template parameter list and the declarator). Both constructs are silently
consumed: a concept declaration produces no parse tree node, and a constrained
template wraps as if it were unconstrained.
template<typename T>
concept Numeric = std::integral<T> || std::floating_point<T>;
template<typename T>
T cube(T x) requires Numeric<T> { return x * x * x; }
template<typename T>
requires Numeric<T>
T quad(T x) { return x * x * x * x; }
template<typename T>
concept Summable = requires (T t) { t + t; };
template<typename T>
T sum_pair(T a, T b) requires Summable<T> { return a + b; }
Compound constraints containing trailing return type constraints also work:
template<typename T>
concept AddableSame = requires(T a, T b) {
{ a + b } -> std::same_as<T>;
};
2026-05-03: wsfulton
[R] Fix function pointer wrappers involving move-only types.
2026-05-02: mmomtchev, wsfulton
#341 #3297 #3298 Add support for wrapping std::function via the SWIG library file
std_function.i. The partial specialization
std::function<RET(ARGS...)> is wrapped so that a C++ callable
(free function, lambda, bound member function or functor) can be
returned from C++ to the target language and invoked there.
%include <std_function.i>
%inline %{
std::function<bool(int, const std::string &)> MakeFunctor(int pass) {
return [pass](int passcode, const std::string &name) -> bool {
return passcode == pass && name == "magic";
};
}
%}
%template(MyFunctor) std::function<bool(int, const std::string &)>;
One %template instantiation is required per RET(ARGS...) signature.
std_function.i renames operator() to call so that target languages
which cannot wrap operator() as an identifier still get a usable
method name, and ignores the default constructor so std::function
instances always originate on the C++ side. See the new section
"std::function" in the SWIG library chapter of the documentation
for the full pattern, limitations and target-language notes.
2026-05-01: wsfulton
Fix partial template specialization where the specialized argument
is a function type, including function types carrying a parameter
pack. This makes std::function and similar wrappers work correctly,
eg:
template <typename> class function;
template <typename RET, typename... ARGS>
class function<RET(ARGS...)> { ... };
%template(FuncIntInt) function<int(int, int)>;
%template(FuncVoid) function<int()>;
%template(FuncMixed) function<int(int, double, int)>;
Previously the primary template was incorrectly chosen for these
instantiations. The partial specialization is now matched, with
the function return type and parameter list (including trailing
parameter packs) bound correctly. Lib/std/std_function.i has been
updated to use the standard forward declaration of std::function.
2026-04-26: wsfulton
Fix partial template specialization where the specialized argument
is a templated type carrying a parameter pack, eg:
template <typename...> struct Pack {};
template <typename T> struct Foo {};
template <typename... ARGS> struct Foo<Pack<ARGS...>> {};
%template(FooEmpty) Foo<Pack<>>;
%template(FooStr) Foo<Pack<std::string>>;
%template(FooMix) Foo<Pack<int, double>>;
Such partial specializations are now matched and instantiated
correctly for any pack length, including the empty pack.
2026-04-25: wsfulton
Advanced %rename fixes for templates. It is now possible to use %rename
on instantiated templates for various corner cases, see "Template renaming"
section in SWIGPlus.html. For example, it is now possible to selectively rename
overloaded templated functions. The full power of %rename (such as using regex)
can now be used on templates.
Example fix using %rename on templates:
namespace Quirky {
template<typename T> void funky() {}
}
%rename("%s_void") Quirky::funky<int>();
%template(funky_int) Quirky::funky<int>;
Will now generate funky_void() where previously there there was no wrapper, just
a warning:
Warning 503: Can't wrap 'funky< int >_void' unless renamed to a valid identifier.
2026-04-17: jwuttke
#3403 Fix -doxygen: @file block bleeding into the first class
docstring. Single-line //! (or ///) comments forming a file-level
header (starting with @file) are now correctly discarded instead of
being concatenated into the next declaration's docstring.
2026-03-26: Nerixyz
[Python] #3389 Add missing C annotations and PEP 484 annotations to constants.
2026-03-25: christophe-calmejane
[Lua] #3387 Added support for std::shared_ptr and boost::shared_ptr.
2026-03-25: Nerixyz
[Python] #3334 Add PEP 484 annotations for a few simple types - primitive
types and C strings.
2026-03-23: christophe-calmejane
[Lua] #3386 Add support for std::unordered_set and std::unordered_map.
2026-03-23: erezgeva
[Go] #3360 Makefile support for using and testing Go on Windows.
2026-03-20: christophe-calmejane
[Lua] #3306 Added support for nested classes.
2026-03-19: wsfulton
[C#, D] Always initialise the return type in the C/C++ code. Users with custom
typemaps may need to provide a valid initial value via the "null" attribute
in the "out" typemap if 0 is not a valid initial value.
2026-03-19: erezgeva
#3348 Avoid a potential segfault by handling a failed dynamic_cast in generated
director code by instead throwing a language specific exception:
"'self' is not a director".
2026-03-10: xSetech
[Python] #3365 Fix descriptor() type lookup when SwigPyIterator is renamed
via #define for use in multiple modules.
2026-03-06: wsfulton
[Java] #3354 Fully qualify generated Java interfaces when using the %interface
and %nspace features.
2026-03-05: FilipAlg
[C#] #3354 Fully qualify generated C# interfaces when using the %interface
and %nspace features.
2026-03-05: christophe-calmejane
[Lua] #3305 Added std::array and std::set support.
2026-03-04: wsfulton
#3312 SWIG source code in Source directory is now formatted with clang-format.
Supported versions of clang-format are 18 and later (tested up to and including
version 22). Formatting is enforced in Github Actions so contributors to the
source code base must use clang-format before raising Github pull requests.
Separate formatting only commits are strongly discouraged; each commit should
be correctly formatted when committing (or format only commits squashed into
prior commits prior to pushing to Github).
Please see docs in Doc/Manual/Extending.html.
In order to the ease pain of working on git branches that were branched prior to the
commit on master that reformatted the code (bbdec1f7), the following is suggested.
1. Merge/rebase onto the prior commit bbdec1f7^
2. Copy Source/.clang-format from bbdec1f7 into your working directory
3. Run the identical commands specified in the bbdec1f7 commit message
The branch should then merge cleanly onto bbdec1f7.
2026-02-28: ArtemKozak666
[C#] #3321 Fix undefined behaviour in std::string_view directorin typemap.
2026-02-27: erezgeva
Various improvements to Github Actions CI testing to increase coverage notably
with additional Windows and MacOS testing including via CMake.
2026-02-27: phetdam
#3191 #3332 Buiding SWIG executable with CMake enhancements.
- Update PCRE2 find module to be compatible with upstream CMake config script.
- Update docs for users wishing to use CMake to build SWIG.
2026-02-23: aryler
#3304 Correct LDSHARED for OpenBSD.
2026-02-20: benzwick
[Guile] #3336 Fix segfault in Guile -proxy when class has public member variable.
2026-02-20: benzwick
#3337 Fix cross-module type cast lookup in SWIG_InitializeModule
using multiple modules.
2026-02-11: degasus, wsfulton
#3327 [Java, C#] Add missing Doxygen documentation comments to code using the
%interface directives.
2026-02-07: wsfulton
#3323 Fix -Wsign-compare warning in 32-bit builds in SWIG_TypeClientData.
2026-02-04: jschueller
#3325 Add include guard when generating SWIG runtime header.
2026-01-21: jschueller
#3019 Issue deprecation warning if `%typedef` is used. This is
an undocumented directive which SWIG has treated as an alias for
the standard C/C++ `typedef` since at least 1996. Replace any
remaining uses with `typedef`, which also works with older SWIG
versions.
2026-01-15: olly
[Octave] Octave 6 is now the oldest version we aim to support. We
haven't had any automated testing of older Octave versions since
GHA dropped support for Ubuntu 20.04 on 2025-04-01.
2026-01-15: jschueller
[Octave] Fix save_binary prototype to be correct for Octave >= 6.
2025-12-17: ysmilda
[Go] #3291
- Add `-unique-id` and `-no-unique-id` flags to enable/disable the addition of a
unique id to the generated function names.
- Deprecate `-cgo` flag as this doesn't do anything.
- Cleanup docs and help output.
2025-12-12: christophe-calmejane
[Lua] #3295 Add director support for Lua.
2025-12-05: jaw
[Python] #3287 Fixes for gcc warnings: -Wconversion -Wsign-conversion.
2025-11-08: wsfulton
Fix handling of typedef to void in class methods/constructor's parameter
lists, such as:
typedef void VOID_TYPE;
struct S {
S(VOID_TYPE);
int f(VOID_TYPE) const;
};
2025-11-06: olly
[Octave, Ruby] #3281 `FALSE` and `TRUE` are no longer treated as
aliases of `false` and `true` when generating documentation comments.
2025-11-02: wsfulton
[Go] Fix various compilation problems when wrapping rvalues references.
2025-11-01: wsfulton
Fix wrapping rvalue reference typedefs in director constructors.
2025-11-01: wsfulton
Multiple typedefs involving references fix.
If a typedef to a typedef of a reference was wrapped, uncompilable code was
generated. Note: this was previously okay with just a single typedef to a
reference. Affected wrapping global and member variables as well as parameters
in member methods and constructors.
2025-10-27: wsfulton
#3276 Add missing std::move when wrapping move constructors for directors.
Also add missing std::move for wrapped director (virtual) methods with
rvalue references.