-
Notifications
You must be signed in to change notification settings - Fork 1
/
CHANGES.current
568 lines (433 loc) · 22.1 KB
/
CHANGES.current
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
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.3.0 (in progress)
===========================
2024-10-06: wsfulton
[PHP] #2907 Fix returning NULL from functions with output
parameters.
Ensures OUTPUT and INOUT typemaps are handled consistently wrt
return type.
Added:
void SWIG_Php_AppendOutput(zval *target, zval *o, int is_void);
The t_output_helper function is deprecated. Replace t_output_helper
in typemaps with SWIG_AppendOutput which calls
SWIG_Php_AppendOutput appropriately setting the is_void parameter
using the $isvoid special variable.
The t_output_helper fragment is also deprecated and is no longer
needed as the SWIG_Php_AppendOutput function is now always
generated.
2024-10-05: wsfulton
[Ruby] Removed backwards compatible output_helper fragment and
macro.
Use SWIG_AppendOutput instead of output_helper (does not require
the output_helper fragment).
*** POTENTIAL INCOMPATIBILITY ***
2024-10-05: wsfulton
[Ruby] #2907 Fix returning NULL from functions with output
parameters.
Ensures OUTPUT and INOUT typemaps are handled consistently wrt
return type.
New declaration of SWIG_Ruby_AppendOutput is now:
SWIG_Ruby_AppendOutput(VALUE target, VALUE o, int is_void);
The 3rd parameter is new and the new $isvoid special variable
should be passed to it, indicating whether or not the wrapped
function returns void.
Also consider replacing with:
SWIG_AppendOutput(VALUE target, VALUE o);
which calls SWIG_Ruby_AppendOutput with same parameters but adding
$isvoid for final parameter.
*** POTENTIAL INCOMPATIBILITY ***
2024-09-29: clintonstimpson
[Python] #2350 Switch implementation from static types to heap
types using PyType_FromSpec() introduced in Python 3.
This currently only applies to the default code generation and is
not available for the -builtin code generation.
2024-09-29: wsfulton
[Python] Single line docstring comments are stripped of leading and
trailing whitespace.
2024-09-29: olly
SWIG can now handle arbitrary expressions as a subscript (i.e. in
`[`...`]`). We don't actually need to parse expressions in this
context so we can just skip to the matching closing square bracket.
2024-09-29: olly
C++11 auto variables for which SWIG can't parse the initialiser
now give a warning and are ignored rather than SWIG exiting with a
parse error.
2024-09-26: olly
SWIG now recognises --version as an alias for -version (it has
supported --help as an alias for -help since 2006).
2024-09-25: wsfulton
[MzScheme/Racket] #920 #2830 MzScheme/Racket Deprecation notice.
This language module no longer works with modern Racket versions
(Racket 8 and later) due to the introduction of a different C API.
We are thus putting out a plea for a Racket maintainer to step
forward and rewrite the MzScheme module for Racket 8, otherwise it
will be removed in swig-4.4.
2024-09-25: olly
SWIG can now handle arbitrary expressions in the parameter list of
a method call. We don't actually need to parse expressions in this
context so we can just skip to the matching closing parenthesis.
2024-09-25: olly
Add support for C99 _Bool. SWIG now treats _Bool as an alias for
the bool keyword when in C mode.
2024-09-23: olly
#3031 Improve support for C++11 trailing return types. SWIG now
supports const references, const and non-const rvalue references,
and enum types with an explicit `enum`, `enum class` or `enum
struct`.
2024-09-22: wsfulton
#3023 The binary executables in the Windows distribution are now
64-bit now instead of 32-bit. Any 32-bit Windows OS users will need
to build their own version using instructions in Windows.html or
the "Getting Started Guide" for Windows on the Wiki at
https://github.com/swig/swig/wiki/Getting-Started#windows.
2024-09-21: wsfulton
#2879 Don't show warning SWIGWARN_LANG_SMARTPTR_MISSING (520) if
class is ignored.
2024-09-21: olly
SWIG was ignoring `final` if specified after `noexcept`.
2024-09-20: olly
[Javascript] Fix problems with v8 support. The tests and examples
now work, and configure can now successfully probe for v8 without
assistance on Debian and Ubuntu.
2024-09-19: wsfulton
#2866 Fix incorrect variable setters being generated when wrapping
reference member variables. A setter is no longer generated if the
type of the reference member variable is non-assignable.
2024-09-18: olly
Fix parse error for a misplaced Doxygen comment which is the only
thing in a class/struct.
2024-09-18: olly
Fix parse error for %include/#include in a class/struct followed
by a member declaration.
2024-09-16: olly
#2995 SWIG now has generic handling for converting integer and
boolean literal values for use in target language code, replacing
code to do with in many of the target language backends. This is
mainly an internal clean-up but it does fix a bug in the code it
replaces when wrapping code such as this:
typedef enum { T = (bool)1 } b;
With suitable enum wrapping settings, SWIG could incorrect wrap T
with value 0 in C#, D and Java.
Such cases now work correctly for D, but for C# and Java SWIG now
generates invalid C#/Java code because the C++ enum initialiser
expression isn't valid for initialising a C#/Java enum - this is
really an improvement over generating code which compiled but used
the wrong value!
If you are affected by this, use %csconstvalue/%javaconstvalue to
specify the value of such enumerators as a suitable C#/Java
expression.
2024-09-16: olly
#2560 Document complex.i in the manual.
2024-09-15: FredBonThermo
[C#] #2835 Support -doxygen option for converting doxygen comments
to XML formatted C# comments.
2024-09-14: wsfulton
#2987 C++ reference errors when passing in a 'NULL' change of
behaviour. Most languages now use "NullReferenceError" in the
error message where they previously used "ValueError". Also
exception changes:
Guile: "swig-null-reference-error" instead of "swig-value-error"
MzScheme: "swig-null-reference-error" instead of "swig-value-error"
PHP: TypeError instead of ValueError
Python: Consistently raises TypeError instead of a mix of
ValueError and TypeError.
Ruby: Consistently raises NullReferenceError instead of a mix
of ArgumentError and NullReferenceErrorError.
The consistent raising of a TypeError instead of ValueError for
Python ensures that incorrectly passing 'None' into a C++ reference
argument will correctly convert the error into a NotImplemented
error for the rich comparisons implementations per PEP 207.
*** POTENTIAL INCOMPATIBILITY ***
2024-09-13: vadz
[C] #2086 Add support for C as a target language. This support is
currently experimental.
2024-09-12: olly
Remove remains of %nestedworkaround and the nestedworkaround
feature it uses, which were deprecated over 10 years ago in SWIG
3.0.0. Since then uses of these have done nothing except emit a
warning.
2024-09-11: wsfulton
[C# Java] #1188 Add the %interface_additional macro to the family
of %interface macros for adding additional interfaces for the
%generated interface to extend/derive from.
2024-09-11: olly
#197 #675 #1677 #2047 Fix incorrect inclusion of "enum " when
qualifying C++11 "enum class" enumerator names.
2024-09-11: olly
[Perl] #630 Fix wrapping of C++11 enum class when -const command
line option is specified.
2024-09-07: wsfulton
#2875 Fix swig-4.1.0 regression using the %interface family of
macros for multiple inheritance and common bases.
2024-09-06: olly
[Python] Stop documenting to define SWIG_FILE_WITH_INIT - this does
not actually do anything (and apparently never has!)
2024-09-05: wsfulton
#2845 Fix duplicate friend wrappers for friend declarations in
nested classes.
2024-09-03: olly
#3010 Improve handling of zero bytes in input files. This is
certainly a corner case, but GCC and clang both accept zero bytes
at least in comments, and SWIG's current handling is to ignore
the zero byte and all following characters up to and including the
next newline, so for example if a // comment contains a zero byte
SWIG would quietly ignore the next line.
2024-08-30: olly
#2996 Fix generic string literal handling to handle embedded zero
bytes. This allows such strings to work for C# (with %csconst), D
(with %dmanifestconst), Go and Java (with %javaconst). For other
target languages SWIG-generated wrappers still truncate such string
literals at a zero byte (which is probably the best we can do for
target languages where the native string can't contain zero bytes).
2024-08-23: wsfulton
[Java] #2991 Document solutions for mismatch in C++ access
specifiers and Java access modifiers in an inheritance hierarchy.
2024-08-19: wsfulton
[Python] #2993 Add missing std::filesystem namespace to
std_filesystem.i.
2024-08-17: olly
#904 #1907 #2579 Fix string literal and character literal wrapping
bugs.
2024-08-15: olly
Fix parsing of octal string escapes. We now stop when the next
character is digit 8 or 9, and stop after 3 octal digits even if
the next character is an octal digit.
2024-08-15: olly
SWIG now gives an error for digits 8 and 9 in octal constants -
previously these were quietly accepted resulting in a bogus value.
C++11 binary constants are now treated similarly - only digits 0
and 1 were allowed before, but trying to use other digits now gives
a clearer error.
2024-08-12: olly
#657 Allow unmatched ' and " in #error and #warning.
2024-08-09: wsfulton
[Java] #409 Add the constantsmodifiers pragma so that the
visibility for the Java constants interface can be changed from
public to default.
2024-08-02: vadz
[Python] #2966 Fix overloaded Doxygen comments. Sometimes the
Doxygen comments were not combined into one Pydoc comment.
2024-08-01: olly
Fix wrapping of string constants containing bytes 0-8, 11, 12 or
14-31 followed by a digit '0' to '7'. We were emitting these bytes
as a one or two character octal escape sequence which when
interpreted would include the following character.
2024-07-27: olly
#2087 Fix parsing of `noexcept` on a function pointer type used
as the type of a function parameter. We currently generate
invalid C++ code if we try to wrap the function parameter, but
at least the user can `%ignore` the parameter or the whole
function, whereas the parse error was hard to work around.
2024-07-26: olly
Support parsing `noexcept(X)` in expressions, including deducing
its type (which is always `bool`).
2024-07-21: wsfulton
[Python] Add missing slot for init in struct _specialization_cache
needed for python-3.13 builtin wrappers.
2024-07-21: shadchin
[Python] #2968 Add missing tp_versions_used slot needed for
python-3.13.
2024-07-19: olly
-Wallkw now includes keywords for Javascript.
2024-07-19: vadz
[Javascript] #2940 Names of object properties can be keywords in
Javascript so don't auto-rename them to have a leading underscore.
2024-07-18: olly
#1917 Stop removing `f` and `F` suffixes from float literals.
This was resulting in incorrect generated C# and Java code. For
some cases such as `#define CONSTANT 1.0f` this was a regression
introduced in 4.2.0 when we started more correctly wrapping these
as `float` rather than `double`.
2024-07-15: vadz
#2941 Suppress warning WARN_PARSE_USING_UNDEF for ignored using
declarations.
2024-07-03: wsfulton
#2860 Enhance Windows.html documentation for the popular Visual C++
compiler recommending users to correctly set the __cplusplus macro
in order to benefit from modern standards based features that SWIG
provides.
2024-07-02: erezgeva
[Python, Ruby] #2870 Change the thread safety options for the
director code that manages C++ director pointer ownership. Please
define SWIG_THREADS to turn on thread safety. For Python, this can
also be done via the threads module option or -threads.
Implementation now includes a C++11 std::mutex option as priority
over WIN32 and pthread mutexes. See director_guard.swg for further
implementation details.
2024-06-28: vadz
#2935 Fix instantiation of specialized template where the primary
template is a forward class template declaration.
2024-06-16: wsfulton
#2927 Don't ignore overloaded friend functions that are also
declared constexpr.
2024-06-15: wsfulton
[Python] Removed deprecated pytuplehlp.swg file and t_output_helper.
Use SWIG_AppendOutput as a direct replacement for t_output_helper.
*** POTENTIAL INCOMPATIBILITY ***
2024-06-15: vadz
[Python] #2907 Fix returning null from functions with output
parameters. Ensures OUTPUT and INOUT typemaps are handled
consistently wrt return type.
New declaration of SWIG_Python_AppendOutput is now:
SWIG_Python_AppendOutput(PyObject* result, PyObject* obj, int is_void);
The 3rd parameter is new and the new $isvoid special variable
should be passed to it, indicating whether or not the wrapped
function returns void.
Also consider replacing with:
SWIG_AppendOutput(PyObject* result, PyObject* obj);
which calls SWIG_Python_AppendOutput with same parameters but adding $isvoid
for final parameter.
*** POTENTIAL INCOMPATIBILITY ***
2024-06-15: wsfulton
#2907 Add $isvoid special variable which expands to 1 if the
wrapped function has a void return, otherwise expands to 0.
2024-06-14: jschueller
#2863 Support Python 3.13 (currently in prerelease).
2024-06-13: erezgeva
#2609 Fix Java typemap (const char *STRING, size_t LENGTH) to
marshall as Java String instead of Java byte[]. If the old
behaviour is required, replace with typemap (const void *BYTES,
size_t LENGTH).
Add multi-argument typemaps to most languages:
(const char *STRING, size_t LENGTH)
All languages now use a target language string type for this
typemap.
New multi-argument typemaps have been added to most target
languages for use with C raw data (cdata):
(const void *BYTES, size_t LENGTH) to
Statically typed languages use a byte array for this typemap, while
scripting languages remain using a string.
*** POTENTIAL INCOMPATIBILITY ***
* Raw C data: Go uses byte array and int64 for size.
Users can use the (const char *STRING, size_t LENGTH) typemaps for
strings.
2024-06-06: olly
Support alignof(T) for arbitrary type T, and deduce the type of
alignof(T) as size_t.
2024-06-06: olly
#2919 Support parsing `sizeof(X)` for any expression or type X by
skipping balanced parentheses. We don't need to actually parse X
since the type of sizeof is always size_t.
2024-06-05: leakec
#2873 Fix -fvirtual and using declarations for inheriting base
class methods corner case.
2024-05-31: wsfulton
[C#, D, Java, Javascript, Lua] Fix %nspace and %nspacemove for
nested classes and enums in a class. For example:
%nspace Space::OuterClass80;
namespace Space {
struct OuterClass80 {
struct InnerClass80 {
struct BottomClass80 {};
};
enum InnerEnum80 { ie80a, ie80b };
};
}
Previously the following were additionally required for some
languages:
%nspace Space::OuterClass80::InnerClass80;
%nspace Space::OuterClass80::InnerClass80::Bottom80;
Now the appropriate nspace setting is taken from the outer class.
A new warning has also been introduced to check and correct
conflicting nspace usage, for example if the following is
additionally added:
%nspacemove(AnotherSpace) Space::OuterClass80::InnerClass80;
The following warning appears as an inner class can't be moved
outside of the outer class:
Warning 406: Ignoring nspace setting (AnotherSpace) for 'Space::OuterClass80::InnerClass80',
Warning 406: as it conflicts with the nspace setting (Space) for outer class 'Space::OuterClass80'.
2024-05-31: wsfulton
[C#, D, Java, Javascript, Lua] #2782 Enhance the nspace feature
with %nspacemove for moving a class or enum into a differently
named %target language equivalent of a namespace.
2024-05-31: binaire10
[Ruby] #2906 Fix SWIG wrappers for std::map and std::vector to
work with Ruby's "select".
2024-05-30: olly
#2914 Handle alternative operator names in C++ preprocessor
expressions. Handle full set of alternative operator names in
C++ expressions (previously only "and", "or" and "not" were
understood).
2024-05-15: olly
#2868 Support C++17 fold expressions.
2024-05-15: olly
#2876 Report error if parser stack depth exceeded. Previously SWIG
would quietly exit with status 0 in this situation.
2024-04-12: pfusik
[Javascript] #2869 Fix JavaScript _wrap_getCPtr on 64-bit Windows
2024-04-12: wsfulton
[Javascript, MzScheme, Python, Ruby] #202 Remove the vast majority
of the /*@SWIG:...*/ locator strings in the generated wrappers for
these 4 languages to help with reproducible builds.
2024-04-08: thewtex
[Python] #2856 Include stdlib.h for more recent Python Stable ABI
2024-03-28: olly
Fix preprocessor to handle C-style comment ending **/ in macro
argument.
2024-03-27: wsfulton
[Python] #2844 Fix for using more than one std::string_view type in
a method.
2024-03-27: wsfulton
[R] #2847 Add missing std::vector<long> and std::vector<long long>
typemaps which were missing depending on whether or not
SWIGWORDSIZE64 was defined.
2024-03-25: wsfulton
[Python] #2826 Stricter stable ABI conformance.
1. Use Py_DecRef and Py_IncRef when Py_LIMITED_API is defined
instead of macro equivalents, such as Py_INCREF.
2. Don't use PyUnicode_GetLength from python-3.7 and later.
3. Use PyObject_Free instead of deprecated equivalents.
2024-03-25: olly
#2848 Fix elision of comma before ##__VA_ARGS__ which we document
as supported but seems to have not worked since before 2009.
2024-03-11: wsfulton
[C#] #2829 Improve handling and documentation of missing enum base
type information.
2024-03-07: wsfulton
[Ocaml] Fix SWIGTYPE MOVE 'in' typemap to fix compilation error.
2024-03-07: wsfulton
Add SWIGTYPE MOVE 'typecheck' typemaps to remove warning 472
(SWIGWARN_TYPEMAP_TYPECHECK_UNDEF).
2024-03-06: wsfulton
Add support for std::unique_ptr & typemaps. Non-const inputs
implement move semantics from proxy class to C++ layer, otherwise
const inputs and all reference returns behave like any other lvalue
reference to a class.
2024-03-06: wsfulton
[Javascript, MzScheme, Octave] Support NULL being passed into char*
typemaps.
2024-03-06: christophe-calmejane,wsfulton
#2650 Add support for movable std::unique_ptr by adding in
std::unique_ptr && input typemaps. The std::unique && output
typemaps do not support move semantics by default and behave like
lvalue references.
2024-03-06: wsfulton
Add missing use of move constructor instead of copy constructor
when passing movable types by value. This was previously
implemented only for parameters passed to a global function or
static member function and is now extended to parameters passed to
member methods as well as constructors.
2024-03-01: olly
[Java] #2819 Suppress Java removal warnings for uses of
System.runFinalization(). SWIG will need to stop relying on
finalize methods, but we know that and meanwhile these warnings
make the testsuite output noisy. Fix use of deprecated form
of Runtime.exec() in the doxygen example.
2024-02-28: wsfulton
#1754 Fix compilation errors in generated code when instantiating a
templated static method within a template (non-static methods and
constructors were always okay). For example:
template <typename T> class X {
template <class InputIterator>
static void fn(InputIterator first, InputIterator last) {
...
}
};
class SimpleIterator { ... };
%extend X<int> {
%template(fn) fn<SimpleIterator>;
}