"Fossies" - the Fresh Open Source Software Archive 
Member "swig-4.1.1/CHANGES" (30 Nov 2022, 1120112 Bytes) of package /linux/misc/swig-4.1.1.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
See also the latest
Fossies "Diffs" side-by-side code changes report for "CHANGES":
4.1.0_vs_4.1.1.
1 SWIG (Simplified Wrapper and Interface Generator)
2
3 See the CHANGES.current file for changes in the current version.
4 See the RELEASENOTES file for a summary of changes in each release.
5 Issue # numbers mentioned below can be found on Github. For more details, add
6 the issue number to the end of the URL: https://github.com/swig/swig/issues/
7
8 Version 4.1.0 (24 Oct 2022)
9 ===========================
10
11 2022-10-24: wsfulton, AndLLA
12 [R] #2386 Fix problems in shared_ptr wrappers where the class names
13 were not consistent when using the shared_ptr template or the actual
14 underlying type.
15
16 2022-10-24: wsfulton
17 [R] Add support for special variable replacement in the $typemap()
18 special variable macro for R specific typemaps (rtype, rtypecheck,
19 scoercein, scoereout).
20
21 2022-10-24: wsfulton
22 [R] Polymorphism in the wrappers was only working for C++ classes,
23 now this works for C++ structs too.
24
25 2022-10-19: olly
26 [Lua] #2126 Fix type resolution between multiple SWIG-wrapped
27 modules.
28
29 2022-10-17: wsfulton
30 [R] #2385 Add support for std::vector<std::vector<std::string>>.
31
32 2022-10-14: murillo128
33 [Javascript] #2109 Tweak unsigned long and unsigned long long typemaps
34 to create a v8::Number instead of v8::Integer if the value exceeds
35 the size of v8::Integer. Note that the v8::Number value will be
36 imprecise if the value is > MAX_SAFE_INTEGER.
37
38 2022-10-14: olly
39 [R] Arrange that destructors of local C++ objects in the wrapper
40 function get run on SWIG_fail (which calls Rf_error() which calls
41 longjmp()).
42
43 2022-10-14: olly
44 [Lua] Arrange that destructors of local C++ objects in the wrapper
45 function get run on SWIG_fail (which calls lua_error() which calls
46 longjmp()).
47
48 2022-10-13: wsfulton
49 [R] Add missing SWIGTYPE *const& typemaps for supporting pointers
50 by const reference.
51
52 2022-10-10: wsfulton
53 #2160 Fix compile error when using templates with more than one template
54 parameter and used as an input parameter in a virtual method in a
55 director class (problem affecting most of the scripting languages).
56
57 2022-10-10: treitmayr, wsfulton
58 [Python, Ruby] #1811 #1823 Fix invalid code generated in some cases when
59 returning a pointer or reference to a director-enabled class instance.
60 This previously only worked in very simple cases, now return types are
61 resolved to fix. A bug in template instantiations using pointers also
62 works now.
63
64 2022-10-06: wsfulton
65 [CFFI] #1966 #2200 Remove code for Common Lisp CFFI. We dropped support
66 for it in SWIG 4.0.0 by disabling it as the first stage. This is the
67 final stage for complete removal as there has been no meaningful
68 progress to revive it to the status of experimental language.
69
70 2022-10-06: olly
71 [Python] #2390 Remove deprecated and apparently useless defarg.swg
72
73 The only documentation is in the file itself and describes a Python
74 wrapper around the C function defined here, but digging though the
75 git history this Python wrapper doesn't seem to have ever actually
76 been generated by SWIG.
77
78 This file was also marked as deprecated in 2005.
79
80 2022-10-06: wsfulton
81 [Java] #2048 Fix quoting for doxygen \image command to quote the output
82 file name generated into the html src attribute.
83
84 2022-10-05: benjamin-sch
85 [Python] added an interpreter counter to fix deinitialization
86 issues if multiple subinterpreters are used
87
88 2022-10-05: olly, wsfulton
89 #672 Add support for parsing C++11 final classes such as:
90
91 class X final {};
92
93 This no longer gives a syntax error.
94
95 2022-10-05: wsfulton
96 [OCaml] Fix %rename for enum items. Previously the rename had no effect.
97
98 2022-10-05: olly
99 #1465 Report errors in preprocessor expressions by default
100
101 Until now SWIG quietly ignored such errors unless -Wextra (or -Wall
102 which implies -Wextra) was passed, but this is unhelpful as it tends
103 to hide genuine problems. To illustrate this point, enabling this
104 warning by default revealed a typo in the preproc_defined.i
105 testcase in SWIG's own testsuite.
106
107 If you really don't want to see this warning, you can suppress it
108 with command line option -w202 or by using this in your interface
109 file:
110
111 %warnfilter(SWIGWARN_PP_EVALUATION);
112
113 Both will work with older versions of SWIG too.
114
115 2022-10-04: olly
116 #1050 Consistently define SWIG_VERSION both at SWIG-time and in
117 the generated wrapper. Best practice remains to check at SWIG-time
118 where possible because that results in smaller generated wrapper
119 sources.
120
121 SWIGGO and SWIGJAVASCRIPT are now defined in the generated wrappers
122 to match behaviour for all other target languages.
123
124 The undocumented SWIGVERSION macro is no longer defined.
125
126 2022-09-29: olly
127 #2303 SWIG's internal hash tables now use a better hash function.
128
129 The old hash function only considerd the last five characters
130 plus the least significant bit of the last-but-sixth character,
131 which as you might guess generated a lot of many-way collisions.
132
133 This change seems to give about a 4% reduction in wallclock time
134 for processing li_std_list_wrap.i from the testsuite for Python.
135 The hash collision rate for this example drops from 39% to 0!
136
137 2022-09-29: wsfulton
138 #2303 Type tables are now output in a fixed order whereas previously
139 the order may change with any minor input code change. This shouldn't
140 affect users except SWIG_TypePrettyName may output a different C/C++
141 typedef to a type - it's used mostly for showing errors when the type
142 passed to a function is wrong.
143
144 2022-09-29: olly
145 [PHP] Dynamic class properties are no longer supported by default.
146
147 Historically PHP has supported dynamic class properties and SWIG
148 has implemented them too (because we implement the magic __get(),
149 __set() and __isset() methods we need to include explicit
150 handling).
151
152 PHP 8.2 deprecates dynamic class properties - initially they'll
153 warn, and apparently they'll not work by default in PHP 9.0:
154 https://wiki.php.net/rfc/deprecate_dynamic_properties
155
156 In PHP code dynamic properties can be enabled for a class by
157 marking that class with the attribute `#[AllowDynamicProperties]`.
158
159 To follow this PHP change, in SWIG you now need to specify
160 `%feature("php:allowdynamicproperties", 1) Foo;` (or
161 `%feature("php:allowdynamicproperties", 1)` to enable it for
162 all wrapped classes). Unknown features are ignored, so you can add
163 it unconditionally and it'll work with older SWIG too.
164
165 *** POTENTIAL INCOMPATIBILITY ***
166
167 2022-09-19: wsfulton
168 #1484 Fixes for class inheritance with the same name in different namespaces
169 such as:
170
171 namespace A { class Bar {}; }
172 namespace B { template<typename T, typename U> class Bar : public A::Bar {}; }
173
174 2022-09-19: wsfulton
175 #2316 Remove swig.spec file and srcrpm makefile target. These are very out of date
176 and don't seem to be used by RPM based Linux distributions which have their
177 own version of swig.spec.
178
179 2022-09-17: wsfulton
180 [Go, Guile, Racket, Scilab] Add throws typemaps for std::string so that thrown
181 string exception messages can be seen.
182
183 2022-09-17: wsfulton
184 [Racket] Add throws typemaps for char * so that thrown string exception
185 messages can be seen from Racket.
186
187 2022-09-17: wsfulton
188 [Javascript, Octave, R] Improve exceptions for %catches and exception
189 specifications for native types. String exception messages are shown as
190 the exception message instead of just the type of the exception.
191
192 2022-09-17: wsfulton
193 Add missing typecheck typemaps for std::auto_ptr and std::unique_ptr to
194 fix overloading when using these types.
195
196 2022-09-17: wsfulton
197 [Guile] Add error checking to SWIGTYPE and SWIGTYPE & in typemaps to prevent
198 seg faults when passing #nil to these parameter types.
199
200 2022-09-16: wsfulton
201 #999 Provide SWIGTYPE MOVE typemaps in swigmove.i for implementing full
202 move semantics when passing parameters by value.
203
204 2022-08-31: wsfulton
205 #999 Improve move semantics when using rvalue references.
206 The SWIGTYPE && input typemaps now assume the object has been moved.
207
208 These typemaps have been changed assuming that after the function call,
209 the rvalue reference parameter has been moved. The parameter's proxy class
210 that owns the C++ object thus has the underlying pointer set to null
211 so that the (moved from, but still valid) C++ object cannot be used again
212 and the object is additionally deleted.
213
214 *** POTENTIAL INCOMPATIBILITY ***
215
216 2022-08-28: wsfulton
217 [Octave] SWIG now marshals a C/C++ NULL pointer into the null matrix, [].
218 SWIG has always marshalled the null matrix into a NULL pointer; this remains
219 and now we have consistency in representing a NULL pointer.
220
221 2022-08-26: wsfulton
222 [Racket] SWIG now marshals a C/C++ NULL pointer into a null value by calling
223 scheme_make_null(), so that scheme's null? is true for a NULL C/C++ pointer value.
224
225 2022-08-18: wsfulton
226 [Racket] Add support for std::unique_ptr in std_unique_ptr.i.
227 Add support for std::auto_ptr in std_auto_ptr.i.
228
229 2022-08-13: wsfulton
230 [Guile] Add support for std::unique_ptr in std_unique_ptr.i.
231 Add support for std::auto_ptr in std_auto_ptr.i.
232
233 2022-08-11: wsfulton
234 [Lua] Add support for std::unique_ptr in std_unique_ptr.i.
235 Add support for std::auto_ptr in std_auto_ptr.i.
236
237 2022-08-05: wsfulton
238 [D] Fix occasional undefined behaviour with inheritance hierarchies, particularly
239 when using virtual inheritance as the pointers weren't correctly upcast from derived
240 class to base class when stored in the base's proxy class.
241
242 2022-08-05: wsfulton
243 [D] Add support for std::unique_ptr in std_unique_ptr.i.
244 Add support for std::auto_ptr in std_auto_ptr.i.
245
246 2022-08-03: wsfulton
247 [Javascript] Add support for std::unique_ptr in std_unique_ptr.i.
248 Add support for std::auto_ptr in std_auto_ptr.i.
249
250 2022-08-02: wsfulton
251 [Octave] Add support for std::unique_ptr in std_unique_ptr.i.
252 Add support for std::auto_ptr in std_auto_ptr.i.
253
254 2022-08-01: wsfulton
255 [Python] Add initialisers for additional members in PyHeapTypeObject
256 (builtin mode) for Python-3.11 - _ht_tpname, _spec_cache.
257
258 2022-07-30: wsfulton
259 C++20 has deprecated std::basic_string<>::reserve() and the C++11 method
260 std::basic_string<>::shrink_to_fit() is a replacement that can be used.
261 std_string.i and std_wstring.i provided wrappers for reserve with the following
262 template instantiations:
263
264 %template(string) std::basic_string<char>;
265 %template(wstring) std::basic_string<wchar_t>;
266
267 The reserve method is no longer wrapped, however the shrink_to_fit() method
268 can be used as an alternative from the target language (the generated wrappers
269 call reserve() instead if C++<=20).
270
271 Note that std::basic_string<>::reserve(size_t n) is still wrapped unchanged.
272
273 *** POTENTIAL INCOMPATIBILITY ***
274
275 2022-07-30: wsfulton
276 [Tcl] Add support for std::unique_ptr in std_unique_ptr.i.
277 Add support for std::auto_ptr in std_auto_ptr.i.
278
279 2022-07-27: ZackerySpytz, olly
280 #1678 Support parsing C++20 templated lambdas.
281
282 2022-07-27: ZackerySpytz, olly
283 #1622 Add support for the C++20 spaceship operator (<=>).
284
285 2022-07-26: olly
286 [Tcl] https://sourceforge.net/p/swig/bugs/977/
287 Fix handling of long long on 32-bit platforms. This fix raises
288 SWIG's minimum supported Tcl version to 8.4.0 (which was released
289 just under 20 years ago).
290
291 2022-07-26: olly
292 Fix incorrect operator precedence in preprocessor expressions.
293
294 2022-07-25: olly
295 Support for C++14 binary integer literals in preprocessor expressions.
296
297 2022-07-20: wsfulton
298 [C#, Java] Ensure the order of interfaces generated in proxy interfaces for the
299 %interface family of macros is the same as that parsed from the bases in C++.
300
301 2022-07-20: jicks, Ingener74, olly
302 #422 [Python] Fix mishandling of a Python class inheriting from
303 multiple SWIG-wrapped director classes.
304
305 2022-07-19: wsfulton
306 #692 [C#, Java, Perl, Python, Ruby] std::unique_ptr and std::auto_ptr typemaps
307 provided for inputs types in std_unique_ptr.i and std_auto_ptr.i.
308
309 Now these smart pointers can be used as input parameters to functions. A proxy
310 class instance transfers memory ownership of the underlying C++ object from the
311 proxy class to a smart pointer instance passed to the wrapped function.
312
313 2022-07-19: jschueller
314 [Python] #2314 Drop support for Python 3.2.
315
316 2022-07-19: olly
317 Remove remaining support code for classic macos, which has not been
318 supported by Apple for over 20 years now.
319
320 2022-07-12: wsfulton
321 #999 Performance optimisation for parameters passed by value that are C++11 movable.
322 The C++ wrappers create a temporary variable for a parameter to be passed to a
323 function. This is initially default constructed and then copy assigned from the
324 instance being passed in from the target language. This is unchanged, however,
325 when the temporary variable is passed to the wrapped function, it is now done using
326 std::move. If the type is move constructible, the move constructor will be used
327 instead of the copy constructor.
328
329 2022-07-12: wsfulton
330 [Perl] Add std::auto_ptr support in std_auto_ptr.i library file.
331
332 2022-07-12: erezgeva
333 [Perl] Add std::unique_ptr support in std_unique_ptr.i library file.
334
335 2022-07-07: jmarrec
336 #1158 #2286 Add basic support for C++11 attributes. These are now
337 crudely ignored by SWIG's parser's tokeniser, which is better that
338 failing with a parse error.
339
340 2022-07-05: ianlancetaylor
341 [Go] #2245 Handle NULL pointers for string* conversions.
342 Rearrange generation of director methods and rename
343 receiver argument from p to swig_p.
344
345 2022-07-03: wsfulton
346 #999 Performance optimisation for directors for classes passed by value. The directorin
347 typemaps in the director methods now use std::move on the input parameter when
348 copying the object from the stack to the heap prior to the callback into the target
349 language, thereby taking advantage of move semantics if available.
350
351 2022-07-02: wsfulton
352 #1722 [C#, Java, Python, Ruby] Add std::unique_ptr support. Ported from std::auto_ptr.
353 Use the %unique_ptr(T) macro as follows for usage std::unique_ptr<T>. For example, for
354 a class called Klass:
355
356 %include "std_unique_ptr.i"
357 %unique_ptr(Klass)
358
359 Support is currently limited to only returning a std::unique_ptr from a function.
360
361 2022-06-29: wsfulton
362 #999 #1044 Enhance SWIGTYPE "out" typemaps to use std::move when copying
363 objects, thereby making use of move semantics when wrapping a function returning
364 by value if the returned type supports move semantics.
365
366 Wrapping functions that return move only types 'by value' now work out the box
367 without having to provide custom typemaps.
368
369 The implementation removed all casts in the "out" typemaps to allow the compiler to
370 appropriately choose calling a move constructor, where possible, otherwise a copy
371 constructor. The implementation also required modifying SwigValueWrapper to
372 change a cast operator from:
373
374 SwigValueWrapper::operator T&() const;
375
376 to
377
378 #if __cplusplus >=201103L
379 SwigValueWrapper::operator T&&() const;
380 #else
381 SwigValueWrapper::operator T&() const;
382 #endif
383
384 This is not backwards compatible for C++11 and later when using the valuewrapper feature
385 if a cast is explicitly being made in user supplied "out" typemaps. Suggested change
386 in custom "out" typemaps for C++11 and later code:
387
388 1. Try remove the cast altogether to let the compiler use an appropriate implicit cast.
389 2. Change the cast, for example, from static_cast<X &> to static_cast<X &&>, using the
390 __cplusplus macro if all versions of C++ need to be supported.
391
392 *** POTENTIAL INCOMPATIBILITY ***
393
394 2022-06-15: wsfulton
395 #2039 Add move assignment operator to SwigValueWrapper used by the
396 valuewrapper feature.
397
398 2022-06-04: sethrj
399 Enhance $typemap to support typemap attributes.
400
401 $typemap(method:attribute, typepattern)
402
403 For example:
404
405 %typemap(cstype, out="object") XClass "XClass"
406 %typemap(cscode) BarClass %{
407 $typemap(cstype:out, XClass) bar() {
408 return null;
409 }
410
411 which expands to
412
413 object bar() {
414 return null;
415 }
416
417 2022-05-30: wsfulton
418 [C#, D] Add new special variable expansion: $imfuncname.
419 Expands to the function name called in the intermediary class.
420
421 2022-05-30: LindleyF
422 [Java] #2042 Add new special variable expansion: $imfuncname.
423 Expands to the function name called in the intermediary class.
424
425 2022-05-28: jkuebart
426 [Java] On some versions of Android, specifically Android 6,
427 detaching the current thread from the JVM after every invocation
428 causes a memory leak.
429
430 Offer SWIG_JAVA_DETACH_ON_THREAD_END to configure a behaviour
431 where the JVM is only detached in the thread destructor.
432
433 See https://developer.android.com/training/articles/perf-jni#threads.
434
435 2022-05-27: xypron
436 [Python] #2277 Define PY_SSIZE_T_CLEAN macro before #include "Python.h" as
437 recommended in Python 3.7 and later.
438
439 To avoid this macro definition, add the following to your interface file so
440 that SWIG_NO_PY_SSIZE_T_CLEAN is defined at the beginning of the C++ wrappers:
441
442 %begin %{
443 #define SWIG_NO_PY_SSIZE_T_CLEAN
444 %}
445
446 2022-05-26: rokups
447 [C#] #1323 Modify SwigDerivedClassHasMethod for a more efficient director
448 implementation when calling virtual methods that are not overridden.
449
450 2022-05-15: erezgeva, eiselekd
451 [Lua, Perl, Octave, PHP, Tcl] #2275 #2276 #2283 Add argcargv.i library containing
452 (int ARGC, char **ARGV) multi-argument typemaps.
453
454 Document this library in Typemaps.html.
455
456 2022-05-07: KrisThielemans
457 [Python] Fix "too many initializers for 'PyHeapTypeObject'" errors
458 using PyPy 3.8 and later.
459
460 2022-05-04: wsfulton
461 [C#] Add C# wchar_t * director typemaps
462
463 2022-04-20: cminyard
464 Fix an issue where newlines were not properly generated
465 for godirectorin typemaps. If you have a virtual function
466 not assigned to zero, in some cases it won't generate a
467 newline and you will see errors:
468 example.go:1508:3: expected ';', found swig_r
469 when compiling the go code.
470
471 Also add an example of using goin and godirectorin and add
472 a test for this situation.
473
474 2022-04-29: jason-daly, JerryJoyce, wsfulton
475 [C#] #1233 Add wchar_t * and std::wstring Unicode string support on Linux.
476
477 2022-04-11: robinst
478 #2257 Fix new Ruby 3.2 warning "undefining the allocator of T_DATA
479 class swig_runtime_data".
480
481 2022-04-07: olly
482 #1750 SWIG now recognises and ignores Doxygen group commands `@{` and `@}`.
483
484 2022-04-06: wsfulton
485 ./configure now enables C++11 and later C++ standards testing by default (when
486 running: 'make check').
487
488 The options to control this testing are the same:
489
490 ./configure --enable-cpp11-testing
491 ./configure --disable-cpp11-testing
492
493 But the former is now the default and the latter can be used to turn off C++11 and
494 later C++ standards testing.
495
496 2022-04-06: wsfulton
497 [Python] #1635 The "autodoc" feature no longer overrides Doxygen comments
498 in the generated docstring.
499
500 If a "docstring" feature is present it will still override a Doxygen comment.
501 If the "autodoc" feature is also present, the combined "autodoc" and "docstring"
502 will override the Doxygen comment. If no "docstring" is present then the
503 "autodoc" feature will not be generated when there is a Doxygen comment.
504
505 This way the "autodoc" feature can be specified and used to provide documentation
506 for 'missing' Doxygen comments.
507
508 *** POTENTIAL INCOMPATIBILITY ***
509
510 2022-04-01: olly
511 Remove undocumented and non-functional -browse command line option.
512
513 2022-03-26: eltoder
514 [Python] #1684 Use different capsule names with and without -builtin
515
516 Types generated with and without -builtin are not compatible. Mixing
517 them in a common type list leads to crashes. Avoid this by using
518 different capsule names: "type_pointer_capsule" without -builtin and
519 "type_pointer_capsule_builtin" with.
520
521 2022-03-25: wsfulton
522 The debug command line options that display parse tree nodes
523 (-debug-module, -debug-top, -debug-symtabs) now display previously hidden
524 linked list pointers which are useful for debugging parse trees.
525
526 Added new command line option -debug-quiet. This suppresses the display
527 of most linked list pointers and symbol table pointers in the parse tree nodes.
528
529 The keys in the parse tree node are now shown in alphabetical order.
530
531 2022-03-24: wsfulton
532 #2244 Fix using declaration in derived class bugs when all the base
533 class's overloaded methods were overridden in the derived class -
534 fixes "multiply defined" errors.
535
536 2022-03-23: wsfulton
537 [Python] #1779 The -py3 option is deprecated and now has no effect on the
538 code generated. Use of this option results in a deprecated warning.
539 The related SWIGPYTHON_PY3 macro that this option defined is no longer generated.
540
541 Note that %pythonnondynamic feature generates a metaclass that works on both
542 Python 2 and Python 3.
543
544 2022-03-21: wsfulton
545 [Python] #1779 pyabc.i for abstract base classes now supports versions of
546 Python prior to 3.3 by using the collection module for these older versions.
547 Python-3.3 and later continue to use the collections.abc module.
548 The -py3 option no longer has any effect on the %pythonabc feature.
549
550 2022-03-21: jschueller, jim-easterbrook, wsfulton
551 [Python] #2137 C++ static member functions no longer generate a "flattened"
552 name in the Python module. For example:
553
554 s = example.Spam()
555 s.foo() # Spam::foo() via an instance
556 example.Spam.foo() # Spam::foo() using class method
557 example.Spam_foo() # Spam::foo() "flattened" name
558
559 The "flattened" name is no longer generated, but can be generated
560 by using the new -flatstaticmethod option.
561
562 *** POTENTIAL INCOMPATIBILITY ***
563
564 2022-03-18: ianlancetaylor
565 [Go] #337 Implement %extend base methods in child classes.
566
567 2022-03-17: olly
568 [Python] #1779 SWIG's Python test-suite and examples are now
569 run with Python 3 by default. To run them with Python 2, set
570 PY2 to a non-empty value, e.g.:
571
572 make check-python-test-suite PY2=1
573
574 2022-03-16: olly
575 [Go] #683 -intgosize is now optional - if not specified the
576 generated C/C++ wrapper code will use ptrdiff_t for intgo and
577 size_t for uintgo.
578
579 2022-03-15: ianlancetaylor
580 [Go] Add typemaps for std::string*.
581
582 2022-03-15: ianlancetaylor
583 [Go] Don't convert arrays to pointers if there is a "gotype"
584 typemap entry.
585
586 2022-03-15: ianlancetaylor
587 [Go] Add documentation note about Go and C++ exceptions.
588
589 2022-03-12: wsfulton
590 #1524 %interface family of macros no longer contain the getter/setter
591 methods for wrapping variables. The interface only contains
592 virtual and non-virtual instance methods, that is, no static methods.
593 Enums are also no longer added to the interface (affects Java only where
594 they were missing from the proxy class, C# never had them in the interface).
595
596 *** POTENTIAL INCOMPATIBILITY ***
597
598 2022-03-12: wsfulton
599 #1277 Fixes for the family of %interface macros, %interface,
600 %interface_impl and %interface_custom fixes for overloaded methods
601 in an inheritance chain.
602
603 When C++ methods are not able to be overloaded in a derived class,
604 such as when they differ by just const, or the target language
605 parameters types are identical even when the C++ parameter types
606 are different, SWIG will ignore one of the overloaded methods with
607 a warning. A %ignore is required to explicitly ignore one of the
608 overloaded methods to avoid the warning message. Methods added
609 in the derived classes due to one of the %interface macros are now
610 similarly ignored/not added to the derived class.
611
612 The methods added to the derived classes can now also be modified
613 via %feature and %rename.
614
615 2022-03-08: ianlancetaylor
616 [Go] Treat a nil argument as a NULL pointer.
617
618 2022-03-08: ianlancetaylor
619 [Go] Add documentation notes about thread local storage.
620
621 2022-03-08: olly
622 #1006 SWIG now copes with an interface filename specified on the
623 command line which contains a closing parenthesis `)`, and more
624 generally with attributes to `%include` and `%import` which
625 are quoted and contain parentheses.
626
627 2022-03-07: Omar Medina
628 [Tcl] https://sourceforge.net/p/swig/bugs/1290/
629 Fix SWIG_AsWCharPtrAndSize() to actually assign to result
630 variable. It looks like SWIG/Tcl wide character handling is
631 currently fundamentally broken except on systems which use wide
632 characters as the system encoding, but this should fix wrapping
633 functions which take a wide string as a parameter on Microsoft
634 Windows.
635
636 2022-03-07: olly
637 [Javascript] #682 Fix handling of functions which take void*.
638
639 2022-03-06: olly
640 SWIG should now reliably exit with status 0 if the run was
641 successful and status 1 if there was an error (or a warning and
642 -Werror was in effect).
643
644 Previously in some situations SWIG would try to exit with the
645 status set to the number of errors encountered, but that's
646 problematic - for example if there were 256 errors this would
647 result in exit status 0 on most platforms. Also some error
648 statuses have special meanings e.g. those defined by <sysexits.h>.
649 Also SWIG/Javascript tried to exit with status -1 in a few places
650 (which typically results in exit status 255).
651
652 2022-03-05: wsfulton
653 #1441 Fix using declaration in derived class incorrectly introducing a method
654 from a base class when the using declaration is declared before the method
655 declaration. Problem occurred when within a namespace and the parameter types
656 in the method signatures were not fully qualified.
657 2022-03-05: ianlancetaylor
658 [Go] Treat non-const references as pointers.
659
660 2022-03-05: ianlancetaylor
661 In SWIG Go testsuite, fail test if "go build" fails.
662
663 2022-03-03: olly
664 #1901 #2223 SWIG should now always exit cleanly if memory
665 allocation fails, including removing any output files created
666 during the current run.
667
668 Previously most places in the code didn't check for a NULL return
669 from malloc()/realloc()/calloc() at all, typically resulting in
670 undefined behaviour; some places used assert() to check for a NULL
671 return (which is a misuse of assert() and such checks disappear if
672 built with NDEBUG defined leaving us back with undefined
673 behaviour).
674
675 2022-03-03: olly
676 #891 Report errors for typemap attributes without a value
677 (previously SWIG segfaulted) and for typemap types with a value
678 (previously the value was quietly ignored).
679
680 The old way of specifying a language name in the typemap attributes
681 is no longer supported (it has been deprecated for 16 years).
682
683 2022-03-02: geographika, wsfulton
684 [Python] #1951 Add Python variable annotations support.
685
686 Both function annotations and variable annotations are turned on using the
687 "python:annotations" feature. Example:
688
689 %feature("python:annotations", "c");
690
691 struct V {
692 float val;
693 };
694
695 The generated code contains a variable annotation containing the C float type:
696
697 class V(object):
698 val: "float" = property(_example.V_val_get, _example.V_val_set)
699 ...
700
701 Python 3.5 and earlier do not support variable annotations, so variable
702 annotations can be turned off with a "python:annotations:novar" feature flag.
703 Example turning on function annotations but not variable annotations globally:
704
705 %feature("python:annotations", "c");
706 %feature("python:annotations:novar");
707
708 or via the command line:
709
710 -features python:annotations=c,python:annotations:novar
711
712 *** POTENTIAL INCOMPATIBILITY ***
713
714 2022-02-27: wsfulton
715 [Python] #735 #1561 Function annotations containing C/C++ types are no longer
716 generated when using the -py3 option. Function annotations support has been
717 moved to a feature to provide finer grained control. It can be turned on
718 globally by adding:
719
720 %feature("python:annotations", "c");
721
722 or by using the command line argument:
723
724 -features python:annotations=c
725
726 Also see entry dated 2022-03-02, regarding variable annotations.
727
728 *** POTENTIAL INCOMPATIBILITY ***
729
730 2022-02-26: wsfulton
731 #655 #1840 Add new warning WARN_LANG_USING_NAME_DIFFERENT to warn when a
732 method introduced by a using declaration in a derived class cannot
733 be used due to a conflict in names.
734
735 2022-02-24: olly
736 #1465 An invalid preprocessor expression is reported as a pair of
737 warnings with the second giving a more detailed message from the
738 expression evaluator. Previously SWIG prefixed the second message
739 with "Error:" - that was confusing as it's actually only a warning
740 by default so we've now dropped this prefix.
741
742 Before:
743
744 x.i:1: Warning 202: Could not evaluate expression '1.2'
745 x.i:1: Warning 202: Error: 'Floating point constant in preprocessor expression'
746
747 Now:
748
749 x.i:1: Warning 202: Could not evaluate expression '1.2'
750 x.i:1: Warning 202: Floating point constant in preprocessor expression
751
752 2022-02-23: olly
753 #1384 Fix a preprocessor expression evaluation bug. A
754 subexpression in parentheses lost its string/int type flag and
755 instead used whatever type was left in the stack entry from
756 previous use. In practice we mostly got away with this because
757 most preprocessor expressions are integer, but it could have
758 resulted in a preprocessor expression incorrectly evaluating as
759 zero. If -Wextra was in use you got a warning:
760
761 Warning 202: Error: 'Can't mix strings and integers in expression'
762
763 2022-02-21: davidcl
764 [Scilab] Improve 5.5.2, 6.0.0 and 6.1.0 support.
765
766 For Scilab 5, long names are reduced to small names preserving the
767 class prefix and accessor suffix (get or set).
768
769 For Scilab 6, long names with the class prefix and accessor suffix
770 should be used on the user code.
771
772 The `-targetversion` option has been removed as the generated code
773 now detects the Scilab version in loader.sce or builder.sce.
774
775 *** POTENTIAL INCOMPATIBILITY ***
776
777 2022-02-20: wsfulton
778 Fix %warnfilter warning suppress for warning 315 SWIGWARN_PARSE_USING_UNDEF.
779
780 2022-02-17: olly
781 [PHP] https://sourceforge.net/p/swig/bugs/1211/
782 Fix to call cleanup code in exception situations and not to invoke
783 the freearg typemap twice in certain situations.
784
785 2022-02-15: olly
786 #300 #368 Improve parser handling of % followed immediately by
787 an identifier. If it's not a recognised directive the scanner
788 now emits MODULO and then rescans what follows, and if the parser
789 then gives a syntax error we report it as an unknown directive.
790 This means that `a%b` is now allowed in an expression, and that
791 things like `%std::vector<std::string>` now give an error rather
792 than being quietly ignored.
793
794 2022-02-11: adr26
795 [Python] #2154 Fix memory leak.
796
797 SWIG python objects were being freed after the corresponding SWIG
798 module information was destroyed in Python 3, causing leaks when as
799 a result the object destructor could not be invoked. To prevent this
800 misordering, SWIG python objects now obtain a reference to the
801 Python capsule wrapping the module information, so that the module
802 information is correctly destroyed after all SWIG python objects
803 have been freed (and corresponding destructors invoked).
804
805 2022-02-10: olly
806 [Tcl] https://sourceforge.net/p/swig/bugs/1207/
807 https://sourceforge.net/p/swig/bugs/1213/
808
809 Fix Tcl generic input typemap for std::vector.
810
811 2022-02-07: sethrj
812 #2196 Add alternative syntax for specifying fragments in typemaps.
813
814 New syntax:
815 %typemap("in", fragment="frag1", fragment="frag2", fragment="frag3") {...}
816 which is equivalent to:
817 %typemap(in, fragment="frag1,frag2,frag3") {...}
818
819
820 2022-02-07: olly
821 #1806 Remove support for the "command" encoder, which was mostly
822 intended for use in `%rename` - most uses can be achieved using
823 the "regex" encoder, so we recommend using that instead.
824
825 The "command" encoder suffers from a number of issues - as the
826 documentation for it admitted, "[it] is extremely slow compared to
827 all the other [encoders] as it involves spawning a separate process
828 and using it for many declarations is not recommended" and that it
829 "should generally be avoided because of performance
830 considerations".
831
832 But it's also not portable. The design assumes that `/bin/sh`
833 supports `<<<` but that's a bash-specific feature so it doesn't
834 work on platforms where `/bin/sh` is not bash - it fails on
835 Debian, Ubuntu and probably some other Linux distros, plus most
836 non-Linux platforms. Microsoft Windows doesn't even have a
837 /bin/sh as standard.
838
839 Finally, no escaping of the passed string is done, so it has
840 potential security issues (though at least with %rename the input
841 is limited to valid C/C++ symbol names).
842
843 2022-02-06: olly
844 #2193 -DFOO on the SWIG command line now sets FOO to 1 for
845 consistency with C/C++ compiler preprocessors. Previously
846 SWIG set FOO to an empty value.
847
848 Existing invocations of SWIG with `-DFOO` where the empty value
849 matters can be updated to `-DFOO=` which should work with both
850 old and new releases of SWIG.
851
852 *** POTENTIAL INCOMPATIBILITY ***
853
854 2022-02-06: sethrj
855 #2194 Classes that are non-assignable due to const data or const
856 reference members are now automatically detected.
857
858 2022-02-04: friedrichatgc
859 [Octave] #1672 Fix for isobject for Octave 4.4 - 6.0.
860
861 2022-02-03: olly
862 [C#] #283 #998 Fix memory leak in directorin typemap for
863 std::string.
864
865 2022-02-03: olly
866 [Python] #967 Make `self` parameter available to user typemaps.
867
868 2022-02-03: teythoon
869 [Python] #801 Fix -Wunused-parameter warnings with builtin,
870
871 2022-02-03: teythoon
872 #801 Fix -Wstrict-prototypes warnings in generated pointer
873 functions.
874
875 2022-02-03: olly
876 #660 https://sourceforge.net/p/swig/bugs/1081/
877 Default parameter values containing method calls are now parsed and
878 handled - e.g. `x->foo(3,4)` and `y.z()`.
879
880 2022-02-02: olly
881 [Ruby] https://sourceforge.net/p/swig/bugs/1136/ Fix remove of prefix
882 from method name to only remove it at the start.
883
884 2022-02-01: olly
885 #231 Handle returning an object by reference in a C++ trailing
886 return type.
887
888 2022-02-01: davidcl
889 [Scilab] #745 use SWIG_<module>_Init() as a C module init function.
890
891 2022-02-01: olly
892 [OCaml] #2083 Fix to work when CAML_SAFE_STRING is on, which it is
893 by default in recent Ocaml releases.
894
895 2022-01-31: mreeez
896 https://sourceforge.net/p/swig/bugs/1147/
897 Fix copyToR() generated for a struct in a namespace.
898
899 2022-01-29: fschlimb
900 #655 Better handling of using declarations.
901
902 2022-01-29: dontpanic92
903 [Go] #676 Fix code generated for a C++ class with a non-capitalised
904 name.
905
906 2022-01-26: trex58
907 #1919 #1921 #1923 Various fixes for AIX portability.
908
909 2022-01-26: olly
910 #1935 Don't crash on an unclosed HTML tag in a doxygen comment
911 when -doxygen is specified.
912
913 2022-01-25: olly
914 Constant expressions now support member access with `.` such as
915 `foo.bar`. Previous this only worked in a case like `x->foo.bar`.
916
917 2022-01-25: olly
918 #2091 Support most cases of `sizeof` applied to an expression
919 in constant expressions. Previously there was only support for
920 `sizeof(<type>)` and expressions which syntactically look like a
921 type (such as `sizeof(foo)`).
922
923 2022-01-25: olly
924 #80 #635 https://sourceforge.net/p/swig/bugs/1139/
925 Add support for parsing common cases of `<` and `>` comparisons
926 in constant expressions. Adding full support for these seems hard
927 to do without introducing conflicts into the parser grammar, but in
928 fact all reported cases have had parentheses around the comparison
929 and we can support that with a few restrictions on the left side of
930 `<`.
931
932 2022-01-25: wsfulton
933 New warning 327 for extern templates, eg:
934
935 extern template class std::vector<int>;
936 extern template void Func<int>();
937
938 results in warning
939
940 example.i:3: Warning 327: Extern template ignored.
941 example.i:4: Warning 327: Extern template ignored.
942
943 Extern template classes previously resulted in warning 320.
944
945 2022-01-24: romintomasetti
946 #2131 #2157 C++11 extern function template parsing error fix.
947
948 2022-01-21: wsfulton
949 #2120 #2138 Replace legacy PCRE dependency with PCRE2.
950 This requires changes for building SWIG from source. See updated
951 html documentation in Preface.html and Windows.html. Updated
952 instructions are also shown when running ./configure if PCRE2 is not
953 found. Note that debian based systems can install PCRE2 using:
954
955 apt install libpcre2-dev
956
957 Note that https://github.com/swig/swig/wiki/Getting-Started also has
958 updated information for building from source.
959
960 2022-01-19: olly
961 [PHP] #2027 Automatically generate PHP type declarations for PHP 8.
962 The generate code still compiles for PHP 7.x, but without type
963 declarations since PHP 7.x has much more limited type declaration
964 support.
965
966 2022-01-18: olly
967 [Perl] #1629 Perl 5.8.0 is now the oldest version we aim to support.
968
969 2022-01-14: wsfulton
970 [Python] Fix %callback and specifying the callback function as a
971 static member function using Python staticmethod syntax, such as
972 Klass.memberfunction instead of Klass_memberfunction when using
973 -builtin and -fastproxy.
974
975 2022-01-11: wsfulton
976 [Python] Accept keyword arguments accessing static member functions when
977 using -builtin and kwargs feature and Python class staticmethod syntax.
978 The missing keyword argument support was only when using the
979 class staticmethod syntax, such as Klass.memberfunction, and not when
980 using the flat static method syntax, such as Klass_memberfunction.
981
982 2022-01-04: juierror
983 [Go] #2045 Add support for std::array in std_array.i.
984
985 2021-12-18: olly
986 [PHP] Add PHP keyword 'readonly' (added in 8.1) to the list SWIG
987 knows to automatically rename. This keyword is special in that PHP
988 allows it to be used as a function (or method) name.
989
990 2021-12-07: vstinner
991 [Python] #2116 Python 3.11 support: use Py_SET_TYPE()
992
993 2021-12-05: rwf1
994 [Octave] #2020 #1893 Add support for Octave 6 up to and including 6.4.
995 Also add support for compiling with -Bsymbolic which is used by default
996 by mkoctfile.
997
998 2021-12-02: jsenn
999 [Python] #2102 Fixed crashes when using embedded Python interpreters.
1000
1001 2021-11-12: wsfulton
1002 [Javascript] v8 and node only. Fix mismatched new char[] and free()
1003 when wrapping C code char arrays. Now calloc is now used instead of
1004 new char[] in SWIG_AsCharPtrAndSize.
1005
1006 2021-10-03: ajrh1
1007 [Perl] #2074: Avoid -Wmisleading-indentation in generated code
1008 when using gcc11.
1009
1010 2021-10-03: jschueller
1011 [CMake] #2065: Add option to enable or disable PCRE support.
1012
1013 2021-09-16: ianlancetaylor
1014 [Go] Improved _cgo_panic implementation.
1015
1016 2021-09-16: ianlancetaylor
1017 [Go] Don't use crosscall2 for panicking. Instead rely on documented
1018 and exported interfaces.
1019
1020 2021-09-14: ianlancetaylor
1021 [Go] Remove -no-cgo option (long unsupported in Go)
1022
1023 2021-05-04: olly
1024 [PHP] #2014 Throw PHP exceptions instead of using PHP errors
1025
1026 PHP exceptions can be caught and handled if desired, but if they
1027 aren't caught then PHP exits in much the same way as it does for a
1028 PHP error.
1029
1030 In particular this means parameter type errors and some other cases
1031 in SWIG-generated wrappers now throw a PHP exception, which matches
1032 how PHP's native parameter handling deals with similar situations.
1033
1034 `SWIG_ErrorCode()`, `SWIG_ErrorMsg()`, `SWIG_FAIL()` and `goto thrown;`
1035 are no longer supported (these are really all internal implementation
1036 details and none are documented aside from brief mentions in CHANGES
1037 for the first three). I wasn't able to find any uses in user interface
1038 files at least in FOSS code via code search tools.
1039
1040 If you are using these:
1041
1042 Use `SWIG_PHP_Error(code,msg);` instead of `SWIG_ErrorCode(code);
1043 SWIG_ErrorMsg(msg);` (which will throw a PHP exception in SWIG >= 4.1
1044 and do the same as the individual calls in older SWIG).
1045
1046 `SWIG_FAIL();` and `goto thrown;` can typically be replaced with
1047 `SWIG_fail;`. This will probably also work with older SWIG, but
1048 please test with your wrappers if this is important to you.
1049
1050 *** POTENTIAL INCOMPATIBILITY ***
1051
1052 2021-05-17: adr26
1053 [Python] #1985 Fix memory leaks:
1054
1055 1. Python object references were being incorrectly retained by
1056 SwigPyClientData, causing swig_varlink_dealloc() never to run / free
1057 memory. SwigPyClientData_New() / SwigPyClientData_Del() were updated
1058 to fix the object reference counting, causing swig_varlink_dealloc()
1059 to run and the memory swig_varlink owns to be freed.
1060
1061 2. SwigPyClientData itself was not freed by SwigPyClientData_Del(),
1062 causing another heap leak. The required free() was added to
1063 SwigPyClientData_Del()
1064
1065 3. Fix reference counting/leak of python cached type query
1066
1067 4. Fix reference counting/leak of SwigPyObject dict (-builtin)
1068
1069 5. Python object reference counting fixes for out-of-memory
1070 scenarios were added to: SWIG_Python_RaiseOrModifyTypeError(),
1071 SWIG_Python_AppendOutput(), SwigPyClientData_New(),
1072 SwigPyObject_get___dict__() and SwigPyObject_format()
1073
1074 6. Add error handling for PyModule_AddObject() to
1075 SWIG_Python_SetModule() (failure could be caused by OOM or a name
1076 clash caused by malicious code)
1077
1078 2021-05-13: olly
1079 [UFFI] #2009 Remove code for Common Lisp UFFI. We dropped support
1080 for it in SWIG 4.0.0 and nobody has stepped forward to revive it in
1081 over 2 years.
1082
1083 2021-05-13: olly
1084 [S-EXP] #2009 Remove code for Common Lisp S-Exp. We dropped
1085 support for it in SWIG 4.0.0 and nobody has stepped forward to
1086 revive it in over 2 years.
1087
1088 2021-05-13: olly
1089 [Pike] #2009 Remove code for Pike. We dropped support for it in
1090 SWIG 4.0.0 and nobody has stepped forward to revive it in over 2
1091 years.
1092
1093 2021-05-13: olly
1094 [Modula3] #2009 Remove code for Modula3. We dropped support for it
1095 in SWIG 4.0.0 and nobody has stepped forward to revive it in over 2
1096 years.
1097
1098 2021-05-13: olly
1099 [CLISP] #2009 Remove code for GNU Common Lisp. We dropped support
1100 for it in SWIG 4.0.0 and nobody has stepped forward to revive it in
1101 over 2 years.
1102
1103 2021-05-13: olly
1104 [Chicken] #2009 Remove code for Chicken. We dropped support for it
1105 in SWIG 4.0.0 and nobody has stepped forward to revive it in over 2
1106 years.
1107
1108 2021-05-13: olly
1109 [Allegrocl] #2009 Remove code for Allegro Common Lisp. We dropped
1110 support for it in SWIG 4.0.0 and nobody has stepped forward to
1111 revive it in over 2 years.
1112
1113 2021-05-04: olly
1114 [PHP] #1982 #1457 https://sourceforge.net/p/swig/bugs/1339/
1115 SWIG now only use PHP's C API to implement its wrappers, and no
1116 longer generates PHP code to define classes. The wrappers should
1117 be almost entirely compatible with those generated before, but
1118 faster and without some previously hard-to-fix bugs.
1119
1120 The main notable difference is SWIG no longer generates a .php
1121 wrapper at all by default (only if %pragma(php) code=... or
1122 %pragma(php) include=... are specified in the interface file).
1123 This also means you need to load the module via extension=...
1124 in php.ini, rather than letting the dl() in the generated
1125 .php wrapper load it (but dl() has only worked for command-line
1126 PHP for some years now).
1127
1128 *** POTENTIAL INCOMPATIBILITY ***
1129
1130 2021-04-30: olly
1131 #1984 Remove support for $source and $target.
1132 These were officially deprecated in 2001, and attempts to use them have
1133 resulted in a warning (including a pointer to what to update them to)
1134 for most if not all of that time.
1135
1136 2021-04-27: wsfulton
1137 #1987 [Java] Fix %interface family of macros for returning by const
1138 pointer reference.
1139
1140 2021-04-19: olly
1141 Fix use of uninitialised variable in the generated code for an
1142 empty typecheck typemap, such as the dummy one we include for
1143 std::initializer_list.
1144
1145 2021-04-12: olly
1146 #1777 [Python] Specifying -py3 now generates a check for Python
1147 version >= 3.0.
1148
1149 2021-03-26: olly
1150 [PHP] Add PHP keywords 'fn' (added in 7.4) and 'match' (added in
1151 8.0) to the list SWIG knows to automatically rename.
1152
1153 2021-03-23: wsfulton
1154 #1942 [Python] Fix compilation error in wrappers when using -builtin
1155 and wrapping varargs in constructors.
1156
1157 2021-03-22: goto40
1158 #1977 Fix handling of template template parameters.
1159
1160 2021-03-21: olly
1161 #1929, #1978 [PHP] Add support for PHP 8.
1162
1163 2021-03-19: wsfulton
1164 #1610 Remove -ansi from default compilation flags.
1165
1166 2021-03-19: dot-asm
1167 #1934 [Java] Clean up typemaps for long long arrays.
1168
1169 2021-03-19: olly
1170 #1527 [PHP] Improve PHP object creation in directorin case.
1171 Reportedly the code we were using in this case gave segfaults in
1172 PHP 7.2 and later - we've been unable to reproduce these, but the
1173 new approach is also simpler and should be bit faster too.
1174
1175 2021-03-18: olly
1176 #1655 [PHP] Fix char* typecheck typemap to accept PHP Null like the
1177 corresponding in typemap does.
1178
1179 2021-03-18: olly
1180 #1900, #1905 [PHP] Fix wrapping of overloaded directed methods with
1181 non-void return.
1182
1183 2021-03-11: murillo128
1184 #1498 [Javascript] Support type conversion.
1185
1186 2021-03-06: nshmyrev
1187 #872 [Javascript] Various typemap issues in arrays_javascript.i fixed.
1188
1189 2021-03-03: vaughamhong
1190 #577 [Javascript] Implemented SetModule/GetModule for JSC to allow type sharing
1191 across modules.
1192
1193 2021-03-01: xantares, Oliver Buchtala, geographika
1194 #1040 Add support for building SWIG with CMake. See documentation in Windows.html.
1195
1196 2021-03-01: vadz
1197 #1952 Fix incorrect warning "Unknown Doxygen command: ."
1198
1199 2021-02-28: p2k
1200 #969 [Javascript] v8/node - prevent crash calling a constructor without new keyword.
1201
1202 2021-02-28: alecmev
1203 #405 #1121 [Javascript] Fix OUTPUT typemaps on methods that don't return void.
1204 The output value is appended to the return value.
1205
1206 2021-02-26: murillo128, wsfulton
1207 #1269 [Javascript] Fix handling of large positive unsigned long and
1208 unsigned long long values.
1209
1210 2021-02-24: tomleavy, yegorich, tungntpham
1211 #1746 [Javascript] Add support for Node v12, v14 and v16.
1212 SWIG support for Node is now for v6 and later only.
1213
1214 2020-02-09: ZackerySpytz
1215 #1872 Fix typos in attribute2ref macros.
1216
1217 2020-10-10: wsfulton
1218 [Javascript] Fix so that ccomplex.i interface to file can be used.
1219
1220 2020-10-10: wsfulton
1221 #252 complex can now be used as a C identifier and doesn't give a syntax error.
1222
1223 2020-10-10: lpsinger
1224 #1770 Correct C complex support.
1225 _Complex is now parsed as a keyword rather than complex as per the C99 standard.
1226 The complex macro is available in the ccomplex.i library file along with other
1227 complex number handling provided by the complex.h header.
1228
1229 2020-10-07: ZackerySpytz
1230 [Python] #1812 Fix the error handling for the PyObject_GetBuffer() calls in
1231 pybuffer.i.
1232
1233 2020-10-07: treitmayr
1234 #1824 Add missing space in director method declaration returning
1235 const pointer.
1236
1237 2020-10-07: adelva1984
1238 #1859 Remove all (two) exceptions from SWIG executable.
1239
1240 2020-09-25: wsfulton
1241 [C#, Java] #1874 Add ability to change the modifiers for the interface
1242 generated when using the %interface macros.
1243
1244 For C# use the 'csinterfacemodifiers' typemap.
1245 For Java use the 'javainterfacemodifiers' typemap.
1246
1247 For example:
1248
1249 %typemap(csinterfacemodifiers) X "internal interface"
1250
1251 2020-09-24: geefr
1252 [C#] #1868 Fix wchar_t* csvarout typemap for member variable wrappers.
1253
1254 2020-08-28: wsfulton
1255 [Java] #1862 Fix crashes in swig_connect_director during director class construction
1256 when using the director class from multiple threads - a race condition initialising
1257 block scope static variables. The fix is guaranteed when using C++11, but most
1258 compilers also fix it when using C++03/C++98.
1259
1260 2020-08-16: wsfulton
1261 [Python] Add missing initializer for member '_heaptypeobject::ht_module' when using
1262 -builtin to complete Python 3.9 support.
1263
1264 2020-08-16: wsfulton
1265 [Python] Remove PyEval_InitThreads() call for Python 3.7 and later as Python calls
1266 it automatically now. This removes a deprecation warning when using Python 3.9.
1267
1268 2020-08-15: wsfulton
1269 [Python] All Python examples and tests are written to be Python 2 and Python 3
1270 compatible, removing the need for 2to3 to run the examples or test-suite.
1271
1272 2020-08-13: wsfulton
1273 [C#] Add support for void *VOID_INT_PTR for member variables.
1274
1275 2020-07-29: chrisburr
1276 #1843 [Python] Compilation error fix in SwigPyBuiltin_SetMetaType when using PyPy.
1277
1278 2020-06-14: ZackerySpytz
1279 #1642 #1809 Fix virtual comparison operators in director classes by removing an
1280 incorrect space in the function name (for example, operator= = is now operator==).
1281
1282 Version 4.0.2 (8 Jun 2020)
1283 ==========================
1284
1285 2020-06-07 vigsterkr
1286 [Ruby] #1717 Nil fix mangling strings
1287
1288 2020-06-07 vadz
1289 #1748 Fix doxygen comments quoting issue
1290
1291 2020-06-07 munoah
1292 #1800 Escape spaces in file paths for dependencies (-M -MM etc)
1293
1294 2020-06-06 andreas-schwab
1295 [Ruby] #1801 Fix encoding on big endian systems when wrapping std::wstring.
1296
1297 2020-05-31 kwwette
1298 [Octave] #1789 error handling improvements and return error code on exit for SWIG wrapped modules.
1299
1300 2020-05-30 msteinbeck
1301 [D] #1593 Replace broken imports when using newer versions of D.
1302
1303 2020-05-29: ZackerySpytz
1304 [Python] #1716 Performance improvements when converting strings when using Python >= 3.3.
1305
1306 2020-05-28: ZackerySpytz
1307 #1776 Quite dramatically decrease run times when generating very large interface files by changing
1308 some internal memory pool sizes.
1309
1310 2020-05-28: mcfarljm
1311 #1788 Fix handling of Doxygen \endlink command.
1312
1313 2020-05-24: vapier
1314 [Javascript] #1796 Fix pkg-config invocation in configure.
1315
1316 2020-04-30: kwwette
1317 [Octave] Fix exception raising for newer Octave versions
1318 Since (at least) Octave 5.1.0, the Octave error() function now raises a C++ exception,
1319 which if uncaught immediately exits a SWIG wrapper function, bypassing any cleanup code
1320 that may appear after a "fail:" label. This patch adds a "try { ... } catch(...) { }"
1321 block around the contents of SWIG wrapper functions to first execute the cleanup code
1322 before rethrowing any exception raised. It is backward compatible with earlier versions
1323 of Octave where error() does not raise an exception, which will still branch to the
1324 "fail:" block to execute cleanup code if an error is encountered.
1325
1326 Note that the new "try { ... } catch(...) { }" block will localise any local variables
1327 used in typemaps that were NOT declared through SWIG's %typemap(...) syntax, so it's
1328 possible this could break existing SWIG wrappers which were implicitly sharing local
1329 variables between typemaps. This can be fixed, however, by declaring local variables
1330 which need to be shared between typemaps through SWIG's %typemap(...) syntax.
1331
1332 2020-02-18: ryannevell
1333 [Lua] #1728 Add support for LUA lightuserdata to SWIG_Lua_ConvertPtr.
1334
1335 2020-02-18: dmach
1336 [Ruby] #1725 Fix gcc -Wcatch-value warnings.
1337
1338 2020-02-14: treitmayr
1339 #1724 Fix wrapping of abstract user-defined conversion operators.
1340
1341 2020-02-13: ddurham2
1342 [Python] #1512 Fix memleak when using STL containers of shared_ptr objects.
1343
1344 2020-02-06: wsfulton
1345 [Python] #1673 #1674 Fix setting 'this' when extending a proxy class with __slots__.
1346
1347 2020-01-31: vadz
1348 [Ruby] #1651 Add std::auto_ptr<> typemaps.
1349
1350 2020-01-31: ZackerySpytz
1351 [Python] #1700 The Python C API functions PyBytes_AsStringAndSize() and
1352 PyString_AsStringAndSize() are now checked for failure.
1353
1354 2020-01-31: vadz
1355 [Python] #1710 Fix crash parsing empty docstrings.
1356
1357 2020-01-30: Alzathar
1358 [R] #910 #914 Fix R memory leak on exception.
1359
1360 2020-01-30: richardbeare
1361 [R] #1511 Fix bug wrapping functions. These were previously incorrectly wrapped as if
1362 they were variables. This happened when 'get' or 'set' was in the name of the function
1363 or method, but sometimes also in some other circumstances. If you were using R
1364 attribute syntax to access these methods, you'll need to switch to calling them as R
1365 methods.
1366
1367 *** POTENTIAL INCOMPATIBILITY ***
1368
1369 2020-01-24: etse-dignitas, wsfulton
1370 [C#, D, Java] #1533 Fix upcasting for shared_ptr's of templated types.
1371
1372 2020-01-16: mcfarljm
1373 #1643 #1654 When using -doxygen, fix segfault when nameless parameters or vararg parameters
1374 are used.
1375
1376 2020-01-16: mcfarljm
1377 #1632 #1659 Fix newline handling for doxygen "///" comments.
1378
1379 2020-01-14: mcfarljm
1380 #1647 #1656 Fix crash handling empty doxygen comments.
1381
1382 2020-01-14: mcfarljm
1383 #1608 Improve doxygen support.
1384 - Add support for \param[] commands such as: \param[in].
1385 - Optional arguments are marked as 'optional' in pydoc.
1386 - Improve support for \code commands so that other languages are supported as code blocks.
1387 Support added for java, c and py. For example Python: \code{.py} ... \endcode
1388 - Fix doxygen handling of \em and \p tags for Python.
1389
1390 2020-01-13: wsfulton
1391 [Python] #1595 Python -builtin constructors silently ignored keyword arguments.
1392 Instead of silently ignoring them, now a "TypeError: f() takes no keyword arguments"
1393 exception is thrown if keyword arguments are used. Hence constructors and normal methods/
1394 functions behave in the same way. Note, -keyword should be used with -builtin to obtain
1395 keyword argument support.
1396
1397 2020-01-05: jschueller shadchin
1398 [Python] #1670 #1696 Add missing field initializers introduced in python 3.8:
1399 tp_vectorcall and tp_print.
1400
1401 2020-01-05: friedrichatgc
1402 [Octave] #1688 Change swig_this() to use size_t instead of long for compatibility
1403 with Windows 64 bit.
1404
1405 2020-01-05: treitmayr
1406 [Ruby] #1692 #1689 Add support for Ruby 2.7
1407
1408 2019-12-30: treitmayr
1409 [Ruby] #1653 #1668 Fix code generated when using -globalmodule option.
1410
1411 2019-12-29: ZackerySpytz
1412 [OCaml] #1686 Fix compilation errors with OCaml 4.09.0.
1413
1414 2019-12-10: wsfulton
1415 #1679 Fix parsing of C++11 identifiers with special meaning (final and override) when
1416 they are used as part of the scope name of an identifier, such as a namespace name.
1417
1418 2019-11-26: wsfulton
1419 [C#] #1628 'out' or 'ref' used in a cstype typemap was not always stripped out in parts
1420 of director code generation.
1421
1422 2019-11-01: wsfulton
1423 [Python] #1595 Fix bug in support for keyword arguments (kwargs feature or -keyword)
1424 when using -builtin. The fix is in the argument error checking when wrapping zero
1425 argument constructors only.
1426
1427 Version 4.0.1 (21 Aug 2019)
1428 ===========================
1429
1430 2019-08-20: TekuConcept
1431 [Javascript] #1535 Add %native support to Javascript.
1432
1433 2019-08-20: bkotzz
1434 [Java] #1616 Add SWIG_JavaIllegalStateException to support throwing
1435 java.lang.IllegalStateException from JNI code.
1436
1437 2019-08-19: sjml
1438 [Lua] #1596 tostring output changes to show the underlying C/C++ pointer.
1439
1440 2019-08-08: rokups
1441 [C#, Java] #1601 Fix invalid code generated for "%constant enum EnumType.
1442
1443 2019-08-07: wsfulton
1444 [Python] Fix method overloading of methods that take STL containers of different
1445 types. The following usage (using std::vector) would fail when using -builtin:
1446
1447 %include <std_string.i>
1448 %include <std_vector.i>
1449
1450 %inline %{
1451 struct X {};
1452 %}
1453
1454 %template(VectorX) std::vector<X>;
1455 %template(VectorInt) std::vector<int>;
1456
1457 %inline %{
1458 using namespace std;
1459 string VectorOverload(vector<X> v);
1460 string VectorOverload(vector<int> v);
1461 %}
1462
1463 The following would incorrectly fail:
1464
1465 s = VectorOverload([1, 2, 3])
1466
1467 With:
1468
1469 Traceback (most recent call last):
1470 File "runme3.py", line 20, in <module>
1471 ret = VectorOverload([1, 2, 3])
1472 TypeError: Wrong number or type of arguments for overloaded function 'VectorOverload'.
1473 Possible C/C++ prototypes are:
1474 VectorOverload(std::vector< Number,std::allocator< Number > >)
1475 VectorOverload(std::vector< int,std::allocator< int > >)
1476
1477 The problem was due to some error handling that was not cleared during typechecking.
1478 In this case an error was not cleared when the elements in the list failed the
1479 typecheck for converting to X. Only occurs in Python 3+.
1480
1481 In some combinations of overloaded methods, the following type of error message would
1482 occur:
1483
1484 RuntimeError: in sequence element 0
1485
1486 The above exception was the direct cause of the following exception:
1487
1488 Traceback (most recent call last):
1489 File "runme3.py", line 23, in <module>
1490 check(VectorOverload(v), "vector<X>")
1491 SystemError: <built-in function VectorOverload> returned a result with an error set
1492
1493 2019-08-01: wsfulton
1494 #1602 Fix regression in 4.0.0 where a template function containing a parameter
1495 with the same name as the function name led to the parameter name used in the
1496 target language being incorrectly modified.
1497
1498 2019-07-29: wsfulton
1499 Remove all generated files on error. Previously generated files were not removed,
1500 potentially breaking Makefiles using file dependencies, especially when -Werror
1501 (warnings as errors) was used.
1502
1503 2019-07-23: smithx
1504 [C#] #1530 #1532 Fix marshalling of std::wstring to C#.
1505
1506 2019-07-18: gicmo
1507 [Python] #1587 Python 3.8 support - remove use of deprecated PyObject_GC_UnTrack.
1508
1509 2019-07-18: cher-nov
1510 [Python] #1573 Generated Python code uses consistent string quoting style - double
1511 quotes.
1512
1513 2019-07-16: geefr
1514 [C#] #616 #1576 Fix C# bool INPUT[], bool OUTPUT[], bool INOUT[] typemaps to marshall
1515 as 1-byte.
1516
1517 2019-07-12: vadz
1518 [C#, Java] #1568 #1583 Fix std::set<> typemaps for primitive types.
1519
1520 2019-07-12: vadz
1521 #1566 #1584 Regression in 4.0.0 - fix missing value for first item of enums with
1522 trailing comma.
1523
1524 2019-07-11: mcfarljm
1525 #1548 #1578 Fix segfault in Doxygen parser parsing empty lines in some commands like
1526 \code.
1527
1528 2019-07-09: IsaacPascual
1529 [C#, Java] #1570 Fix name of generated C#/Java classes for %interface macros
1530 in swiginterface.i when wrapping nested C++ classes.
1531
1532 2019-07-05: wsfulton
1533 [Python] #1547 Whitespace fixes in Doxygen translated comments into pydoc comments
1534 for Sphinx compatibility.
1535
1536 2019-06-28: wsfulton
1537 [MzScheme, OCaml] #1559 $arg and $input were incorrectly substituted in the
1538 argout typemap when two or more arguments were present.
1539
1540 2019-06-24: wsfulton
1541 [Python, Ruby] #1538 Remove the UnknownExceptionHandler class in order to be
1542 C++17 compliant as it uses std::unexpected_handler which was removed in C++17.
1543 This class was intended for director exception handling but was never used by
1544 SWIG and was never documented.
1545
1546 *** POTENTIAL INCOMPATIBILITY ***
1547
1548 2019-06-06: bkotzz
1549 [Java] #1552 Improve performance in Java std::vector constructor wrapper that takes
1550 a native Java array as input.
1551
1552 2019-06-03: olly
1553 [Python] Fix regression in implicit_conv handling of tuples,
1554 introduced in SWIG 4.0.0. Fixes #1553, reported by Alexandre
1555 Duret-Lutz.
1556
1557 2019-05-24: wsfulton
1558 [Octave] Fix detection of Octave on MacOS.
1559
1560 2019-05-24: opoplawski
1561 [Octave] #1522 Adapt OCTAVE_LDFLAGS for Octave 5.1.
1562
1563 2019-05-22: ferdynator
1564 [PHP] #1528 Don't add a closing '?>' PHP tag to generated files.
1565 PSR-2 says it MUST be omitted for files containing only PHP.
1566
1567 Version 4.0.0 (27 Apr 2019)
1568 ===========================
1569
1570 2019-04-24: vadz
1571 #1517 Fix crash if "@return" Doxygen tag was used on a node without any return type.
1572
1573 2019-04-24: vadz
1574 #1515 Fix parsing of enums with trailing comma when using -doxygen.
1575
1576 2019-04-19: ianlancetaylor
1577 [Go] #1055 When generating Go code, make -cgo the default. Add new -no-cgo option
1578 to disable the default.
1579
1580 2019-04-19: pbecherer
1581 [Tcl] #1508 Fix Visual Studio 2015 and later compilation errors due to snprintf macro
1582 definition.
1583
1584 2019-04-09: wsfulton
1585 [C#] Fix FxCop warning CA2002 in SWIGPendingException - a lock on a reference of
1586 type 'Type'.
1587
1588 2019-03-30: wsfulton
1589 [Java, D] Add the parameters typemap attribute to the javadestruct,
1590 javadestruct_derived, ddispose, ddispose_derived typemaps to mirror enhanced
1591 flexibility in the csdisposing and csdisposing_derived (C#) typemaps. If provided
1592 the contents are generated as the delete/dispose method's parameters declaration.
1593
1594 2019-03-30: wsfulton
1595 [C#] #421 Fix FxCop warning CA1063 by implementing the recommended Dispose methods for
1596 the IDisposable interface. Previously just the Dispose() method was generated.
1597 Now the Dispose() and Dispose(bool disposing) methods are generated.
1598 Changes are required if custom "csfinalize", "csdestruct" or "csdestruct_derived"
1599 typemaps are being used. Details in #421 on Github. SWIG will error out if one of
1600 the "csfinalize, "csdestruct" or "csdestruct_derived" typemaps are found. Example
1601 error message:
1602
1603 foo.h:60: Error: A deprecated csfinalize typemap was found for Foo, please remove
1604 it and replace all csdestruct, csdestruct_derived and csfinalize typemaps by the
1605 csdispose, csdispose_derived, csdisposing and csdisposing_derived typemaps.
1606
1607 *** POTENTIAL INCOMPATIBILITY ***
1608
1609 2019-03-25: Liryna
1610 [C#] #1143 Add std_list.i for std::list support.
1611 The C# std::list<T> wrappers are made to look and feel like a C#
1612 System.Collections.Generic.LinkedList<> collection.
1613 The IEnumerable<> interface is implemented in the proxy class.
1614 The ICollection<> interface can also be implemented to provide enhanced functionality
1615 whenever a C++ operator== is available. This is the case for when T is a
1616 primitive type or a pointer. If T does define an operator==, then use the
1617 SWIG_STD_LIST_ENHANCED macro to obtain this enhanced functionality, for example:
1618
1619 SWIG_STD_LIST_ENHANCED(SomeNamespace::Klass)
1620 %template(ListKlass) std::list<SomeNamespace::Klass>;
1621
1622 2019-03-18: richardbeare
1623 [R] #1328 Non-trivial enums are working now. The enum values are now obtained from
1624 the C/C++ layer. const reference enums and C++11 enum classes are also now working.
1625
1626 2019-03-14: mochizk
1627 [Javascript] #1500 Fix compilation errors due to deprecating V8 API in Node.js.
1628 New V8 API is used if node.js >= v10.12, or if V8 >= v7.0.
1629
1630 2019-03-12: vadz
1631 [C#] #1495 Add std_set.i for std::set support.
1632
1633 2019-03-11: dirteat,opoplawski
1634 [Octave] Fix compilation errors in Octave 5.1.
1635
1636 error: format not a string literal and no format arguments [-Werror=format-security]
1637
1638 2019-02-28: wsfulton
1639 [Java] std::vector improvements for types that do not have a default constructor.
1640
1641 The std::vector wrappers have been changed to work by default for elements that are
1642 not default insertable, i.e. have no default constructor. This has been achieved by
1643 not wrapping:
1644
1645 vector(size_type n);
1646
1647 Previously the above had to be ignored via %ignore.
1648
1649 If the above constructor is still required it can be added back in again via %extend:
1650
1651 %extend std::vector {
1652 vector(size_type count) { return new std::vector< T >(count); }
1653 }
1654
1655 Alternatively, the following wrapped constructor could be used as it provides near-enough
1656 equivalent functionality:
1657
1658 vector(jint count, const value_type& value);
1659
1660 *** POTENTIAL INCOMPATIBILITY ***
1661
1662 2019-02-25: wsfulton
1663 [Python] Fix compile errors wrapping overloaded functions/constructors where a vararg
1664 function is declared after a non-vararg function.
1665
1666 2019-02-23: zphensley42
1667 Use fully qualified name 'java.lang.Object' instead of 'Object' in generated code to
1668 avoid clashes with wrapped C++ classes called 'Object'.
1669
1670 2019-02-23: gtbX
1671 [Java] #1035 Add (const char *STRING, size_t LENGTH) typemaps in addition to the non-const
1672 typemaps (char *STRING, size_t LENGTH) which does not attempt to write back to the const
1673 string.
1674
1675 2019-02-22: tamuratak
1676 [Ruby] #984 Add support for RTypedData introduced in Ruby 1.9.3.
1677
1678 2019-02-22: ZackerySpytz
1679 #1483 Fix compilation failures when a director class has final methods.
1680
1681 2019-02-21: wsfulton
1682 [Java] #1240 Suppress Java 9 deprecation warnings on finalize method.
1683
1684 2019-02-21: ZackerySpytz
1685 #1480 Fix some rejections of valid floating-point literals.
1686
1687 2019-02-19: wsfulton
1688 #1475 Fix regression parsing gcc preprocessor linemarkers in the form:
1689
1690 # linenum filename flags
1691
1692 2019-02-18: jakecobb
1693 [Python] #945 #1234 Elements in std::vector memory access fix.
1694
1695 Accessing an element in a std::vector obtains a reference to the element via an
1696 iterator pointing to the element in the container. If the vector is garbage collected,
1697 the SWIG wrapper containing the pointer to the element becomes invalid. The fix is
1698 to obtain a back-reference to the container by the wrapper to the element in the Python
1699 layer to prevent the garbage collector from destroying the underlying container.
1700
1701 2019-02-17: wsfulton
1702 Fix typemap matching to expand template parameters when the name contains
1703 template parameters. In the %typemap below the type is T and the name is X<T>::make
1704 and the name now expands correctly to X< int >::make
1705
1706 template<typename T> struct X {
1707 %typemap(out) T X<T>::make "..."
1708 T make();
1709 };
1710
1711 %template(Xint) X<int>;
1712
1713 2019-02-16: wsfulton
1714 Fix parser error containing multiple #define statements inside an enum.
1715
1716 The second #define fails to parse:
1717
1718 enum FooEnum {
1719 ENUM1 = 0,
1720 ENUM2 = 1,
1721
1722 #define MACRO_DEF1 "Hello"
1723 #define MACRO_DEF2 "World!"
1724
1725 ENUM3 = 2,
1726 ENUM4 = 3,
1727 };
1728
1729 Bug mentioned at https://sourceforge.net/p/swig/patches/333/
1730
1731 2019-02-14: wsfulton
1732 Add some missing copy constructors into STL containers.
1733
1734 2019-02-14: bkotzz
1735 [Java] #1356 Add STL containers:
1736 std::unordered_map
1737 std::unordered_set
1738 std::set
1739
1740 2019-02-14: bkotzz
1741 [Java] #1356 std::map wrappers have been modified. Now the Java proxy class
1742 extends java.util.AbstractMap. The std::map container looks and feels much like
1743 a java.util.HashMap from Java.
1744
1745 A few members have changed their names. If the old method signatures are needed,
1746 then copy std_map.i from swig-3.0.12 and use that instead. Alternatively,
1747 add the old missing methods to the new methods by using the following %proxycode:
1748
1749 %extend std::map {
1750 %proxycode %{
1751 // Old API
1752 public boolean empty() {
1753 return isEmpty();
1754 }
1755 public void set($typemap(jboxtype, K) key, $typemap(jboxtype, T) x) {
1756 put(key, x);
1757 }
1758 public void del($typemap(jboxtype, K) key) {
1759 remove(key);
1760 }
1761 public boolean has_key($typemap(jboxtype, K) key) {
1762 return containsKey(key);
1763 }
1764 %}
1765 }
1766
1767 *** POTENTIAL INCOMPATIBILITY ***
1768
1769 2019-02-13: ZackerySpytz
1770 #1469 Add support for C++17 hexadecimal floating literals.
1771
1772 2019-02-11: wsfulton
1773 [OCaml] #1437 OCaml has been give the 'Experimental' language status. The examples work
1774 and most of the test-suite is also working, so it is quite close to being a 'Supported' language.
1775
1776 2019-02-10: ZackerySpytz
1777 #1464 Add support for C++14 binary integer literals.
1778
1779 2019-02-10: ZackerySpytz
1780 #1450 Add support for C++11 UCS-2 and UCS-4 character literals. Also, add support for
1781 C++17 UTF-8 character literals.
1782
1783 2019-02-10: wsfulton
1784 [MzScheme] #1437 MzScheme/Racket is now an 'Experimental' language. The examples work
1785 and a large portion of the test-suite is also working.
1786
1787 2019-02-10: wsfulton
1788 [MzScheme] Destructor wrappers were not being generated.
1789
1790 2019-02-10: wsfulton
1791 [MzScheme] Static variable wrappers fixed - $argnum was not expanded.
1792
1793 2019-02-10: sethrj
1794 #1452 Fix %apply for anonymous template instantiations
1795
1796 2019-02-09: olly
1797 [PHP] Fix access to already released memory during PHP module
1798 shutdown, which often didn't cause visible problems, but could
1799 result in segmentation faults, bus errors, etc. Fixes #1170,
1800 reported by Jitka Plesníková.
1801
1802 2019-02-09: olly
1803 [PHP] A renamed constructor is now wrapped as a static method in
1804 PHP.
1805
1806 2019-02-08: olly
1807 [PHP] Don't generate code which references $r when $r hasn't been
1808 defined. This could happen in overloaded methods which returned
1809 void and took at least one const std::string& parameter.
1810
1811 2019-02-08: olly
1812 [PHP] The generated code is now compatible with PHP 7.3, and the
1813 testsuite now runs cleanly with this version too.
1814
1815 2019-02-05: wsfulton
1816 #1437 SWIG now classifies the status of target languages into either 'Experimental' or
1817 'Supported'. This status is provided to indicate the level of maturity to expect when using
1818 a particular target language as not all target languages are fully developed. Details are
1819 in the Introduction.html chapter of the documentation.
1820
1821 2019-02-04: wsfulton
1822 [CFFI] #1447 Common Lisp CFFI has been disabled as a target language in SWIG as part of a
1823 clean up to remove target languages that have been neglected/not functional.
1824
1825 2019-02-04: wsfulton
1826 [Allegrocl] #1447 Allegro Common Lisp has been disabled as a target language in SWIG as part of a
1827 clean up to remove target languages that have been neglected/not functional.
1828
1829 2019-02-04: wsfulton
1830 [Chicken] #1447 CHICKEN has been disabled as a target language in SWIG as part of a
1831 clean up to remove target languages that have been neglected/not functional.
1832
1833 2019-02-04: wsfulton
1834 [CLISP] #1447 GNU Common Lisp has been disabled as a target language in SWIG as part of a
1835 clean up to remove target languages that have been neglected/not functional.
1836
1837 2019-02-04: wsfulton
1838 [S-EXP] #1447 Common Lisp S-Exp has been disabled as a target language in SWIG as part of a
1839 clean up to remove target languages that have been neglected/not functional.
1840
1841 2019-02-04: wsfulton
1842 [UFFI] #1447 Common Lisp UFFI has been disabled as a target language in SWIG as part of a
1843 clean up to remove target languages that have been neglected/not functional.
1844
1845 2019-02-04: wsfulton
1846 [Pike] #1447 Pike has been disabled as a target language in SWIG as part of a
1847 clean up to remove target languages that have been neglected/not functional.
1848
1849 2019-02-04: wsfulton
1850 [Modula3] #1447 Modula3 has been disabled as a target language in SWIG as part of a
1851 clean up to remove target languages that have been neglected/not functional.
1852
1853 2019-02-02: ahnolds
1854 [Python] Documentation enhancements for Python:
1855
1856 #728 Fixed the handling of autodoc when using -fastproxy.
1857
1858 #1367 Added documentation to wrapped member variables using the
1859 property(... doc="...") construct.
1860
1861 Only show a single documentation entry for functions with default arguments when
1862 using autodoc.
1863
1864 Fixed a bug where a cached doxygen docstring could be deleted while still in use,
1865 causing swig to segfault.
1866
1867 2019-01-31: olly
1868 SWIG now requires a target language to be specified instead of
1869 defaulting to wrapping for Tcl. Specifying swig --help without
1870 a target language now just shows the generic help. The -nolang
1871 option has been removed.
1872
1873 2019-01-28: ZackerySpytz
1874 [OCaml] #1429 Remove support for OCaml versions < 3.12.0.
1875
1876 *** POTENTIAL INCOMPATIBILITY ***
1877
1878 2019-01-22: vadz
1879 [Ruby, Octave] #1424 Improve autodoc parameter naming.
1880
1881 2019-01-22: vadz
1882 [Python] #1271 #1423 Always include default parameter values in autodoc strings.
1883
1884 2019-01-19: vadz
1885 #1272, #1421 When a function's parameter is a keyword, the name of the paramater is
1886 no longer simply changed to argN, where N is the argument number. Instead the
1887 parameter name is changed to the renaming rules for keywords that normally apply to
1888 symbols such as classes/functions etc. Note that unlike other symbol renaming,
1889 parameter renaming does not issue a warning when the parameter is renamed. This
1890 change only affects languages where the parameter names are actually used, for example,
1891 Java function parameter lists in the proxy class or Python documentation comments.
1892
1893 2019-01-18: wsfulton
1894 #1420 Fix gdb debugger functions 'swigprint' and 'locswigprint' from swig.gdb to
1895 work with newer versions of gdb-8. Fixes errors when debugging SWIG source with gdb:
1896
1897 (gdb) swigprint n
1898 Undefined command: "Printf". Try "help".
1899
1900 2019-01-16: wsfulton
1901 Python static method wrapper changes
1902
1903 - Static method wrappers were using the 'fastproxy' approach by default.
1904 This is inconsistent with instance method wrappers. The fastproxy approach
1905 is now turned off by default to be consistent with instance methods.
1906 Static method wrappers can now also be controlled using the -fastproxy and
1907 -olddefs options.
1908
1909 Example:
1910
1911 struct Klass {
1912 static int statmethod(int a = 2);
1913 };
1914
1915 generates by default:
1916
1917 class Klass(object):
1918 ...
1919 @staticmethod
1920 def statmethod(a=2):
1921 return _example.Klass_statmethod(a)
1922
1923 instead of the following (which can be restored by using -fastproxy):
1924
1925 class Klass(object):
1926 ...
1927 statmethod = staticmethod(_example.Klass_statmethod)
1928
1929 - Modernise wrappers for static methods to use decorator syntax - @staticmethod.
1930
1931 - Add missing runtime test for static class methods and using the actual class method.
1932
1933 2019-01-12: ZackerySpytz
1934 [OCaml] #1403 #1194 Fix compilation problems for OCaml >= 4.03.0 due to OCaml using
1935 int64_t instead of int64.
1936
1937 2019-01-11: ZackerySpytz
1938 [OCaml] #1400 Fix the getters and setters of non-static member variables.
1939
1940 2019-01-07: wsfulton
1941 #358 Add VOID to windows.i
1942
1943 2019-01-05: wsfulton
1944 #948 #1019 #1273 Fix for C++11 raw strings where the delimiters were mistakenly left
1945 in the string contents in situations where the string was copied into generated code.
1946 For example, %constant, the "docstring" feature and for C#/Java/D constants turned on
1947 with %javaconst/%csconst/%dmanifestconst.
1948
1949 2019-01-05: wsfulton
1950 [Ruby] #538. Fix Ruby support for %feature("docstring").
1951
1952 2019-01-03: wsfulton
1953 #1202 Fix overloading of non-pointer class types in scripting languages when overloaded
1954 with a pointer and a NULL scripting language equivalent is used, eg None in Python.
1955
1956 The implementation changes the SWIGTYPE, SWIGTYPE& and SWIGTYPE&& typecheck typemaps to
1957 prevent accepting a conversion to a NULL pointer.
1958
1959 2019-01-03: ZackerySpytz
1960 [OCaml] #1386 Fix the OCaml examples and test suite for out-of-source builds.
1961
1962 2019-01-01: wsfulton
1963 [Python] #639 remove duplicate proxy method definitions for global function wrappers.
1964
1965 Global functions previously generated two definitions, eg:
1966
1967 def foo():
1968 return _example.foo()
1969 foo = _example.foo
1970
1971 The first definition is replaced by the second definition and so the second definition
1972 is the one used when the method is actually called. Now just the first definition is
1973 generated by default and if the -fastproxy command line option is used, just the second
1974 definition is generated. The second definition is faster as it avoids the proxy Python
1975 method as it calls the low-level C wrapper directly. Using both -fastproxy and -olddefs
1976 command line options will restore the previously generated code as it will generate both
1977 method definitions.
1978
1979 With this change, the wrappers for global C/C++ functions and C++ class methods now work
1980 in the same way wrt to generating just a proxy method by default and control via
1981 -fastproxy/-olddefs options.
1982
1983 2018-12-20: hasinoff,wsfulton
1984 [Java] #1334 Set Java thread name to native thread name when using directors.
1985
1986 Default is to use name "Thread-XXX" and is still works like this by default. However,
1987 adding the following will turn on the thread name setting (works for more recent
1988 versions of Linux and MacOS):
1989
1990 %begin %{
1991 #define SWIG_JAVA_USE_THREAD_NAME
1992 %}
1993
1994 2018-12-20: chlandsi
1995 [Python] #1357. Fix overriding __new__ in Python 3.6.
1996
1997 Fixes SystemError: Objects/tupleobject.c:81: bad argument to internal function"
1998
1999 2018-12-16: wsfulton
2000 [Python] #848 #1343 The module import logic has changed to stop obfuscating real ImportError
2001 problems. Only one import of the low-level C/C++ module from the pure Python module is
2002 attempted now. Previously a second import of the low-level C/C++ module was attempted
2003 after an ImportError occurred and was done to support 'split modules'. A 'split module' is
2004 a configuration where the pure Python module is a module within a Python package and the
2005 low-level C/C++ module is a global Python module. Now a 'split module' configuration is
2006 no longer supported by default. This configuration can be supported with a simple
2007 customization, such as:
2008
2009 %module(package="mypackage", moduleimport="import $module") foo
2010
2011 or if using -builtin:
2012
2013 %module(package="mypackage", moduleimport="from $module import *") foo
2014
2015 instead of
2016
2017 %module(package="mypackage") foo
2018
2019 See the updated Python chapter titled "Location of modules" in the documentation.
2020
2021 2018-12-11: tlby
2022 [Perl] #1374 repair EXTEND() handling in typemaps
2023
2024 2018-12-06: vadz
2025 #1359 #1364 Add missing nested class destructor wrapper when the nested class is
2026 inside a template. Removes associated bogus 'Illegal destructor name' warning. Only
2027 occurred when the nested class' destructor is explicitly specified.
2028
2029 2018-12-04: adr26
2030 [Python] #1368 #1369 Access Violation in tp_print caused by mismatched Python/extension
2031 CRT usage
2032
2033 Remove all use of tp_print, as this API uses a FILE*, which can be
2034 mismatched when modules are built with different C libraries from
2035 the main python executable.
2036
2037 This change also brings consistent output between Python 2 and 3 for the 'cvar' SWIG
2038 object (that contains the global variables) and SWIG packed objects (such as callback
2039 constants).
2040
2041 2018-12-04: wsfulton
2042 [Python] #1282 Fix running 'python -m' when using 'swig -builtin'
2043
2044 Similar to the earlier PEP 366 conforming fix for non-builtin.
2045
2046 2018-11-29: adr26
2047 [Python] #1360 Leak of SWIG var link object
2048
2049 Fix reference counting on _SWIG_globals to allow var link to be freed on module unload.
2050
2051 2018-11-28: wsfulton
2052 [Python] When using -builtin, the two step C-extension module import is now
2053 one step and the wrapped API is only available once and not in an underlying
2054 module attribute like it is without -builtin. To understand this, consider a
2055 module named 'example' (using: %module example). The C-extension is compiled into
2056 a Python module called '_example' and a pure Python module provides the actual
2057 API from the module called 'example'. It was previously possible to additionally
2058 access the API from the module attribute 'example._example'. The latter was an
2059 implementation detail and is no longer available. It shouldn't have been used, but
2060 if necessary it can be resurrected using the moduleimport attribute described in the
2061 Python chapter of the documentation. If both modules are provided in a Python
2062 package, try:
2063
2064 %module(moduleimport="from . import _example\nfrom ._example import *") example
2065 or more generically:
2066 %module(moduleimport="from . import $module\nfrom .$module import *") example
2067
2068 and if both are provided as global modules, try:
2069
2070 %module(moduleimport="import _example\nfrom _example import *") example
2071 or more generically:
2072 %module(moduleimport="import $module\nfrom $module import *") example
2073
2074 The module import code shown will appear in the example.py file.
2075
2076 2018-11-24: vadz
2077 #1358 Fix handling of abstract base classes nested inside templates
2078
2079 Correct detecting of whether a derived class method overrides a pure virtual
2080 base class method when both classes are nested inside a template class: this
2081 notably didn't work correctly for methods taking parameters of the base class
2082 type.
2083
2084 2018-11-22: rupertnash
2085 [Python] #1282 Make generated module runnable via python -m (PEP 366 conforming)
2086
2087 Previously any SWIG generated modules in a package would fail with an ImportError
2088 when using 'python -m' for example 'python -m mypkg.mymodule'.
2089
2090 This fix also allows the SWIG generated module to be placed into a directory and
2091 then renamed __init__.py to convert the module into a package again. This ability
2092 stopped working in swig-3.0.9. However, only Python 2.7 or 3.3 and later work. If
2093 Python 3.2 support is needed, use moduleimport in %module to customise the import
2094 code.
2095
2096 2018-11-13: wsfulton
2097 #1340 Remove -cppcast and -nocppcast command line options (this was an option
2098 available to the scripting language targets).
2099
2100 The -cppcast option is still turned on by default. The -nocppcast option
2101 to turn off the use of c++ casts (const_cast, static_cast etc) has been
2102 removed. However, defining SWIG_NO_CPLUSPLUS_CAST will still generate C casts
2103 instead of C++ casts for C++ wrappers.
2104
2105 *** POTENTIAL INCOMPATIBILITY ***
2106
2107 2018-11-13: wsfulton
2108 [Python] #1340 Remove -outputtuple and -nooutputtuple command line options.
2109
2110 Both the command line and %module options of the same name have been
2111 removed. These were undocumented. The -outputtuple option returned a
2112 Python tuple instead of a list, mostly typically in the OUTPUT
2113 typemap implementations.
2114
2115 It unclear why a tuple instead of a list return type is needed and
2116 hence this option has been removed as part of the simplification of
2117 the SWIG Python command line options for SWIG 4.
2118
2119 2018-11-13: wsfulton
2120 [Python] #1340 Remove -noproxyimport command line option.
2121
2122 This option turned off the insertion of Python import statements
2123 derived from a %import directive. For example given:
2124
2125 %module module_b
2126 %import "module_a.i"
2127
2128 then module_b.py will contain:
2129
2130 import module_a
2131
2132 *** POTENTIAL INCOMPATIBILITY ***
2133
2134 2018-10-29: AlexanderGabriel
2135 [PHP] The following PHP7 reserved keywords are now only renamed by
2136 SWIG when used as function names in the API being wrapper:
2137 __halt_compiler array die echo empty eval exit include include_once
2138 isset list print require require_once return unset
2139
2140 2018-10-22: olly,wsfulton
2141 [Python] #1261 #1340 Turn on many optimisation options by default and rationalise the
2142 number of command line options.
2143
2144 There were an unnecessary number of command line options and many of these have now
2145 been removed in a drive for simplification. Some were needed to support older versions
2146 of Python (2.6 and earlier).
2147
2148 Many of the options could be turned on individually and when using -O. Previously -O
2149 resulted in turning on a set of options:
2150
2151 -modern -fastdispatch -nosafecstrings -fvirtual -noproxydel
2152 -fastproxy -fastinit -fastunpack -fastquery -modernargs -nobuildnone
2153
2154 Now -O results in turning on this reduced set:
2155
2156 -fastdispatch -fastproxy -fvirtual
2157
2158 The following options are now on by default, a deprecated warning is displayed if they
2159 are used:
2160 -fastinit Class initialisation code done in C/C++ rather than in Python code.
2161 -fastquery Python dictionary used for lookup of types.
2162 -fastunpack Faster unpacking of function arguments in C/C++ wrappers.
2163 -modern Use Python 2.3 features such as object and property.
2164 -modernargs Use Python 2.3 C APIs for unpacking arguments in tuples.
2165 -noproxydel Stop generating a proxy __del__ method for backwards compatiblity.
2166 -safecstrings No discernable difference
2167
2168 The following options have been removed altogether:
2169 -aliasobj0
2170 -buildnone
2171 -classptr
2172 -new_repr
2173 -newrepr
2174 -noaliasobj0
2175 -nobuildnone
2176 -nocastmode
2177 -nodirvtable
2178 -noextranative
2179 -nofastinit
2180 -nofastproxy
2181 -nofastquery
2182 -nomodern
2183 -nomodernargs
2184 -nooutputtuple
2185 -nosafecstrings
2186 -old_repr
2187 -oldrepr
2188 -proxydel
2189
2190 -new_vwm is no longer supported. Use the -newvwm alias instead.
2191
2192 *** POTENTIAL INCOMPATIBILITY ***
2193
2194 2018-10-22: olly
2195 [Python] #1261 Remove command line option no longer needed as Python 2.3 and earlier
2196 are no longer supported:
2197
2198 -classic
2199
2200 2018-10-09: wsfulton
2201 [D, Go, Guile, Lua, Mzscheme, Ocaml, Perl5, Php, Scilab, Tcl]
2202 Allow wrapping of std::map using non-default comparison function.
2203
2204 2018-10-09: vadz
2205 [Java] #1274 Allow wrapping of std::map using non-default comparison function.
2206
2207 2018-10-04: wsfulton
2208 [Python] #1126 Fix C default arguments with -builtin and -fastunpack and -modernargs.
2209 Problem occurred when there is just one (defaulted) parameter in the parameter list.
2210
2211 2018-09-24: wsfulton
2212 [Python] #1319 C++11 hash tables implementation is finished now (including for -builtin):
2213 std::unordered_map
2214 std::unordered_set
2215 std::unordered_multimap
2216 std::unordered_multiset
2217
2218 2018-09-21: wsfulton
2219 [Python] Fix when using -builtin and wrapping std::map, std::set, std::unordered_map or
2220 std::unordered_set to ensure __contains__ is called. This is a wrapper for the STL
2221 container's find method. Without it, Python will do its own slower sequence search.
2222
2223 2018-09-19: wsfulton
2224 [Python] Fix functors (wrapped as __call__) when using -builtin -modern -fastunpack.
2225
2226 2018-09-02: andreas.gaeer,tkrasnukha
2227 [Python] #1321 Fix assert in PyTuple_GET_SIZE in debug interpreter builds of python-3.7
2228 when calling tp_new.
2229
2230 2018-09-01: ChristopherHogan
2231 [Guile] #1288 Fix garbage collection for guile >= 2.0.12.
2232
2233 2018-08-31: wsfulton
2234 [Python] #1319 C++11 hash tables support:
2235 std::unordered_map
2236 std::unordered_set
2237 std::unordered_multimap
2238 std::unordered_multiset
2239 is now compiling and working (sorting using -builtin not fully functional yet though).
2240
2241 2018-08-20: wkalinin
2242 #1305 Fix nested structure symbol tables in C mode to fix member name conflicts
2243 in different structs with the same nested struct member name.
2244
2245 2018-08-18: wsfulton
2246 [Python] #688 Fix makefile recursion when running python test-suite.
2247
2248 2018-08-18: wsfulton
2249 [Python] #1310 Re-implement Python -fastproxy option.
2250
2251 The previous implementation failed with Python 3 and abstract base clases.
2252 The new implementation replaces the Python 2 implementation using
2253 new.instancemethod with the C API PyMethod_New to match the equivalent Python 3
2254 implementation which uses PyInstanceMethod_New.
2255
2256 The new approach runs slightly faster. See #1310.
2257
2258 2018-08-12: gmazzamuto
2259 [Python] #1283 Update pybuffer.i library to use new-style Python buffer C API.
2260
2261 2018-08-12: brianhatwood,wsfulton
2262 [Java] #1303 #1304 Fix crash in directors when using OUTPUT and INOUT typemaps in typemaps.i and
2263 passing NULL pointers in C++ to director method overloaded and implemented in Java.
2264
2265 2018-08-10: wsfulton
2266 [Python] #1293 Improve TypeError message inconsistencies between default and fastdispatch
2267 mode when handling overloaded C++ functions. Previously the error message did not always
2268 display the possible C/C++ prototypes in fastdispatch mode.
2269
2270 2018-08-02: furylynx,jacobwgillespie,p2k
2271 [Javascript] #1290, #968. Add support for NodeJS versions 2-10.
2272
2273 2018-07-31: wsfulton
2274 [Python] #1293 Overloaded C++ function wrappers now raise a TypeError instead
2275 of NotImplementedError when the types passed are incorrect. This change means
2276 there is now consistency with non-overloaded function wrappers which have always
2277 raised TypeError when the incorrect types are passed. The error message remains
2278 the same and is for example now:
2279
2280 TypeError: Wrong number or type of arguments for overloaded function 'f'.
2281 Possible C/C++ prototypes are:
2282 f(int)
2283 f(char const *)
2284
2285 instead of:
2286
2287 NotImplementedError: Wrong number or type of arguments for overloaded function 'f'.
2288 Possible C/C++ prototypes are:
2289 f(int)
2290 f(char const *)
2291
2292 *** POTENTIAL INCOMPATIBILITY ***
2293
2294 2018-06-23: wsfulton
2295 [Python] #718 Fix pythonnondynamic feature for modern classes
2296
2297 Fixes nondynamic mode when an instance variable is set with the same
2298 name as a class variable in a class derived from a SWIG proxy class.
2299 This corner case set an instance variable instead of raising an AttributeError.
2300
2301 Also fix %pythonnondynamic in Python 3 with -modern. The metaclass
2302 containing the implementation was previously not being applied in Python 3.
2303
2304 2018-07-17: petrmitrichev,wsfulton
2305 [Python] #1275 #1279 Initialize function-local statics (singletons) that call Python
2306 code during Python module initialization in order to avoid deadlocks with subsequent
2307 multi-threaded usage.
2308
2309 2018-06-15: wsfulton
2310 [Python] Fix seg fault using Python 2 when passing a Python string, containing
2311 invalid utf-8 content, to a wstring or wchar * parameter. A TypeError is thrown instead, eg:
2312
2313 %include <std_wstring.i>
2314 void instring(const std::wstring& s);
2315
2316 instring(b"h\xe9llooo") # Python
2317
2318 2018-06-15: wsfulton
2319 [Python] Python 3.7 support: Replace use of deprecated PyUnicode_GetSize with
2320 PyUnicode_GetLength to remove deprecated warnings compiling the C/C++ wrappers.
2321
2322 2018-06-12: wsfulton
2323 [Python] Python 3.7 support: The %pythonabc feature in pyabc.i now uses base classes
2324 collections.abc.MutableSequence
2325 collections.abc.MutableMapping
2326 collections.abc.MutableSet
2327 instead of
2328 collections.MutableSequence
2329 collections.MutableMapping
2330 collections.MutableSet
2331 as the latter are deprecated in Python 3.7 and are due to be removed in Python 3.8.
2332 The classes in collections.abc.* are available from Python 3.3 onwards. If you
2333 require support for Python 3.2, then copy the pyabc.i file and modify by removing
2334 the few instances of the .abc sub-module.
2335
2336 *** POTENTIAL INCOMPATIBILITY ***
2337
2338 2018-06-12: olly,wsfulton
2339 [Python] #701 Remove support for Python versions < 2.7 and 3.0 and 3.1.
2340
2341 *** POTENTIAL INCOMPATIBILITY ***
2342
2343 2018-06-11: olly
2344 [Python] Fix new GCC8 warnings in generated code by avoiding casts
2345 between incompatible function types where possible, and by
2346 suppressing the warning when it's due to the design of Python's C
2347 API. Fixes #1259.
2348
2349 2018-06-08: philippkraft
2350 [Python] Stop exposing <CLASS>_swigregister to Python. It's not
2351 useful for user Python code to call this, and it just clutters the
2352 API unnecessarily. Fixes #1225.
2353
2354 2018-06-07: cmfoil, kabbi, Jamie Kirkpatrick, markok314, vadz, wsfulton, Yann Diorcet
2355 #170 Doxygen documentation support added. This allows translation of Doxygen comments
2356 into JavaDoc and PyDoc documentation. It is enabled via the -doxygen command line
2357 option. See the Doxygen.html chapter in the documentation for further information.
2358
2359 2018-06-07: olly
2360 [PHP] We've finally removed support for %pragma(php4) which was
2361 deprecated back in 2008. Use %pragma(php) instead, which has been
2362 supported since at least 2005.
2363
2364 *** POTENTIAL INCOMPATIBILITY ***
2365
2366 2018-06-07: olly
2367 [PHP5] Support for PHP5 has been removed. PHP5 is no longer
2368 actively supported by the PHP developers and security support for
2369 it ends completely at the end of 2018, so it doesn't make sense
2370 to include support for it in the upcoming SWIG 4.0.0 release.
2371
2372 *** POTENTIAL INCOMPATIBILITY ***
2373
2374 2018-06-06: olly
2375 [Lua] Improve configure probes for Lua headers and libs used in testsuite.
2376
2377 2018-05-15: kwwette
2378 [Octave] add support for version 4.4
2379 - Should not introduce any user-visible incompatibilities
2380
2381 2018-05-15: wsfulton
2382 [C#, D, Java] Fix lookup of csconstruct, dconstruct and javaconstruct typemaps.
2383 The C++ namespace was previously ignored when looking up the typemap.
2384
2385 2018-05-15: wsfulton
2386 [Javascript] Fix generated C++ code when using %nspace on namespaces that are more
2387 than two levels deep.
2388
2389 2018-05-14: wsfulton
2390 Issue #1251 Add support for C++17 nested namespace definitions,
2391 for example:
2392 namespace A::B { ... }
2393
2394 2018-05-11: wsfulton
2395 [C#, D, Java] Add support so that the %csmethodmodifiers, %dmethodmodifiers,
2396 %javamethodmodifiers can modify the method modifiers for the destructor wrappers
2397 in the proxy class: dispose, Dispose, delete. With this feature, it is now possible
2398 to make a C# proxy class sealed, eg when wrapping a class X, the virtual method modifiers
2399 can be removed using:
2400
2401 %typemap(csclassmodifiers) X "public sealed class"
2402 %csmethodmodifiers X::~X "public /*virtual*/";
2403
2404 2018-04-18: olly
2405 [Python] Suppress new pycodestyle warning:
2406 E252 missing whitespace around parameter equals
2407
2408 2018-04-07: goatshriek
2409 [Ruby] #1213 Fix ruby %alias directive for global C/C++ functions.
2410
2411 2018-04-03: olly
2412 [Ruby] Fix to pass Qnil instead of NULL to rb_funcall(), which silences GCC
2413 -Wconversion-null warning (on by default with recent GCC).
2414
2415 2018-03-09: wsfulton
2416 [Java] #1184 Fix swigReleaseOwnership() and swigTakeOwnership() regression
2417 for non-director classes. Restores a dynamic_cast which was previously removed.
2418
2419 2018-03-07: llongi
2420 Github PR #1166 - Fix preprocessor handling of macros with commas
2421 in a // comment.
2422
2423 2018-02-18: JPEWdev
2424 Patch #1164 - Add support for a command-line options file, also sometimes
2425 called a response file. This is useful if the command-line options exceed
2426 the system command-line length limit. To use, put the command-line options
2427 into a file, then provide the file name prefixed with @, for example using
2428 a file called args.txt:
2429
2430 swig @args.txt
2431
2432 2018-02-11: wsfulton
2433 [Javascript] #1187 Fix compilation error wrapping std::complex via
2434 std_complex.i.
2435
2436 2018-01-30: smarchetto
2437 [Scilab] add type name argument in SWIG_ptr() function to cast from pointer address to typed pointers
2438
2439 2018-01-16: wsfulton
2440 Expressions following a preprocessor directive must now be separated by whitespace
2441 or non-numeric characters. This syntax change makes the SWIG preprocessor work like
2442 the C preprocessor in this area.
2443
2444 For example, the following code used be accepted as valid syntax:
2445 #if1
2446 #define ABC 123
2447 #endif
2448
2449 Now you get an error:
2450 example.h:1: Error: Unknown SWIG preprocessor directive: if1 (if this is a block of
2451 target language code, delimit it with %{ and %})
2452 example.h:3: Error: Extraneous #endif.
2453
2454 The following is the correct syntax:
2455 #if 1
2456 #define ABC 123
2457 #endif
2458
2459 The following of course also works:
2460 #if(1)
2461 #define ABC 123
2462 #endif
2463
2464 *** POTENTIAL INCOMPATIBILITY ***
2465
2466 2018-01-15: wsfulton
2467 Fix issue #1183. Floating point exception evaluating preprocessor expressions
2468 resulting in division by zero.
2469
2470 2018-01-14: wsfulton
2471 Fix issue #1172. Seg fault parsing invalid exponents in the preprocessor.
2472
2473 2018-01-12: Liryna
2474 [C#] Patch #1128. Add ToArray function to std::vector wrappers.
2475
2476 2018-01-12: wsfulton
2477 [Java] Fix issue #1156. Add missing throws clause for interfaces when using the
2478 %interface family of macros.
2479
2480 2018-01-05: wsfulton
2481 Fix default arguments using expressions containing -> syntax error. Problem reported on
2482 swig-user mailing list.
2483
2484 2017-12-30: wsfulton
2485 [Python] Replace pep8 with pycodestyle for checking the Python code style when
2486 running Python tests.
2487
2488 2017-12-30: davedissian
2489 Fixed a symbol lookup issue when encountering a typedef of a symbol from the tag
2490 namespace to the global namespace when the names are identical, such as 'typedef
2491 struct Foo Foo;'.
2492
2493 2017-12-13: wsfulton
2494 [Perl] add missing support for directorfree typemaps.
2495
2496 2017-12-13: wsfulton
2497 Issue #1167 Fix directorout typemaps which were causing undefined behaviour when
2498 returning pointers by reference.
2499
2500 2017-12-08: olly
2501 [PHP] Use ZEND_MODULE_GLOBALS_ACCESSOR to access globals so the
2502 generated code builds when PHP was built with ZTS enabled.
2503
2504 2017-12-04: wsfulton
2505 [Python] Add missing checks for failures in calls to PyUnicode_AsUTF8String. Previously a
2506 seg fault could occur when passing invalid UTF8 strings (low surrogates), eg passing
2507 u"\udcff" to the C layer (Python 3).
2508
2509 2017-11-24: joequant
2510 [R] Fix #1124 and return R_NilValue for null pointers
2511
2512 2017-11-29: wsfulton
2513 [Java] director exception handling improvements.
2514
2515 When a director method throws an exception and it is caught by DirectorException
2516 and passed back to Java using Swig::DirectorException::throwException, the Java
2517 stack trace now contains the original source line that threw the exception.
2518
2519 Deprecate Swig::DirectorException::raiseJavaException, please replace usage with
2520 Swig::DirectorException::throwException.
2521
2522 *** POTENTIAL INCOMPATIBILITY ***
2523
2524 2017-10-26: wsfulton
2525 Add support for C++11 ref-qualifiers when using directors.
2526
2527 2017-10-26: wsfulton
2528 Fix generated code when using directors and methods returning const ref pointers.
2529
2530 2017-10-26: wsfulton
2531 [C#, D, Java, Octave, R, Scilab] Port director typemaps to these additional languages.
2532 Issue #700.
2533
2534 2017-10-26: radarsat1
2535 [Ruby Python] Patch #1029 - Correct handling of null using directors and shared_ptr.
2536
2537 2017-10-10: joequant
2538 [R] pass enum expressions to R. This will generate
2539 incorrect files when there is an arithmetic expression
2540 in the enum, but this is better than silently generating
2541 incorrect code
2542
2543 2017-10-09: olly
2544 [PHP] Fix incorrect wrapper code generated when there's a
2545 combination of overloading, parameters with a default value
2546 and %newobject. Fixes https://sourceforge.net/p/swig/bugs/1350/
2547
2548 2017-10-09: olly
2549 Remove GCJ support. It isn't in a good state and doesn't seem to
2550 be used, and GCC7 dropped GCJ. Closes
2551 https://sourceforge.net/p/swig/bugs/823/
2552
2553 2017-10-07: olly
2554 Fix preprocessor handling of empty macro arguments to match that of
2555 C/C++ compilers. Fixes issue #1111 and
2556 https://sourceforge.net/p/swig/bugs/826/
2557
2558 2017-10-06: wsfulton
2559 [Python] Issue #1108. Fix platform inconsistency in Python default argument handling.
2560 32 bit and 64 bit compiled versions of SWIG generated different Python files
2561 when default arguments were outside the range of 32 bit signed integers.
2562 The default arguments specified in Python are now only those that are in the
2563 range of a 32 bit signed integer, otherwise the default is obtained from C/C++ code.
2564
2565 2017-10-02: wsfulton
2566 [C#] Fix std::complex types passed by value.
2567
2568 2017-10-02: wsfulton
2569 [Javascript, Python, Ruby] Issue #732 - Missing type information for std::complex
2570 in std_complex.i meant that previously std::complex always had to be fully qualified
2571 in order to be wrapped with the appropriate typemaps.
2572
2573 2017-10-01: joequant
2574 allow R package names with docs
2575 allowing multiple get accessors in R
2576 fix smart-pointer and NAMESPACE support
2577 constructors now returning smart pointers (if class
2578 declared as such)
2579 smart-pointer classes deriving from parent smart-pointers
2580
2581 2017-09-29: wsfulton
2582 Issue #1100 - Allow an instantiated template to have the same name in the target
2583 language as the C++ template name, for example, this is now possible:
2584
2585 template<typename T> struct X { ... };
2586 %template(X) X<int>;
2587
2588 2017-09-23: wsfulton
2589 Issue #1098. Fix overloading of shared_ptr with underlying pointer types, eg:
2590
2591 void m(std::shared_ptr<T> p);
2592 void m(T &p);
2593 void m(T *p);
2594
2595 Only the first method is wrapped and the others are ignored/shadowed.
2596 The implementation is done via a new attribute in the 'typecheck' typemap called
2597 'equivalent'. If specified, it must contain the equivalent pointer type for overloading
2598 and can only be used for the special SWIG_TYPECHECK_POINTER precedence level.
2599 The shared_ptr 'typecheck' typemaps have been modified accordingly.
2600 Here is a simplified version:
2601
2602 %typemap(typecheck, precedence=SWIG_TYPECHECK_POINTER, equivalent="T *")
2603 T,
2604 T CONST &,
2605 T CONST *,
2606 T *CONST&,
2607 std::shared_ptr< T >,
2608 std::shared_ptr< T > &,
2609 std::shared_ptr< T > *,
2610 std::shared_ptr< T > *&
2611 { ... }
2612
2613 Overloading with any of these types will result in SWIG ignoring all but the first
2614 overloaded method by default. Without the 'equivalent' attribute, wrapping the overloaded
2615 methods resulted in types being shadowed (scripting languages) or code that did not
2616 compile (statically typed languages).
2617
2618 2017-09-19: futatuki
2619 [Python] #1003 Add --with-2to3=/path/to/2to3 option to configure.
2620
2621 2017-09-18: wsfulton
2622 Fix type promotion wrapping constant expressions of the form:
2623 # define EXPR_MIXED1 (0x80 + 11.1) - 1
2624 This was previously an integral type instead of a floating point type.
2625
2626 2017-09-17: wsfulton
2627 Fix generated code for constant expressions containing wchar_t L literals such as:
2628 # define __WCHAR_MAX (0x7fffffff + L'\0')
2629 # define __WCHAR_MIN (-__WCHAR_MAX - 1)
2630
2631 2017-09-10: mlamarre
2632 [Python] Patch #1083. Define_DEBUG to 1 to do exactly like Visual Studio
2633 /LDd, /MDd or /MTd compiler options.
2634
2635 2017-08-25: wsfulton
2636 Issue #1059. Add support for C++11 ref-qualifiers on non-static member functions.
2637 Members with lvalue ref-qualifiers such as:
2638
2639 struct RQ {
2640 void m1(int x) &;
2641 void m2(int x) const &;
2642 };
2643
2644 are wrapped like any other member function. Member functions with rvalue ref-qualifiers
2645 are ignored by default, such as:
2646
2647 struct RQ {
2648 void m3(int x) &&;
2649 void m4(int x) const &&;
2650 };
2651
2652 example.i:7: Warning 405: Method with rvalue ref-qualifier m3(int) && ignored.
2653 example.i:8: Warning 405: Method with rvalue ref-qualifier m4(int) const && ignored.
2654
2655 These can be unignored and exposed to the target language, see further documentation in
2656 CPlusPlus11.html.
2657
2658 2017-08-16: wsfulton
2659 Fix #1063. Add using declarations to templates into typedef table.
2660
2661 Using declarations to templates were missing in SWIG's internal typedef tables.
2662 This led to a few problems, such as, templates that did not instantiate and generated
2663 C++ code that did not compile as SWIG did not know what scope the template was
2664 in. This happened mostly when a using declaration was used on a template type in a
2665 completely unrelated namespace.
2666
2667 2017-08-16: wsfulton
2668 Fix type lookup in the presence of using directives and using declarations.
2669
2670 Fix some cases of type lookup failure via a combination of both using directives and
2671 using declarations resulting in C++ code that did not compile as the generated type was
2672 not fully qualified for use in the global namespace. Example below:
2673
2674 namespace Space5 {
2675 namespace SubSpace5 {
2676 namespace SubSubSpace5 {
2677 struct F {};
2678 }
2679 }
2680 using namespace SubSpace5;
2681 using SubSubSpace5::F;
2682 void func(SubSubSpace5::F f);
2683 }
2684
2685 2017-08-16: wsfulton
2686 Issue #1051. %template scope enforcement and class definition fixes.
2687
2688 The scoping rules around %template have been specified and enforced.
2689 The %template directive for a class template is the equivalent to an
2690 explicit instantiation of a C++ class template. The scope for a valid
2691 %template instantiation is now the same as the scope required for a
2692 valid explicit instantiation of a C++ template. A definition of the
2693 template for the explicit instantiation must be in scope where the
2694 instantiation is declared and must not be enclosed within a different
2695 namespace.
2696
2697 For example, a few %template and C++ explicit instantiations of std::vector
2698 are shown below:
2699
2700 // valid
2701 namespace std {
2702 %template(vin) vector<int>;
2703 template class vector<int>;
2704 }
2705
2706 // valid
2707 using namespace std;
2708 %template(vin) vector<int>;
2709 template class vector<int>;
2710
2711 // valid
2712 using std::vector;
2713 %template(vin) vector<int>;
2714 template class vector<int>;
2715
2716 // ill-formed
2717 namespace unrelated {
2718 using std::vector;
2719 %template(vin) vector<int>;
2720 template class vector<int>;
2721 }
2722
2723 // ill-formed
2724 namespace unrelated {
2725 using namespace std;
2726 %template(vin) vector<int>;
2727 template class vector<int>;
2728 }
2729
2730 // ill-formed
2731 namespace unrelated {
2732 namespace std {
2733 %template(vin) vector<int>;
2734 template class vector<int>;
2735 }
2736 }
2737
2738 // ill-formed
2739 namespace unrelated {
2740 %template(vin) std::vector<int>;
2741 template class std::vector<int>;
2742 }
2743
2744 When the scope is incorrect, an error now occurs such as:
2745
2746 cpp_template_scope.i:34: Error: 'vector' resolves to 'std::vector' and
2747 was incorrectly instantiated in scope 'unrelated' instead of within scope 'std'.
2748
2749 Previously SWIG accepted the ill-formed examples above but this led to
2750 numerous subtle template scope problems especially in the presence of
2751 using declarations and using directives as well as with %feature and %typemap.
2752
2753 Actually, a valid instantiation is one which conforms to the C++03
2754 standard as C++11 made a change to disallow using declarations and
2755 using directives to find a template.
2756
2757 // valid C++03, ill-formed C++11
2758 using std::vector;
2759 template class vector<int>;
2760
2761 Similar fixes for defining classes using forward class references have
2762 also been put in place. For example:
2763
2764 namespace Space1 {
2765 struct A;
2766 }
2767 namespace Space2 {
2768 struct Space1::A {
2769 void x();
2770 }
2771 }
2772
2773 will now error out with:
2774
2775 cpp_class_definition.i:5: Error: 'Space1::A' resolves to 'Space1::A' and
2776 was incorrectly instantiated in scope 'Space2' instead of within scope 'Space1'.
2777
2778 Previously some symbols would have been instantiated in the wrong scope and led
2779 to lots of scope problems involving SWIG typemaps, features, renames etc.
2780 You will need to correct the scope used in other SWIG directives which do not
2781 support 'using declarations' and 'using directives'. For example, if you previously had:
2782
2783 %rename(Zap) vector<int>::clear;
2784 using namespace std;
2785 %template(VectorInt) vector<int>;
2786
2787 Prior versions of SWIG incorrectly instantiated vector<int> in the global namespace
2788 and so the %rename matched. Now the template is instantiated in the correct namespace,
2789 so is fully qualified as std::vector<int>. The other SWIG directives need correcting as
2790 they do not follow 'using declarations' and 'using directives'. Change it to:
2791
2792 %rename(Zap) std::vector<int>::clear;
2793 using namespace std;
2794 %template(vin) vector<int>;
2795
2796
2797 *** POTENTIAL INCOMPATIBILITY ***
2798
2799 2017-08-16: wsfulton
2800 Fix scope lookup for template parameters containing unary scope operators.
2801
2802 Fixes cases like:
2803
2804 namespace Alloc {
2805 template<typename T> struct Rebind {
2806 typedef int Integer;
2807 };
2808 }
2809 %template(RebindBucket) Alloc::Rebind< Bucket >;
2810 OR
2811 %template(RebindBucket) Alloc::Rebind< ::Bucket >;
2812
2813 Alloc::Rebind< Bucket >::Integer Bucket1();
2814 Alloc::Rebind< ::Bucket >::Integer Bucket2();
2815 Alloc::Rebind<::template TemplateBucket<double>>::Integer Bucket3();
2816
2817 2017-08-16: wsfulton
2818 For templates only, the template parameters are fully resolved when
2819 handling typemaps. Without this, it is too hard to have decent rules
2820 to apply typemaps when parameter types are typedef'd and template
2821 parameters have default values.
2822
2823 Fixes %clear for typedefs in templates, eg:
2824
2825 %typemap("in") XXX<int>::Long "..."
2826 template typename<T> struct XXX {
2827 typedef long Long;
2828 };
2829 %clear XXX<int>::Long;
2830
2831 as the typemap was previously incorrectly stored as a typemap for long
2832 instead of XXX<int>::Long.
2833
2834 2017-08-05: olly
2835 [C++11] Allow static_assert at the top level (and disallow it right
2836 after template<T>). Fixes issue 1031 reported by Artem V L.
2837
2838 2017-08-02: wsfulton
2839 Fix incorrectly shown warning when an empty template instantiation was used on a
2840 class used as a base class and that base class was explicitly ignored with %ignore.
2841 Example of the warning which will no longer appear:
2842
2843 Warning 401: Base class 'Functor< int,int >' has no name as it is an empty
2844 template instantiated with '%template()'. Ignored.
2845
2846 2017-07-17: fflexo
2847 [Java] #674 Add std_list.i to add support for std::list containers. The Java proxy
2848 extends java.util.AbstractSequentialList and makes the C++ std::list container look
2849 and feel much like a java.util.LinkedList from Java.
2850
2851 2017-07-07: wsfulton
2852 [Python] Fix display of documented template types when using the autodoc
2853 feature. For example when wrapping:
2854
2855 %feature("autodoc");
2856 template<typename X> struct T {};
2857 %template(TInteger) T<int>;
2858
2859 the generated documentation contains:
2860 """Proxy of C++ T< int > class."""
2861 instead of:
2862 """Proxy of C++ T<(int)> class."""
2863 and
2864 """__init__(TInteger self) -> TInteger"""
2865 instead of
2866 """__init__(T<(int)> self) -> TInteger"""
2867
2868 2017-06-27: nihaln
2869 [PHP] Update the OUTPUT Typemap to add return statement to the
2870 PHP Wrapper.
2871
2872 2017-06-27: nihaln
2873 [PHP] Update the enum and value examples to use the OO wrappers
2874 rather than the flat functions produced with -noproxy. There's
2875 not been a good reason to use -noproxy for since PHP5 OO wrapping
2876 was fixed back in 2005.
2877
2878 2017-06-23: m7thon
2879 [Python] fix and improve default argument handling:
2880
2881 1. Fix negative octals. Currently not handled correctly by `-py3`
2882 (unusual case, but incorrect).
2883 2. Fix arguments of type "octal + something" (e.g. `0640 | 04`).
2884 Currently drops everything after the first octal. Nasty!
2885 3. Fix bool arguments "0 + something" (e.g. `0 | 1`) are always
2886 "False" (unusual case, but incorrect).
2887 4. Remove special handling of "TRUE" and "FALSE" from
2888 `convertValue` since there's no reason these have to match
2889 "true" and "false".
2890 5. Remove the Python 2 vs. Python 3 distinction based on the
2891 `-py3` flag. Now the same python code is produced for default
2892 arguments for Python 2 and Python 3. For this, octal default
2893 arguments, e.g. 0644, are now wrapped as `int('644', 8)`. This
2894 is required, as Python 2 and Python 3 have incompatible syntax
2895 for octal literals.
2896
2897 Fixes #707
2898
2899 2017-06-21: futatuki
2900 #1004 - Fix ccache-swig executable name to respect configure's --program-prefix and
2901 --program-suffix values if used.
2902
2903 2017-06-21: tamuratak
2904 [Ruby] #911 - Add std::wstring support.
2905
2906 2017-06-19: wsfulton
2907 [Python] Fix handling of rich comparisons when wrapping overloaded operators:
2908
2909 operator< operator<= operator> operator>= operator== operator!=
2910
2911 Previously a TypeError was always thrown if the type was not correct. NotImplemented
2912 is now returned from these wrapped functions if the type being compared with is
2913 not correct. The subsequent behaviour varies between different versions of Python
2914 and the comparison function being used, but is now consistent with normal Python
2915 behaviour. For example, for the first 4 operator overloads above, a TypeError
2916 'unorderable types' is thrown in Python 3, but Python 2 will return True or False.
2917 NotImplemented should be returned when the comparison cannot be done, see PEP 207 and
2918 https://docs.python.org/3/library/constants.html#NotImplemented
2919
2920 Note that the bug was only present when overloaded operators did not also have a
2921 function overload.
2922
2923 Fixes SF bug #1208 (3441262) and SF patch #303.
2924
2925 *** POTENTIAL INCOMPATIBILITY ***
2926
2927 2017-06-17: fabrice102
2928 [Go] Fix Go callback example. Fixes github #600, #955, #1000.
2929
2930 2017-06-16: wsfulton
2931 Make sure warning and error messages are not split up by other processes writing to
2932 stdout at the same time.
2933
2934 2017-06-16: wsfulton
2935 [R] Fix wrapping function pointers containing rvalue and lvalue reference parameters.
2936
2937 2017-06-13: olly
2938 [Perl] Fix testsuite to work without . in @INC - it was removed in
2939 Perl 5.26 for security reasons, and has also been removed from
2940 older versions in some distros. Fixes #997 reported by lfam.
2941
2942 2017-06-03: wsfulton
2943 Fix %import on a file containing a file scope %fragment forced inclusion to not
2944 generate the fragment contents as %import should not result in code being generated.
2945 The behaviour is now the same as importing code insertion blocks.
2946 Wrapping FileC.i in the following example will result in no generated code, whereas
2947 previously "#include <limits.h>" was generated:
2948
2949 // FileA.i
2950 %fragment("<limits.h>", "header") %{
2951 #include <limits.h>
2952 %}
2953
2954 %{
2955 #include <stdio.h>
2956 %}
2957 %fragment("<limits.h>");
2958
2959 // FileC.i
2960 %import "FileA.i"
2961
2962 *** POTENTIAL INCOMPATIBILITY ***
2963
2964 2017-05-26: Volker Diels-Grabsch, vadz
2965 [Java] #842 Extend from java.util.AbstractList<> and implement java.util.RandomAccess for
2966 std::vector wrappers. This notably allows to iterate over wrapped vectors in a natural way.
2967 Note that boxed types are now used in the Java layer when wrapping vector of C primitive
2968 types, for example. This may introduce some subtle incompatibilities due to some
2969 differences in how Java converts boxed types and unboxed types. For example,
2970
2971 int i=0;
2972 double d1 = i; // ok
2973 Double d2 = i; // error: incompatible types: int cannot be converted to Double
2974
2975 This can be a problem when calling the add and set functions. A suggested backwards
2976 compatible workaround is to use something like (shown for std::vector<double>:
2977
2978 #if defined(SWIGJAVA)
2979 // Add in old api that uses non-boxed types
2980 %extend std::vector<double> {
2981 %proxycode %{
2982 public void add(double x) {
2983 add(Double.valueOf(x));
2984 }
2985 public void set(int i, double val) {
2986 set(i, Double.valueOf(val));
2987 }
2988 %}
2989 }
2990 #endif
2991
2992 %include "std_vector.i"
2993 %template(VectorDouble) std::vector<double>;
2994
2995 *** POTENTIAL INCOMPATIBILITY ***
2996
2997 2017-05-30: davidcl
2998 [Scilab] #994 Undefined symbol error when loading in Scilab 6
2999
3000 2017-05-25: asibross
3001 [Java] #370 #417 Missing smart pointer handling in Java director extra methods
3002 swigReleaseOwnership() and swigTakeOwnership().
3003
3004 2017-05-23: wsfulton
3005 [Java] #230 #759 Fix Java shared_ptr and directors for derived classes java compilation
3006 error.
3007
3008 For shared_ptr proxy proxy classes, add a protected method swigSetCMemOwn for modifying
3009 the swigCMemOwn and swigCMemOwnDerived member variables which are used by various other
3010 methods for controlling memory ownership.
3011
3012 2017-05-21: Sghirate
3013 [Java, C#, D] #449 Remove unnecessary use of dynamic_cast in directors to enable
3014 non-RTTI compilation.
3015
3016 2017-05-21: wsfulton
3017 [Python] #993 Fix handling of default -ve unsigned values, such as:
3018 void f(unsigned = -1U);
3019
3020 2017-05-20: jschueller
3021 [Python] #991 Fix E731 PEP8 warning: do not assign a lambda expression
3022
3023 2017-05-16: nihal95
3024 [PHP] Add %pragma version directive to allow the version of the
3025 extension to be set. Patch #970, fixes #360.
3026
3027 2017-05-13: yag00
3028 Patch #975 - Add support for noexcept on director methods.
3029
3030 2017-04-27: redbrain
3031 Issue #974, Patch #976 - Fix preprocessor handling of macros with commas in a comment.
3032
3033 2017-04-25: jleveque
3034 [Lua] #959 - Fix Visual Studio C4244 conversion warnings in Lua wrappers.
3035
3036 2017-04-21: tamuratak
3037 [Ruby] #964 - Add shared_ptr director typemaps.
3038
3039 2017-04-20: wsfulton
3040 [Ruby] #586, #935 Add assert for invalid NULL type parameter when calling SWIG_Ruby_NewPointerObj.
3041
3042 2017-04-20: tamuratak
3043 [Ruby] #930, #937 - Fix containers of std::shared_ptr.
3044 Upcasting, const types (eg vector<shared_ptr<const T>>) and NULL/nullptr support added.
3045
3046 2017-04-12: smarchetto
3047 [Scilab] New parameter targetversion to specify the Scilab target version (5, 6, ..) for code generation
3048 With Scilab 6 target specified, identifier names truncation is disabled (no longer necessary)
3049
3050 2017-03-24: tamuratak
3051 [Ruby] Fix #939 - Wrapping std::vector<bool> fix due to incorrect null checks
3052 on VALUE obj.
3053
3054 2017-03-17: vadz
3055 [C#] #947 Add support for std::complex<T>
3056
3057 2017-03-17: wsfulton
3058 [Go] Fix handling of typedef'd function pointers and typedef'd member function pointers
3059 such as:
3060
3061 typedef int (*FnPtr_td)(int, int);
3062 int do_op(int x, int y, FnPtr_td op);
3063
3064 2017-03-16: wsfulton
3065 Add support for member const function pointers such as:
3066
3067 int fn(short (Funcs::* parm)(bool)) const;
3068
3069 Also fix parsing of references/pointers and qualifiers to member
3070 pointers such as:
3071
3072 int fn(short (Funcs::* const parm)(bool));
3073 int fn(short (Funcs::* & parm)(bool));
3074
3075 2017-03-10: wsfulton
3076 Extend C++11 alternate function syntax parsing to support const and noexcept, such as:
3077
3078 auto sum1(int x, int y) const -> int { return x + y; }
3079 auto sum2(int x, int y) noexcept -> int { return x + y; }
3080
3081 2017-02-29: tamuratak
3082 [Ruby] #917 - Add Enumerable module to all container class wrappers. It was missing
3083 for std::list, std::multiset, std::unordered_multiset and std::unordered_map.
3084
3085 2017-02-27: assambar
3086 [C++11] Extend parser to support throw specifier in combination
3087 with override and/or final.
3088
3089 2017-02-10: tamuratak
3090 [Ruby] #883 - Add support for C++11 hash tables:
3091 std::unordered_map
3092 std::unordered_set
3093 std::unordered_multimap
3094 std::unordered_multiset
3095
3096 2017-02-08: jcsharp
3097 [C#] #887 Improve std::vector<T> wrapper constructors -
3098 Replace constructor taking ICollection with IEnumerable and also add IEnumerable<T>
3099 constructor to avoid the boxing and unboxing overhead of the original constructor,
3100 when the type parameter is a value type.
3101
3102 Version 3.0.12 (27 Jan 2017)
3103 ============================
3104
3105 2017-01-27: wsfulton
3106 [C#] #882 Fix missing filename in error messages when there is a problem
3107 writing out C# files.
3108
3109 2017-01-27: briancaine
3110 [Guile] #744 Fix compilation errors in Guile wrappers - regression
3111 introduced in swig-3.0.11.
3112
3113 2017-01-24: andrey-starodubtsev
3114 [Java] Apply #704 - director typemap improvements.
3115 Memory leak fixes, add support for "directorargout" typemap and
3116 add director support to typemaps.i.
3117
3118 2017-01-24: wsfulton
3119 Enhance %extend to extend a class with template constructors, eg:
3120
3121 struct Foo {
3122 %extend {
3123 template<typename T>
3124 Foo(int a, T b) {
3125 ...
3126 }
3127 }
3128 };
3129 %template(Foo) Foo::Foo<double>;
3130
3131 2017-01-22: wsfulton
3132 Issue #876 Enhance %extend to extend a class with template methods, eg:
3133
3134 struct Foo {
3135 %extend {
3136 template<typename T>
3137 void do_stuff(int a, T b) {
3138 ...
3139 }
3140 }
3141 };
3142 %template(do_stuff_inst) Foo::do_stuff<double>;
3143
3144 Similarly for static template methods.
3145
3146 2017-01-22: kwwette
3147 [Octave] add support for version 4.2
3148 - The Octave API now uses some C++11 features. It is recommended to use
3149 the mkoctfile program supplied by Octave to compile the SWIG-generated
3150 wrapper code, as mkoctfile will ensure the correct C++ compiler/options
3151 are used. Otherwise, the value of `mkoctfile -p CXX` should be parsed
3152 for any -std=* flags which might be present.
3153 - Octave has dropped support for << and >> operators, so SWIG now
3154 ignores them.
3155 - The Octave error() function now raises C++ exceptions to propagate
3156 Octave errors, so %exception directives may need to be modified.
3157 For convenience the SWIG_RETHROW_OCTAVE_EXCEPTIONS macro can be used
3158 to rethrow any Octave exceptions for Octave itself to handle, e.g.:
3159
3160 try {
3161 $action // may call error()
3162 }
3163 SWIG_RETHROW_OCTAVE_EXCEPTIONS // error() exceptions are rethrown
3164 catch(...) {
3165 ... // all other exceptions
3166 }
3167
3168 *** POTENTIAL INCOMPATIBILITY ***
3169
3170 2017-01-16: wkalinin
3171 [C#] Fix #733 regression introduced in swig-3.0.9.
3172 Missing virtual function override in C# layer when using %import.
3173
3174 2017-01-16: fschlimb
3175 Fix #813 template symbol name lookup bug when typedef names are the same but in different
3176 namespaces.
3177
3178 2017-01-15: wsfulton
3179 [C# D Java]
3180 The SWIG library no longer uses the javatype, dtype or cstype typemaps, thereby
3181 completely freeing them up for users to use without having to replicate the library
3182 code that they previously added. The code previously generated by these typemaps
3183 has been replaced by the new %proxycode directive. Their use in the library code
3184 was fairly minimal:
3185
3186 C# cstype: std_array.i std_map.i std_vector.i
3187 D dtype: std_vector.i
3188 Java javatype: arrays_java.i
3189
3190 2017-01-14: wsfulton
3191 The %extend directive can now optionally support one of the 'class', 'struct' or 'union'
3192 keywords before the identifier name, for example:
3193
3194 struct X { ... };
3195 %extend struct X { ... }
3196
3197 Previously this had to specified as:
3198
3199 struct X { ... };
3200 %extend X { ... }
3201
3202 2017-01-13: wsfulton
3203 [C# D Java] Add new %proxycode directive which is a macro for %insert("proxycode").
3204 This is a way of adding pure C#/D/Java code into the appropriate proxy class, eg:
3205
3206 %extend Proxy2 {
3207 %proxycode %{
3208 public int proxycode2(int i) {
3209 return i+2;
3210 }
3211 %}
3212 }
3213
3214 %inline %{
3215 struct Proxy2 {};
3216 %}
3217
3218 There will then be a pure Java/C#/D method called proxycode2 in the Proxy2 class.
3219
3220 2016-12-31: ajrheading1
3221 Issue #860 - Remove use of std::unary_function and std::binary_function
3222 which is deprecated in C++11.
3223
3224 2016-12-30: olly
3225 [PHP7] Register internal 'swig_runtime_data_type_pointer' constant
3226 as "CONST_PERSISTENT" to avoid segmentation fault on module unload.
3227 Fixes #859 reported by Timotheus Pokorra. Thanks also to Javier Torres
3228 for a minimal reproducer.
3229
3230 Version 3.0.11 (29 Dec 2016)
3231 ============================
3232
3233 2016-12-24: wsfulton
3234 [C#] Add %feature("csdirectordelegatemodifiers") to enable customization
3235 of the delegate access modifiers generated in director classes.
3236 Fixes issue #748.
3237
3238 2016-12-23: wsfulton
3239 [Python] Fix builtin "python:slot" feature failing for tp_hash when using
3240 hashfunc closure with a "Wrong type for hash function" for Python 2.
3241 Issue #843.
3242
3243 2016-12-21: joequamt
3244 Changed generation of functions so that only functions
3245 that end in _set generate accessor functions rather than
3246 looking for "set".
3247 Change generation of operators to not have underscores
3248 to start in R. Users need to provide custom names for these operator overloads.
3249
3250 2016-12-21: olly
3251 Fix isfinite() checks to work with all C++11 compilers.
3252 Fixes issues #615, #788 and #849.
3253
3254 2016-12-20: wsfulton
3255 %namewarn unnecessarily caused keyword warnings for non-instantiated template classes
3256 and duplicate warnings for instantiated template classes when keywords were used.
3257 Issue #845.
3258
3259 2016-12-18: ezralanglois
3260 [Python, Ruby, Octave] Memory leak fix on error in std::pair wrappers.
3261 Issue #851.
3262
3263 2016-12-18: wsfulton
3264 Zero initialize arrays when using %array_class and %array_functions.
3265
3266 2016-12-18: t-ikegami
3267 [Python] Fix #446
3268 Python %array_class of carrays.i failed with -builtin option.
3269
3270 2016-12-16: briancaine
3271 [Guile] Patch #744 Added support for Guile's native pointer functionality
3272
3273 2016-12-01: wsfulton
3274 [Python] Issue #769.
3275 Add optional moduleimport attribute to %module so that the
3276 default module import code can be overridden. See the "Searching for the wrapper module"
3277 documentation in Python.html. Example:
3278
3279 %module(moduleimport="import _foo") foo
3280
3281 $module also expands to the low-level C/C++ module name, so the following is the
3282 same as above
3283
3284 %module(moduleimport="import $module") foo
3285
3286 2016-11-30: olly
3287 [PHP] Add support for PHP7. PHP5's C extension API has changed
3288 substantially so you need to use -php7 to specify you want PHP7
3289 compatible wrappers. The default extension for generated wrappers
3290 is now .cxx (to match SWIG's default for every other language - to
3291 generate foo_wrap.cpp you can run SWIG with -cppext cpp). Fixes
3292 issue #571.
3293
3294 As part of this change, the language subdirectory for PHP5 has
3295 changed from "php" to "php5" - if you are making use of the search
3296 path feature where the language subdirectory of each directory
3297 is also searched, you'll need to update your bindings. A simple
3298 fix which works for older and newer SWIG is to add a symlink:
3299 ln -s php php5
3300
3301 *** POTENTIAL INCOMPATIBILITY ***
3302
3303 2016-11-30: olly
3304 [PHP] Only emit one copy of each distinct arginfo. Previously we
3305 emitted a separate one for every wrapped function, but typically
3306 many functions have the same number of parameters and combinations
3307 of parameters passed by reference or not.
3308
3309 This change significantly reduces both the size of the generated
3310 wrapper, and of the compiled PHP extension module (e.g. by ~6% for
3311 the stripped extension module for Xapian's PHP7 bindings).
3312
3313 2016-11-28: wsfulton
3314 Fix %rename override of wildcard %rename for templates. For example:
3315
3316 %rename(GlobalIntOperator) *::operator bool; // wildcard %rename
3317
3318 %rename(XIntOperator) X::operator bool; // fix now overrides first %rename above
3319 OR
3320 %rename(XIntOperator) X<int>::operator bool; // fix now overrides first %rename above
3321
3322 template<typename T> struct X {
3323 operator bool();
3324 ...
3325 };
3326 %template(Xint) X<int>;
3327
3328 This also fixes %rename override of global %rename for templates. For example:
3329
3330 // Global rename to make all functions start with a lower case letter
3331 %rename("%(firstlowercase)s", %$isfunction ) "";
3332 %rename(woohoo) W::Woo; // fix now overrides above %rename
3333
3334 template<typename T> struct W {
3335 W Woo();
3336 ...
3337 };
3338 %template(Wint) W<int>;
3339
3340 The above also introduces a possibly unexpected change. Many of the STL containers
3341 provided by SWIG use %rename to rename some methods, eg in std::vector, push_back
3342 is renamed to add in Java. Previously this intended rename did not happen when using
3343 using global %rename rules and the method would remain as push_back, but is now
3344 renamed to add. Some more info in issue #856.
3345
3346 *** POTENTIAL INCOMPATIBILITY ***
3347
3348 2016-11-26: m7thon
3349 [Python] Issue #709 - improved wrapping of division operators
3350 'from __future__ import division' now works in Python 2 whether or not the
3351 -py3 flag is used.
3352
3353 2016-11-12: joequant
3354 [R] Issue #697 - fix comma issue with overload methods
3355
3356 2016-11-12: joequant
3357 [R] Issue #555 - R runtime needs stdio.h
3358
3359 2016-11-02: wsfulton
3360 [Python] Issue #816 - fix compilation error when using -extranative and -builtin.
3361
3362 2016-11-02: liorgold
3363 Patch #741 - Add support for C++11 alias templates, see updated CPlusPlus11.html
3364 documentation.
3365
3366 2016-10-30: myd7349
3367 [C#] Patch #740 Add std_array.i for C# for wrapping std::array.
3368
3369 Patch also enhances std::vector<std::wstring> C# wrappers with additional functions
3370 (Contains, IndexOf, LastIndexOf and Remove).
3371
3372 2016-10-30: tobilau
3373 [Java] Fix wrappers for wstring parameters in director methods to cleanup local
3374 ref after director callback has finished.
3375
3376 2016-10-23: wsfulton
3377 [C#] Add missing csdirectorin VOID_INT_PTR and csdirectorout VOID_INT_PTR typemaps.
3378
3379 2016-10-23: jiulongw
3380 Patch #781 - Fix wrapping of C compound expressions containing char constants
3381 in quotes such as:
3382
3383 #define H_SUPPRESS_SCALING_MAGIC (('s'<<24) | ('u'<<16) | ('p'<<8) | 'p')
3384
3385 enum DifferentTypes {
3386 typecharcompound='A'+1,
3387 typecharcompound2='B' << 2
3388 };
3389
3390 2016-10-13: wsfulton
3391 [Python] Issue #808 - fix Python pickling and metaclass for builtin wrappers.
3392
3393 The metaclass (SwigPyObjectType) for SWIG objects was not defined in
3394 a way that let importlib successfully import the Python wrappers.
3395 The pickle module previously failed to pickle objects because it couldn't
3396 determine what module the SWIG wrapped objects were in.
3397
3398 2016-09-29: wsfulton
3399 [Allegrocl, CFFI, GO, Javascript, Ocaml, R, Scilab]
3400 Add missing support for the "ret" typemap in a few target languages.
3401 The documentation also now has info on the "ret" typemap.
3402
3403 2016-09-27: ahmed-usman
3404 [xml] Handle template parameters correctly.
3405
3406 2016-09-27: dontpanic92
3407 [Go] Fix argument names in inherited functions taking more than 8
3408 parameters. Fixes #795.
3409
3410 2016-09-26: smarchetto
3411 [Scilab] mlists that map pointers can be given a custom type name.
3412
3413 2016-09-25: wsfulton
3414 Patch #793 from q-p to expand exception handling to include std::bad_cast
3415 in std_except.i.
3416
3417 2016-09-24: olly
3418 [PHP] Fix code generated for feature("director:except") -
3419 previously the return value of call_user_function() was ignored and
3420 we checked an uninitialised value instead. Fixes #627. Based on
3421 patch from Sergey Seroshtan.
3422
3423 2016-09-22: wsfulton
3424 [Python] More flexible python builtin slots for overloaded C++ function.
3425
3426 The closure names used for builtin slots are mangled with their functype so
3427 that overloaded C++ method names can be used for multiple slots.
3428 For example:
3429
3430 %feature("python:slot", "mp_subscript", functype="binaryfunc") SimpleArray::__getitem__;
3431 %feature("python:slot", "sq_item", functype="ssizeargfunc") SimpleArray::__getitem__(Py_ssize_t n);
3432
3433 will generate closures:
3434
3435 SWIGPY_SSIZEARGFUNC_CLOSURE(_wrap_SimpleArray___getitem__) /* defines _wrap_SimpleArray___getitem___ssizeargfunc_closure */
3436 SWIGPY_BINARYFUNC_CLOSURE(_wrap_SimpleArray___getitem__) /* defines _wrap_SimpleArray___getitem___binaryfunc_closure */
3437
3438 Previously only one name was defined: _wrap_SimpleArray___getitem___closure.
3439 Hence the overloaded __getitem__ method can be used to support both mp_subscript and sq_item slots.
3440
3441 2016-09-17: wsfulton
3442 [Python] Fix iterators for containers of NULL pointers (or Python None) when using
3443 -builtin. Previously iteration would stop at the first element that was NULL.
3444
3445 2016-09-16: olly
3446 [Javascript] Fix SWIG_exception() macro to return from the current
3447 function. Fixes #789, reported by Julien Dutriaux.
3448
3449 2016-09-16: olly
3450 [PHP] Fix SWIG_exception() macro to return from the current function.
3451 Fixes #240, reported by Sergey Seroshtan.
3452
3453 2016-09-12: xypron
3454 [C#] Patch #786 Keyword rename to be CLS compliant by adding an underscore
3455 suffix instead of an underscore prefix to the C symbol name. Please use an explicit
3456 %rename to rename the symbol with a _ prefix if you want the old symbol name.
3457
3458 *** POTENTIAL INCOMPATIBILITY ***
3459
3460 2016-09-09: olly
3461 [Python] Fix import handling for Python 2.6 to work in a frozen
3462 application. Fixes #145, reported by Thomas Kluyver.
3463
3464 2016-09-02: smarchetto
3465 [Scilab] Pointers are mapped to mlist instead of tlist
3466 (mlist better for scilab overloading)
3467
3468 2016-09-02: olly
3469 [PHP] Fix "out" typemap for member function pointers and "in"
3470 typemap for char INPUT[ANY].
3471
3472 2016-09-01: wsfulton
3473 [Python] More efficient Python slicing.
3474 Call reserve for container types that support it to avoid repeated
3475 memory reallocations for new slices or slices that grow in size.
3476
3477 2016-09-01: wsfulton
3478 [Python] #771 - Make builtin types hashable by default.
3479 Default hash is the underlying C/C++ pointer. This matches up with testing for
3480 equivalence (Py_EQ in SwigPyObject_richcompare) which compares the pointers.
3481
3482 2016-08-22: wsfulton
3483 [Python] The following builtin slots can be customized like other slots via the
3484 "python:<x>" and "python:slot" features where <x> is the appropriate slot name:
3485 tp_allocs
3486 tp_bases
3487 tp_basicsize
3488 tp_cache
3489 tp_del
3490 tp_dealloc
3491 tp_flags
3492 tp_frees
3493 tp_getset
3494 tp_is_gc
3495 tp_maxalloc
3496 tp_methods
3497 tp_mro
3498 tp_new
3499 tp_next
3500 tp_prev
3501 tp_richcompare
3502 tp_subclasses
3503 tp_weaklist
3504 was_sq_ass_slice
3505 was_sq_slice
3506
3507 A few documentation improvements for slot customization.
3508
3509 2016-08-09: joequant
3510 [R] Patch #765 Fix extern "C" header includes for C++ code.
3511
3512 2016-08-05: olly
3513 [xml] Fix how the output filename is built to avoid problems when
3514 it contains the embedded strings ".c", ".cpp" or ".cxx".
3515 Fixes #540 reported by djack42.
3516
3517 2016-07-01: wsfulton
3518 Fix corner case of wrapping std::vector of T pointers where a pointer to a pointer of T
3519 also exists in the wrapped code. SF Bug 2359417 (967).
3520
3521 2016-06-26: wkalinin
3522 [Java, C#] Patch #681 Fix seg fault when ignoring nested classes.
3523
3524 2016-06-25: mromberg
3525 [Python] #711 Fix -castmode and conversion of signed and unsigned integer types.
3526 See 2015-12-23 CHANGES entry for details of these improvements when they were
3527 implemented for the default options (ie not using -castmode).
3528
3529 2016-06-25: ahnolds
3530 Patch #730 - Fix %implicitconv for overloaded functions when using
3531 -castmode or -fastdispatch options.
3532
3533 The result is that in all overload cases where there are multiple possibilities
3534 with the same number of arguments, the dispatch function will first check for
3535 exact (aka non implicit) matches, and then subsequently check for implicit
3536 casting matches. This was already happening in the normal dispatch situation,
3537 and in the -fastdispatch case two passes through the candidates were happening,
3538 just with SWIG_POINTER_IMPLICIT_CONV always set. After this patch, it is not set
3539 on the first pass, and then set on the second pass.
3540
3541 2016-06-25: liorgold
3542 Patch #727 - Add support for C++11 type aliasing.
3543
3544 Version 3.0.10 (12 Jun 2016)
3545 ============================
3546
3547 2016-06-06: mromberg
3548 [Python] Patch #698. Add support for -relativeimport for python 2.7, so -py3 is no
3549 longer also required for relative import support.
3550
3551 2016-06-05: mromberg
3552 [Python] Patch #694 - Fix package import regressions introduced in swig-3.0.9.
3553
3554 1) The code in 3.0.9 did not fall back to 'import _foo' if 'import bar._foo' failed
3555 (assuming bar.foo was the main module). Every place _foo is imported now first tries
3556 it from the package where foo was found and if that fails tries _foo as a global module.
3557
3558 2) The separate block of Python code that injected code to pull in the attributes
3559 from _foo when -builtin is used made use of the -py3 switch to either do
3560 'from ._foo import *' or "from _foo import *". This block of code no longer does this
3561 and instead checks the Python version at runtime to switch between the two syntaxes.
3562
3563 In summary, swig-3.0.10 has been modified to ease the creation of wrapper modules
3564 that can be fully made part of a Python package. SWIG no longer
3565 assumes the dynamically linked C module is a global module.
3566 The dynamic module can now be placed into either the same package as the pure Python
3567 module or as a global module. Both locations are used by the Python wrapper to
3568 locate the C module.
3569
3570 However, this could cause a backwards incompatibility with some code
3571 that was relying on the ability of "from package import _module" to
3572 pull attributes out of the package directly. If your code populates a
3573 module (which is also a package) with attributes that are SWIG
3574 generated modules which were not loaded in a conventional way,
3575 swig-3.0.8 and earlier may have worked due to 'from package import
3576 _module' bypassing a real import and pulling your module in as an
3577 attribute. This will no longer work. Since this is not a common (or
3578 even recommended) practice, most folk should not be affected.
3579
3580 *** POTENTIAL INCOMPATIBILITY ***
3581
3582 2016-05-31: wsfulton
3583 Fix #690 - Smart pointer to %ignored class doesn't expose inherited methods.
3584 Regression introduced in swig-3.0.9.
3585
3586 Version 3.0.9 (29 May 2016)
3587 ===========================
3588
3589 2016-05-24: mromberg
3590 [Python] Patch #612 - Add support for Python's implicit namespace packages.
3591
3592 2016-05-23: wsfulton
3593 [Ruby] Fix #602 - Error handling regression of opaque pointers introduced
3594 in swig-3.0.8 when C functions explicitly reset a pointer using 'DATA_PTR(self) = 0'.
3595 An ObjectPreviouslyDeleted error was incorrectly thrown when the pointer was used
3596 as a parameter.
3597
3598 2016-05-17: tamuratak
3599 [Ruby] Patch #651 - Correct overloaded function error message when function is
3600 using %newobject.
3601
3602 2016-05-17: aurelj
3603 [Ruby] Patch #582 - add support for docstring option in %module()
3604
3605 2016-05-14: wsfulton
3606 Fix #434 - Passing classes by value as parameters in director methods did not create
3607 a copy of the argument leading to invalid memory accesses if the object was used
3608 after the upcall into the target language. Passing arguments by value shouldn't give
3609 rise to these sorts of memory problems and so the objects are now copied and ownership
3610 of their lifetime is controlled by the target language.
3611
3612 2016-05-07: wsfulton
3613 Fix #611. Fix assertion handling defaultargs when using %extend for a template
3614 class and the extended methods contain default arguments.
3615
3616 2016-05-05: ejulian
3617 [Python] Patch #617. Fix operator/ wrappers.
3618
3619 2016-05-02: wsfulton
3620 Fix #669. Don't issue warning about ignoring base classes when the derived class is
3621 itself ignored.
3622
3623 2016-04-18: ianlancetaylor
3624 [Go] Fix use of goout typemap when calling base method by
3625 forcing the "type" attribute to the value we need.
3626
3627 2016-04-17: ianlancetaylor
3628 [Go] Fixes for Go 1.6: avoid returning Go pointers from
3629 directors that return string values; add a trailing 0 byte
3630 when treating Go string as C char*.
3631
3632 2016-04-06: smarchetto
3633 [Scilab] #552 Make Scilab runtime keep track of pointer types
3634 Instead of a Scilab pointer which has no type, SWIG Scilab maps a
3635 pointer to a structure tlist containing the pointer adress and its type.
3636
3637 2016-04-02: ahnolds
3638 [Python] Apply #598. Fix misleading error message when attempting to read a non-existent
3639 attribute. The previous cryptic error message:
3640 AttributeError: type object 'object' has no attribute '__getattr__'
3641 is now replaced with one mentioning the attribute name, eg:
3642 AttributeError: 'Foo' object has no attribute 'bar'
3643
3644 2016-04-02: derkuci
3645 [Python] Patch #610 to fix #607.
3646 Fix single arguments when using python -builtin -O with %feature("compactdefaultargs")
3647
3648 2016-03-31: wsfulton
3649 Fixes #594. Fix assertion for some languages when wrapping a C++11 enum class that
3650 is private in a class.
3651
3652 Also don't wrap private enums for a few languages that attempted to do so.
3653
3654 2016-03-31: wsfulton
3655 [Java] unsigned long long marshalling improvements when a negative number
3656 is passed from Java to C. A cast to signed long long in the C layer will now
3657 result in the expected value. No change for positive numbers passed to C.
3658 Fixes #623.
3659
3660 2016-03-22: alexwarg
3661 [Lua] #398 Fix lua __getitem + inheritance
3662 The new handling of classes in Lua (not merging methods into the derived classes)
3663 breaks for classes that provide a __getitem function. The __getitem function
3664 prevents method calls to any method defined in a base class. This fix calls
3665 __getitem only if the member is not found using recursive lookup.
3666
3667 2016-03-18: ptomulik
3668 [Python] #563 Stop generating unnecessary _swigconstant helpers.
3669
3670 2016-03-16: richardbeare
3671 [R] #636 Add extra std::vector numeric types
3672
3673 2016-03-14: wsfulton
3674 [Java] Add std_array.i for C++11 std::array support.
3675
3676 2016-03-12: wsfulton
3677 [Java, C#, D] Fix static const char member variables wrappers with %javaconst(1)
3678 %csconst(1) or %dmanifestconst.
3679 This fixes the case when an integer is used as the initializer, such as:
3680
3681 struct W { static const char w = 100; };
3682
3683 Fix generated code parsing enum values using char escape sequences
3684 when these values appear in the Java code (usually when using %javaconst(1))
3685 such as:
3686
3687 enum X { x1 = '\n', x2 = '\1' };
3688
3689 Similarly for static const member char variables such as:
3690
3691 struct Y { static const char y = '\n'; }
3692
3693 Likewise for D and %dmanifestconstant. For C# and %csconst(1), char
3694 values in C# are now hex escaped as C# doesn't support C octal escaping.
3695
3696 2016-03-11: wsfulton
3697 [Java C#] Add support for treating C++ base classes as Java interfaces
3698 instead of Java proxy classes. This enable some sort of support for
3699 multiple inheritance. The implementation is in swiginterface.i and
3700 provides additional macros (see Java.html for full documentation):
3701
3702 %interface(CTYPE)
3703 %interface_impl(CTYPE)
3704 %interface_custom("PROXY", "INTERFACE", CTYPE)
3705
3706 2016-03-01: wsfulton
3707 Add rstrip encoder for use in %rename. This is like the strip encoder but
3708 strips the symbol's suffix instead of the prefix. The example below
3709 will rename SomeThingCls to SomeThing and AnotherThingCls to AnotherThing:
3710
3711 %rename("%(rstrip:[Cls])s") "";
3712
3713 class SomeThingCls {};
3714 struct AnotherThingCls {};
3715
3716 2016-03-01: olly
3717 Fix isfinite() check to work with GCC6. Fixes
3718 issue #615 reported by jplesnik.
3719
3720 2016-02-17: olly
3721 [Python] Add missing keywords 'as' and 'with' to pythonkw.swg.
3722
3723 2016-02-07: kwwette
3724 [Octave] recognise various unary functions
3725 * Use __float__() for numeric conversions, e.g. when calling double()
3726 * Map various unary functions, e.g. abs() to __abs__(), see full list
3727 in section 32.3.10 of manual; only available in Octave 3.8.0 or later
3728
3729 2016-02-07: kwwette
3730 [Octave] export function swig_octave_prereq() for testing Octave version
3731
3732 2016-02-06: pjohangustavsson
3733 [C#] Fix duplicate symbol problems when linking the source generated
3734 from multiple SWIG modules into one shared library for the -namespace
3735 option. The namespace is now mangled into the global PInvoke function
3736 names.
3737
3738 *** POTENTIAL INCOMPATIBILITY ***
3739
3740 2016-01-27: ahnolds
3741 [Python] Added support for differentiating between Python Bytes
3742 and Unicode objects using by defining SWIG_PYTHON_STRICT_BYTE_CHAR
3743 and SWIG_PYTHON_STRICT_UNICODE_WCHAR.
3744
3745 2016-01-27: steeve
3746 [Go] Ensure structs are properly packed between gc and GCC/clang.
3747
3748 2016-01-25: ahnolds
3749 [Python] Support the full Python test suite in -classic mode
3750 * Convert long/unsigned long/long long/unsigned long long to PyInt
3751 rather than PyLong when possible. Certain python functions like
3752 len() require a PyInt when operating on old-style classes.
3753 * Add support for static methods in classic mode, including support
3754 for pythonappend, pythonprepend, and docstrings.
3755 * Removing the use of __swig_getmethods__ for static member methods
3756 since they will always be found by the standard argument lookup
3757 * Fix a bug where the wrong type of exception was caught when
3758 checking for new-style class support
3759
3760 2016-01-23: ahnolds
3761 [Go] Enable support for the Go test-suite on OSX:
3762 * The linker on OSX requires that all symbols (even weak symbols)
3763 are defined at link time. Because the function _cgo_topofstack is
3764 only defined starting in Go version 1.4, we explicitly mark it as
3765 undefined for older versions of Go on OSX.
3766 * Avoid writing empty swigargs structs, since empty structs are not
3767 allowed in extern "C" blocks.
3768
3769 2016-01-12: olly
3770 [Javascript] Look for "nodejs" as well as "node", as it's packaged
3771 as the former on Debian.
3772
3773 2016-01-12: olly
3774 [Javascript] For v8 >= 4.3.0, use V8_MAJOR_VERSION.
3775 Fixes issue 561.
3776
3777 2016-01-10: ahnolds
3778 Improved size_t and ptrdiff_t typemaps to support large values
3779 on platforms where sizeof(size_t) > sizeof(unsigned long) and
3780 sizeof(ptrdiff_t) > sizeof(long).
3781
3782 Version 3.0.8 (31 Dec 2015)
3783 ===========================
3784
3785 2015-12-30: wsfulton
3786 The pdf documentation is now generated by wkhtmltopdf and has colour
3787 for the code snippets just like the html documentation!
3788
3789 2015-12-23: ahnolds
3790 [Python] Fixes for conversion of signed and unsigned integer types:
3791
3792 No longer check for PyInt objects in Python3. Because PyInt_Check
3793 and friends are #defined to the corresponding PyLong methods, this
3794 had caused errors in Python3 where values greater than what could be
3795 stored in a long were incorrectly interpreted as the value -1 with
3796 the Python error indicator set to OverflowError. This applies to
3797 both the conversions PyLong->long and PyLong->double.
3798
3799 Conversion from PyLong to long, unsigned long, long long, and
3800 unsigned long long now raise OverflowError instead of TypeError in
3801 both Python2 and Python3 for PyLong values outside the range
3802 expressible by the corresponding C type. This matches the existing
3803 behavior for other integral types (signed and unsigned ints, shorts,
3804 and chars), as well as the conversion for PyInt to all numeric
3805 types. This also indirectly applies to the size_t and ptrdiff_t
3806 types, which depend on the conversions for unsigned long and long.
3807
3808 2015-12-19: wsfulton
3809 [Python] Python 2 Unicode UTF-8 strings can be used as inputs to char * or
3810 std::string types if the generated C/C++ code has SWIG_PYTHON_2_UNICODE defined.
3811
3812 2015-12-17: wsfulton
3813 Issues #286, #128
3814 Remove ccache-swig.1 man page - please use the CCache.html docs instead.
3815 The yodl2man and yodl2html tools are no longer used and so SWIG no
3816 longer has a dependency on these packages which were required when
3817 building from git.
3818
3819 2015-12-16: zturner/coleb
3820 [Python] Fix Python3.5 interpreter assertions when objects are being
3821 deleted due to an existing exception. Most notably in generators
3822 which terminate using a StopIteration exception. Fixes #559 #560 #573.
3823 If a further exception is raised during an object destruction,
3824 PyErr_WriteUnraisable is used on this second exception and the
3825 original exception bubbles through.
3826
3827 2015-12-14: ahnolds/wsfulton
3828 [Python] Add in missing initializers for tp_finalize,
3829 nb_matrix_multiply, nb_inplace_matrix_multiply, ht_qualname
3830 ht_cached_keys and tp_prev.
3831
3832 2015-12-12: wsfulton
3833 Fix STL wrappers to not generate <: digraphs.
3834 For example std::vector<::X::Y> was sometimes generated, now
3835 corrected to std::vector< ::X::Y >.
3836
3837 2015-11-25: wsfulton
3838 [Ruby] STL ranges and slices fixes.
3839
3840 Ruby STL container setting slices fixes:
3841
3842 Setting an STL container wrapper slice better matches the way Ruby
3843 arrays work. The behaviour is now the same as Ruby arrays. The only
3844 exception is the default value used when expanding a container
3845 cannot be nil as this is not a valid type/value for C++ container
3846 elements.
3847
3848 Obtaining a Ruby STL container ranges and slices fixes:
3849
3850 Access via ranges and slices now behave identically to Ruby arrays.
3851 The fixes are mostly for out of range indices and lengths.
3852 - Zero length slice requests return an empty container instead of nil.
3853 - Slices which request a length greater than the size of the container
3854 no longer chop off the last element.
3855 - Ranges which used to return nil now return an empty array when the
3856 the start element is a valid index.
3857
3858 Ruby STL container negative indexing support improved.
3859
3860 Using negative indexes to set values works the same as Ruby arrays, eg
3861
3862 %template(IntVector) std::vector<int>;
3863
3864 iv = IntVector.new([1,2,3,4])
3865 iv[-4] = 9 # => [1,2,3,9]
3866 iv[-5] = 9 # => IndexError
3867
3868 2015-11-21: wsfulton
3869 [Ruby, Python] Add std::array container wrappers.
3870
3871 These work much like any of the other STL containers except Python/Ruby slicing
3872 is somewhat limited because the array is a fixed size. Only slices of
3873 the full size are supported.
3874
3875 2015-10-10: wsfulton
3876 [Python] #539 - Support Python 3.5 and -builtin. PyAsyncMethods is a new
3877 member in PyHeapTypeObject.
3878
3879 2015-10-06: ianlancetaylor
3880 [Go] Don't emit a constructor function for a director
3881 class with an abstract method, since the function will
3882 always panic.
3883
3884 2015-10-01: wsfulton
3885 Fix %shared_ptr support for private and protected inheritance.
3886 - Remove unnecessary Warning 520: Derived class 'Derived' of 'Base'
3887 is not similarly marked as a smart pointer
3888 - Do not generate code that attempts to cast up the inheritance chain in the
3889 type system runtime in such cases as it doesn't compile and can't be used.
3890 Remove unnecessary warning 520 for %shared_ptr when the base class is ignored.
3891
3892 2015-10-01: vkalinin
3893 Fix #508: Fix segfault parsing anonymous typedef nested classes.
3894
3895 2015-09-26: wsfulton
3896 [Ruby] Add shared_ptr support
3897
3898 2015-09-13: kkaempf
3899 [Ruby] Resolve tracking bug - issue #225.
3900 The bug is that the tracking code uses a ruby hash and thus may
3901 allocate objects (Bignum) while running the GC. This was tolerated in
3902 1.8 but is invalid (raises an exception) in 1.9.
3903 The patch uses a C hash (also used by ruby) instead.
3904
3905 2015-09-09: lyze
3906 [CFFI] Extend the "export" feature in the CFFI module to support
3907 exporting to a specified package.
3908
3909 2015-09-04: olly
3910 [Python] Fix docstrings for %callback functions.
3911
3912 2015-09-03: demi-rluddy
3913 [Go] Removed golang stringing for signed/unsigned char
3914
3915 Changed default handling of signed char* and unsigned char* to be
3916 opaque pointers rather than strings, similarly to how other
3917 languages work.
3918
3919 Any existing code relying on treating signed char* or unsigned
3920 char* as a string can restore the old behavior with typemaps.i by
3921 using %apply to copy the [unchanged] char* behavior.
3922
3923 *** POTENTIAL INCOMPATIBILITY ***
3924
3925 2015-08-07: talby
3926 [Perl] tidy -Wtautological-constant-out-of-range-compare warnings when building generated code under clang
3927
3928 2015-08-07: xantares
3929 [Python] pep257 & numpydoc conforming docstrings:
3930 - Mono-line module docsstring
3931 - Rewrite autodoc parameters section in numpydoc style:
3932 https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt
3933 - One line summary should end with "."
3934 - Adds a blank line after class docstring
3935
3936 2015-08-05: vadz
3937 [Java] Make (char* STRING, size_t LENGTH) typemaps usable for
3938 strings of other types, e.g. "unsigned char*".
3939
3940 Version 3.0.7 (3 Aug 2015)
3941 ==========================
3942
3943 2015-08-02: wsfulton
3944 [Java] Fix potential security exploit in generated Java classes.
3945 The swigCPtr and swigCMemOwn member variables in the generated Java
3946 classes are now declared 'transient' by default. Further details of the exploit
3947 in Android is being published in an academic paper as part of USENIX WOOT '15:
3948 https://www.usenix.org/conference/woot15/workshop-program/presentation/peles.
3949
3950 In the unlikely event that you are relying on these members being serializable,
3951 then you will need to override the default javabody and javabody_derived typemaps
3952 to generate the old generated code. The relevant typemaps are in the Lib directory
3953 in the java.swg, boost_shared_ptr.i and boost_intrusive_ptr.i files. Copy the
3954 relevant default typemaps into your interface file and remove the 'transient' keyword.
3955
3956 *** POTENTIAL INCOMPATIBILITY ***
3957
3958 2015-08-01: vadz
3959 Make configure --without-alllang option more useful: it can now be overridden by the following
3960 --with-xxx options, allowing to easily enable just one or two languages.
3961
3962 2015-07-30: wsfulton
3963 Fix #440 - Initialise all newly created arrays when using %array_functions and %array_class
3964 in the carrays.i library - bug is only relevant when using C++.
3965
3966 2015-07-29: wsfulton
3967 [Python] Improve indentation warning and error messages for code in the following directives:
3968
3969 %pythonprepend
3970 %pythonappend
3971 %pythoncode
3972 %pythonbegin
3973 %feature("shadow")
3974
3975 Old error example:
3976 Error: Line indented less than expected (line 3 of pythoncode)
3977
3978 New error example:
3979 Error: Line indented less than expected (line 3 of %pythoncode or %insert("python") block)
3980 as no line should be indented less than the indentation in line 1
3981
3982 Old warning example:
3983 Warning 740: Whitespace prefix doesn't match (line 2 of %pythoncode or %insert("python") block)
3984
3985 New warning example:
3986 Warning 740: Whitespace indentation is inconsistent compared to earlier lines (line 3 of
3987 %pythoncode or %insert("python") block)
3988
3989
3990 2015-07-28: wsfulton
3991 [Python] Fix #475. Improve docstring indentation handling.
3992
3993 SWIG-3.0.5 and earlier sometimes truncated text provided in the docstring feature.
3994 This occurred when the indentation (whitespace) in the docstring was less in the
3995 second or later lines when compared to the first line.
3996 SWIG-3.0.6 gave a 'Line indented less than expected' error instead of truncating
3997 the docstring text.
3998 Now the indentation for the 'docstring' feature is smarter and is appropriately
3999 adjusted so that no truncation occurs.
4000
4001 2015-07-22: wsfulton
4002 Support for special variable expansion in typemap attributes. Example usage expansion
4003 in the 'out' attribute (C# specific):
4004
4005 %typemap(ctype, out="$*1_ltype") unsigned int& "$*1_ltype"
4006
4007 is equivalent to the following as $*1_ltype expands to 'unsigned int':
4008
4009 %typemap(ctype, out="unsigned int") unsigned int& "unsigned int"
4010
4011 Special variables can be used within special variable macros too. Example usage expansion:
4012
4013 %typemap(cstype) unsigned int "uint"
4014 %typemap(cstype, out="$typemap(cstype, $*1_ltype)") unsigned int& "$typemap(cstype, $*1_ltype)"
4015
4016 Special variables are expanded first and hence the above is equivalent to:
4017
4018 %typemap(cstype, out="$typemap(cstype, unsigned int)") unsigned int& "$typemap(cstype, unsigned int)"
4019
4020 which then expands to:
4021
4022 %typemap(cstype, out="uint") unsigned int& "uint"
4023
4024 2015-07-22: lindleyf
4025 Apply patch #439 - support for $typemap() (aka embedded typemaps or special variable
4026 macros) in typemap attributes. A simple example where $typemap() is expanded in the
4027 'out' attribute (C# specific):
4028
4029 %typemap(cstype) unsigned int "uint"
4030 %typemap(cstype, out="$typemap(cstype, unsigned int)") unsigned int& "$typemap(cstype, unsigned int)"
4031
4032 is equivalent to:
4033
4034 %typemap(cstype, out="uint") unsigned int& "uint"
4035
4036 2015-07-18: m7thon
4037 [Python] Docstrings provided via %feature("docstring") are now quoted and added to
4038 the tp_doc slot when using python builtin classes (-builtin). When no docstring is
4039 provided, the tp_doc slot is set to the fully qualified C/C++ class name.
4040 Github issues #445 and #461.
4041
4042 2015-07-17: kwwette
4043 [octave] Support Octave version 4.0.0 (thanks to patches from Orion Poplawski).
4044
4045 2015-07-07: wsfulton
4046 SWIG no longer generates a wrapper for a class' constructor if that class has
4047 any base class with a private destructor. This is because your compiler should
4048 not allow a class to be instantiated if a base has a private destructor. Some
4049 compilers do, so if you need the old behaviour, use the "notabstract" feature, eg:
4050
4051 %feature("notabstract") Derived;
4052 class Base {
4053 ~Base() {}
4054 };
4055 struct Derived : Base {};
4056
4057 Version 3.0.6 (5 Jul 2015)
4058 ==========================
4059
4060 2015-07-02: wsfulton
4061 Fix syntax error when the template keyword is used in types, eg:
4062
4063 std::template vector<int> v;
4064
4065 2015-07-02: ngladitz
4066 [Lua] Push characters as unformatted 1-character strings to avoid
4067 unprintable characters such as (char)127 being converted to
4068 "<\127>" with Lua 5.3 and later. (github PR #452)
4069
4070 2015-06-29: olly
4071 [Python] Improve handling of whitespace in %pythoncode.
4072
4073 Previously SWIG looked at the indentation of the first line and
4074 removed that many characters from each subsequent line, regardless
4075 of what those characters were. This was made worse because SWIG's
4076 preprocessor removes any whitespace before a '#'. Fixes github
4077 issue #379, reported by Joe Orton.
4078
4079 2015-06-12: wsfulton
4080 [R] Fix #430 - call to SWIG_createNewRef in copyToC was incorrectly named.
4081
4082 2015-06-11: sghirate
4083 [C#] Patch #427 adds in new command line option -outfile to combine all the
4084 generated C# code into a single file.
4085
4086 2015-06-09: wsfulton
4087 Fix seg fault processing C++11 type aliasing. Issue #424.
4088
4089 2015-05-28: wsfulton
4090 [Python] Add new feature "python:cdefaultargs" to control default argument
4091 code generation. By default, SWIG attempts to convert C/C++ default argument values
4092 into Python values and generates code into the Python layer with these values.
4093 Recent versions of SWIG are able to convert more of these values, however, the
4094 new behaviour can be circumvented if desired via this new feature, such that
4095 the default argument values are obtained from the C layer and not the Python layer.
4096 For example:
4097
4098 struct CDA {
4099 int fff(int a = 1, bool b = false);
4100 };
4101
4102 The default code generation in the Python layer is:
4103
4104 class CDA(_object):
4105 ...
4106 def fff(self, a=1, b=False):
4107 return _default_args.CDA_fff(self, a, b)
4108
4109 Adding the feature:
4110
4111 %feature("python:cdefaultargs") CDA::fff;
4112
4113 Results in:
4114
4115 class CDA(_object):
4116 ...
4117 def fff(self, *args):
4118 return _default_args.CDA_fff(self, *args)
4119
4120 Some code generation modes, eg -builtin and -fastproxy, are unaffected by this as
4121 the default values are always obtained from the C layer.
4122
4123 2015-05-27: wsfulton
4124 [Python] Deal with an integer as the default value of a typedef to bool
4125 parameter in the C++ prototype. See #327. Regression from 3.0.0 onwards.
4126
4127 2015-05-19: olly
4128 [Python] Fix warning when compiling generated code with MSVC.
4129 (Fixes https://sourceforge.net/p/swig/patches/351/ reported by
4130 Mateusz Szyma¿ski).
4131
4132 2015-05-14: wsfulton
4133 Fix seg fault wrapping shared_ptr of classes with private constructors and destructors.
4134 This also fixes the "unref" feature when used on classes with private destructors.
4135
4136 2015-05-10: wsfulton
4137 [Java] Fix multi-argument typemaps (char *STRING, size_t LENGTH)
4138 so that they can be applied to a wider range of types. Fixes #385.
4139
4140 2015-05-07: olly
4141 [Python] Deal with an integer as the default value of a bool
4142 parameter in the C++ prototype. Fixes github #327, reported by
4143 Greg Allen.
4144
4145 2015-05-07: LindleyF
4146 [Java] Allow feature("director") and feature("ref") to be used
4147 together. Github PR#403.
4148
4149 2015-05-05: olly
4150 Suppress warning 325 "Nested class not currently supported (Foo
4151 ignored)" when Foo has already been explicitly ignored with "%ignore".
4152
4153 2015-05-04: wsfulton
4154 Add support for friend templates, including operator overloading - fixes #196. Considering
4155 the example below, previously the operator gave a syntax error and friendfunc incorrectly
4156 warned with:
4157
4158 "Warning 503: Can't wrap 'friendfunc<(Type)>' unless renamed to a valid identifier."
4159
4160 template <class Type> class MyClass {
4161 friend int friendfunc <Type>(double is, MyClass <Type> & x);
4162 friend int operator<< <Type>(double un, const MyClass <Type> &x);
4163 };
4164
4165 The following also previously incorrectly warned with:
4166
4167 "Warning 302: Identifier 'template_friend' redefined (ignored),"
4168
4169 template<typename T> T template_friend(T);
4170 struct MyTemplate {
4171 template<typename T> friend T template_friend(T);
4172 };
4173
4174 2015-05-01: wsfulton
4175 Fix handling of conversion operators where the operator is split over multiple
4176 lines or has comments within the operator type. Fixes #401.
4177
4178 Also fix similar problem with normal operators which gave a syntax error if split over
4179 multiple lines or had a comment within the operator declaration.
4180
4181 2015-04-30: olly
4182 Ignore unknown preprocessor directives which are inside an inactive
4183 conditional (github issue #394, reported by Dan Wilcox).
4184 Regression introduced in 3.0.3.
4185
4186 2015-04-27: vadz
4187 [Python] Fix "default" typemap used after an argument with "numinputs=0" (#377).
4188
4189 2015-04-24: wsfulton
4190 [Python] Fix #256. Code generated with '-builtin -modernargs' segfaults for any
4191 method taking zero arguments.
4192
4193 Also fixes: "SystemError: error return without exception set" during error checking
4194 when using just -builtin and the incorrect number of arguments is passed to a class
4195 method expecting zero arguments.
4196
4197 2015-04-23: wsfulton
4198 [Java] Bug #386 - Memory leak fix in (char *STRING, size_t LENGTH) typemaps.
4199
4200 2015-04-23: vadz
4201 [Python] Make "default" typemap work again (#330, #377).
4202
4203 2015-04-23: vadz
4204 [Python] Fix the use of default values for the pointer types (#365, #376).
4205
4206 2015-04-23: wsfulton
4207 Fix 'make check-ccache' which is part of 'make check' when one of the CCACHE_
4208 environment variables, for example CCACHE_DISABLE, is set.
4209
4210 2015-04-14: wsfulton
4211 Clearer warning message for badly constructed typecheck typemaps. For example, was:
4212
4213 example.i:3: Warning 467: Overloaded foo(int) not supported (no type checking
4214 rule for 'int').
4215
4216 Now:
4217
4218 example.i:3: Warning 467: Overloaded foo(int) not supported (incomplete type checking
4219 rule - no precedence level in typecheck typemap for 'int').
4220
4221 2015-04-11: wsfulton
4222 [Java] Fix #353 - Linker multiple definition of 'ExceptionMatches' when
4223 using directors and multiple modules.
4224
4225 2015-04-11: wsfulton
4226 Merge #320 - Make __dict__ accessible for Python builtin classes.
4227
4228 2015-04-07: wsfulton
4229 Fix #375 - parsing of extern "C" and typedef for example:
4230 extern "C" typedef void (*Hook2_t)(int, const char *);
4231 extern "C" typedef int Integer;
4232
4233 2015-03-12: olly
4234 -DSWIG_DIRECTOR_STATIC is now supported for all languages with
4235 director support, not only Python and PHP.
4236
4237 2015-03-02: ianlancetaylor
4238 [Go] Add -cgo option, required for Go versions 1.5 and
4239 later.
4240
4241 2015-02-26: olly
4242 Fix segmentation fault when top==NULL, introduced by nested class
4243 handling (reported in issue#346 by Pawe¿ Tomulik).
4244
4245 2015-02-09: wsfulton
4246 [Guile] Fix generated code for static const char member variables when
4247 defined and declared inline.
4248
4249 2015-02-09: mishas
4250 [Go] Fix %import of files in sub directories.
4251
4252 2015-02-05: ianlancetaylor
4253 [Go] Ignore Go specific type maps (goin, goout, etc.) if they are empty.
4254
4255 2015-02-05: ianlancetaylor
4256 [Go] Generated Go code no longer calls _swig_goallocate or
4257 _swig_makegostring, as they will no longer work as of Go 1.5.
4258
4259 Version 3.0.5 (31 Jan 2015)
4260 ===========================
4261
4262 2015-01-30: wsfulton
4263 [Python] Fix Python -classic and property setting. Setting properties on classic classes
4264 was broken in swig-3.0.3 by attempting to use __setattr__. This regression is fixed now
4265 by using __dict__ again when using -classic.
4266 Fixes patch #232.
4267
4268 2015-01-27: smarchetto
4269 [Scilab] Support for the Scilab language has been added
4270
4271 2015-01-23: olly
4272 [PHP] When wrapping a returned resource as an object, check if all
4273 cases wrap it in the same class, and if so eliminate the pointless
4274 switch statement wrapper we previously generated.
4275
4276 2015-01-22: wsfulton
4277 [Octave] Merge patch #297 for SF bug #1277 - Octave shared_ptr support
4278
4279 2015-01-15: wsfulton
4280 [Python] Merge patch #250 - Fixes for using %constant and objects (non-primitive types)
4281
4282 2015-01-15: wsfulton
4283 [C# Go] Merge patch #308 and fix #307 - C++11 strongly typed enum support
4284 in directors
4285
4286 2015-01-15: wsfulton
4287 [Python] Second fix for #294 #296 - Regression introduced in SWIG-3.0.3 when
4288 wrapping functions with default arguments, this time when using kwargs.
4289
4290 Version 3.0.4 (14 Jan 2015)
4291 ===========================
4292
4293 2015-01-12: olly
4294 [PHP] Fix segfault in director upcall check when using PHP built with
4295 ZTS enabled. Fixes #155, reported by Pierre Labastie.
4296
4297 2015-01-12: vadz
4298 [Python] Fix #294 #296 - Regression introduced in SWIG-3.0.3 when
4299 wrapping functions with default arguments. Invalid or missing default
4300 arguments were sometimes being generated into the python layer.
4301
4302 2015-01-08: olly
4303 Allow C++11 "explicit constexpr". Fixes github issue #284 reported
4304 by Pawel Tomulik. Also handle "constexpr explicit" and "constexpr
4305 static".
4306
4307 2015-01-08: olly
4308 When reporting an error for a construct which hasn't been
4309 terminated when the end of the file is reached, report it at the
4310 start line rather than "EOF" as then tools like editors and IDEs
4311 will take you to a generally more useful place for fixing the
4312 problem.
4313
4314 2015-01-08: olly
4315 Improve error messages for a few cases which previously gave the
4316 one of the cryptic catch-all errors "Syntax error in input".
4317
4318 2015-01-08: olly
4319 Provide -cppext as a general command line option for setting the
4320 extension used for generated C++ files (previously it was specific
4321 to the PHP backend). Deprecate the equivalent -suffix option
4322 provided by the Ocaml backend, but continue to support that for
4323 now.
4324
4325 Version 3.0.3 (30 Dec 2014)
4326 ===========================
4327
4328 2014-12-27: wsfulton
4329 Fix #280 - abort using all default template parameters within other template
4330 parameters.
4331
4332 2014-12-27: talby
4333 [Perl] Issue #282 perl5 archlib vs archlibexp
4334 [Perl] tidy "warning: duplicate 'extern' declaration specifier" when building generated code
4335 under clang
4336
4337 2014-12-18: wsfulton
4338 Add support for %constant and structs/classes - issue #272
4339
4340 2014-12-09: wsfulton
4341 Fix #245 - regression (since swig-3.0.0) in templated constructors.
4342 Templated constructors could not be instantiated - they were incorrectly ignored with a warning 504:
4343 "Function: xyz must have a return type. Ignored."
4344
4345 2014-12-07: wsfulton
4346 Add support for C++11 strongly typed enumerations.
4347
4348 2014-11-21: wsfulton
4349 [Java C#] Fix multiply defined error when using %rename of enum items when using the "simple enum"
4350 wrappers.
4351
4352 2014-10-28: vadz
4353 [Python] Patch #201 The generated .py file no longer uses *args for all Python parameters.
4354 Instead, the parameters are named using the C++ parameter names.
4355
4356 "compactdefaultargs" feature can be enabled to restore the old behaviour.
4357
4358 *** POTENTIAL INCOMPATIBILITY ***
4359
4360 2014-10-24: timotheecour
4361 [D] Patch #204 Use core.atomic.atomicOp to mutate shared variables
4362
4363 2014-10-21: wsfulton
4364 Fix issue #242 - Use of the "kwargs" feature no longer automatically turns on the
4365 "compactdefaultargs" feature if the target language does not support kwargs.
4366 This change affects all languages except Python and Ruby.
4367
4368 *** POTENTIAL INCOMPATIBILITY ***
4369
4370 2014-10-10: diorcety
4371 [Python] Patch #232 Fix property access using directors
4372
4373 2014-10-06: wsfulton
4374 [Python] Fixes when using -builtin and std::vector/std::list wrappers to allow deletion
4375 of single elements, such as 'del vec[0]'.
4376
4377 2014-09-30: oliverb
4378 [Javascript] Merge patch #216 by Richie765 - Added support for many versions of v8 javascript.
4379
4380 2014-09-30: oliverb
4381 [Javascript] Merge patch #195 by zittix - Fixed JSClassRef declaration not using the static one.
4382
4383 2014-09-30: ianlancetaylor
4384 [Go] In configure script, require Go 1.1 or later.
4385
4386 2014-09-30: wsfulton
4387 [Python] Patch #207 - Fix No module error with -relativeimport when using single
4388 header file import.
4389
4390 2014-09-27: wsfulton
4391 Patch #208 - Initialise newly created array when using array_functions in the
4392 carrays.i library (C++ usage).
4393
4394 2014-09-27: wsfulton
4395 [Ruby] Patch #187 - Fix crash on shutdown of the Ruby interpreter if more than one
4396 module was loaded at a time when data is being shared between modules.
4397
4398 2014-09-27: wsfulton
4399 [Java] Patch #168 - Fix leak in Java director string handling after the Java
4400 upcall when called from a native thread.
4401
4402 2014-09-25: ianlancetaylor
4403 [Go] Adjust generated code to work with upcoming Go 1.4
4404 release.
4405
4406 2014-09-23: wsfulton
4407 [Python] Add patch from Thomas Maslach to fix crash in wrappers when using -threads in
4408 the STL iterators (SwigPyIterator destructor).
4409
4410 2014-09-17: wsfulton
4411 [C#] Merge patch #229 from contre - Add bool array types to arrays_csharp.i
4412
4413 2014-09-12: olly
4414 [PHP] Add support for specifying any PHP interfaces a wrapped class
4415 implements, e.g.: %typemap("phpinterfaces") MyIterator "Iterator"
4416
4417 2014-09-11: olly
4418 [PHP] Fix throwing a PHP exception through C++ from a subclassed
4419 director method - PHP NULL gets returned by the subclassed method
4420 in this case, so the directorout typemap needs to allow that (at
4421 least if an exception is active).
4422
4423 2014-09-09: ianlancetaylor
4424 [Go] Add goargout typemap.
4425
4426 2014-09-09: olly
4427 [PHP] Fix segmentation faults with directors in PHP >= 5.4, and
4428 reenable runme tests for director_basic testcase. Fix from
4429 pavel-charvat in issue#164.
4430
4431 2014-09-05: ianlancetaylor
4432 [Go] Add imtype, goin, goout, godirectorin, and
4433 godirectorout typemaps, to support writing Go code to
4434 convert between types.
4435
4436 2014-09-02: olly
4437 [Python] Fix regression in indentation of python code produced with
4438 -modern, introduced by changes in #188. Reported by fabiencastan
4439 in #218.
4440
4441 2014-09-01: olly
4442 Issue an error for unknown SWIG preprocessor directives, rather
4443 than quietly ignoring them. Reported by jrhelsey in issue#217.
4444
4445 *** POTENTIAL INCOMPATIBILITY ***
4446
4447 2014-08-15: talby
4448 [Perl] Include guard fix for nested modules from Anthony Heading (SF Patch #350).
4449
4450 2014-08-04: wsfulton
4451 [C#] Merge patch #200 from gpetrou - Changed CSharp license header to include auto-generated
4452 tag so that StyleCop ignores the files.
4453
4454 2014-08-04: wsfulton
4455 [Java] Merge patch #198 from Yuval Kashtan - Support for java.nio.ByteBuffer mapping to
4456 unsigned char * in various.i in NIOBUFFER typemaps.
4457
4458 2014-07-14: ianlancetaylor
4459 [Go] Change struct definition to use void *, not uint8, so
4460 that the type is recorded as possibly containing
4461 pointers. This ensures that the 1.3 garbage collector
4462 does not collect pointers passed to C++ code.
4463
4464 2014-07-01: wsfulton
4465 Fix SF Bug #1375 - Expansion of the $parentclassname special variable incorrectly contains
4466 brackets in the expanded name.
4467
4468 Version 3.0.2 (4 Jun 2014)
4469 ==========================
4470
4471 2014-06-02: v-for-vandal
4472 [Lua] Pull request #176:
4473 If class has no __eq implemented, then default __eq is generated.
4474 Default __eq compares actual pointers stored inside Lua userdata.
4475
4476 2014-06-02: vkalinin
4477 Fix #183 - %extend and unnamed nested structs
4478
4479 2014-05-28: kwwette
4480 Fix install failure when using an 'out of source' build using the shipped
4481 tarball - regression introduced in swig-3.0.1.
4482
4483 2014-05-24: kwwette
4484 [Octave] Remove deprecated -global/-noglobal command-line arguments
4485
4486 *** POTENTIAL INCOMPATIBILITY ***
4487
4488 Version 3.0.1 (27 May 2014)
4489 ===========================
4490
4491 2014-05-25: hfalcic
4492 [Python] Python 3 byte string output: use errors="surrogateescape"
4493 if available on the version of Python that's in use. This allows
4494 obtaining the original byte string (and potentially trying a fallback
4495 encoding) if the bytes can't be decoded as UTF-8.
4496
4497 Previously, a UnicodeDecodeError would be raised with no way to treat
4498 the data as bytes or try another codec.
4499
4500 2014-05-18: vkalinin
4501 Bug #175 - Restore %extend to work for unnamed nested structures by using a C
4502 symbol comprising the outer structure name and unnamed variable instance name.
4503
4504 2014-05-15: kwwette
4505 Add #166 - 'make check' now works out of source. This required the examples to build
4506 out of source. The main languages have been tested - C#, Go, Guile, Java, Javascript,
4507 Lua, Octave, Perl, PHP, Python, Ruby and Tcl.
4508
4509 2014-05-01: Oliver Buchtala
4510 Javascript support added, see Javascript chapter in the documentation.
4511
4512 2014-05-01: olly
4513 [PHP] The generated __isset() method now returns true for read-only properties.
4514
4515 2014-04-24: kwwette
4516 [Go] Fix go ./configure parsing of gccgo --version, and
4517 goruntime.swg typo in __GNUC_PATCHLEVEL__ (SF Bug #1298)
4518
4519 2014-04-24: kwwette
4520 Fix {python|perl5|ruby|tcl}/java examples
4521
4522 In Lib/gcj/cni.i, for compatibility with newer gcj versions:
4523
4524 - remove JvAllocObject() which gcj no longer defines, from gcj Changelog:
4525 2004-04-16 Bryce McKinlay <mckinlay@redhat.com>
4526 * gcj/cni.h (JvAllocObject): Remove these obsolete,
4527 undocumented CNI calls.
4528
4529 - change JvCreateJavaVM() argument from void* to JvVMInitArgs*, from gcj Changelog:
4530 2005-02-23 Thomas Fitzsimmons <fitzsim@redhat.com>
4531 PR libgcj/16923
4532 ...
4533 (JvCreateJavaVM): Declare vm_args as JvVMInitArgs* rather than void*.
4534
4535 *** POTENTIAL INCOMPATIBILITY ***
4536
4537 2014-04-08: wsfulton
4538 SF Bug #1366 - Remove duplicate declarations of strtoimax and strtoumax in inttypes.i
4539
4540 2014-04-08: wsfulton
4541 [Java C#] Enums which have been ignored via %ignore and are subsequently
4542 used are handled slightly differently. Type wrapper classes are now generated
4543 which are effectively a wrapper of an empty enum. Previously in Java uncompilable
4544 code was generated and in C# an int was used.
4545
4546 2014-04-04: wsfulton
4547 Fix regression in 3.0.0 where legal code following an operator<< definition might
4548 give a syntax error. SF Bug #1365.
4549
4550 2014-04-03: olly
4551 [PHP] Fix wrapping director constructors with default parameters
4552 with a ZTS-enabled build of PHP.
4553
4554 2014-04-02: olly
4555 [PHP] Pass the ZTS context we already have to avoid needing to
4556 call TSRMLS_FETCH, which is relatively expensive.
4557
4558 2014-04-02: olly
4559 [PHP] Pass ZTS context through to t_output_helper() so it works
4560 with a ZTS-enabled build of PHP. Reported by Pierre Labastie in
4561 github PR#155.
4562
4563 2014-03-28: wsfulton
4564 [Java C# D Go] Fixes for C enums used in an API and the definition of the enum
4565 has not been parsed. For D, this fixes a segfault in SWIG. The other languages
4566 now produce code that compiles, although the definition of the enum is needed
4567 in order to use the enum properly from the target language.
4568
4569 2014-03-23: v-for-vandal
4570 [Lua] Fix for usage of snprintf in Lua runtime which Visual Studio does not have.
4571
4572 Version 3.0.0 (16 Mar 2014)
4573 ===========================
4574
4575 2014-03-16: wsfulton
4576 C++11 support initially developed as C++0x support by Matevz Jekovec as a Google Summer of Code
4577 project has been further extended. The C++11 support is comprehensive, but by no means complete
4578 or without limitations. Full details for each new feature in C++11 is covered in the
4579 CPlusPlus11.html chapter in the documentation which is included in SWIG and also available
4580 online at https://www.swig.org/Doc3.0/CPlusPlus11.html.
4581
4582 2014-03-14: v-for-vandal
4583 [Lua] Numerous Lua improvements:
4584 1. %nspace support has been added. Namespaces are mapped to tables in the module, with the same
4585 name as the C++ namespace.
4586 2. Inheritance is now handled differently. Each class metatable keeps a list of class bases instead
4587 of merging all members of all bases into the derived class.
4588 3. The new metatables result in differences in accessing class members. For example:
4589
4590 %module example
4591 struct Test {
4592 enum { TEST1 = 10, TEST2 = 20 };
4593 static const int ICONST = 12;
4594 };
4595
4596 Now this can be used as follows:
4597 print(example.Test.TEST1)
4598 print(example.Test.ICONST)
4599 The old way was:
4600 print(example.Test_TEST1)
4601 print(example.Test_ICONST)
4602
4603 4. The special class metatable member ".constructor" was removed. Now SWIG generates the proxy
4604 function by itself and assigns it directly to the class table "__call" method.
4605 5. eLua should also now support inheritance.
4606 6. 'const' subtable in eLua is considered deprecated.
4607
4608 Changes in behaviour:
4609 a. You can no longer assign to non-existing class members in classes without a __setitem__ method.
4610 It will cause a Lua error.
4611 b. You can no longer iterate over a module table and copy everything into the global namespace.
4612 Actually, this was never the case, but it is now explicitly prohibited.
4613 c. Now changing a base class will immediately affect all derived classes.
4614 d. There might be some issues with inheritance. Although the bases iteration scheme is the same
4615 as was used for merging base classes into derived one, some unknown issues may arise.
4616
4617 The old metatable behaviour can be restored by using the -no-old-metatable-bindings option.
4618
4619 *** POTENTIAL INCOMPATIBILITY ***
4620
4621 2014-03-06: wsfulton
4622 [Python] Change in default behaviour wrapping C++ bool. Only a Python True or False
4623 will now work for C++ bool parameters. This fixes overloading bool with other types.
4624 Python 2.3 minimum is now required for wrapping bool.
4625
4626 When wrapping:
4627
4628 const char* overloaded(bool value) { return "bool"; }
4629 const char* overloaded(int value) { return "int"; }
4630
4631 Previous behaviour:
4632 >>> overloaded(False)
4633 'int'
4634 >>> overloaded(True)
4635 'int'
4636 >>> overloaded(0)
4637 'int'
4638
4639 Now we get the expected behaviour:
4640 >>> overloaded(False)
4641 'bool'
4642 >>> overloaded(0)
4643 'int'
4644
4645 The consequence is when wrapping bool in non-overloaded functions:
4646
4647 const char* boolfunction(bool value) { return value ? "true" : "false"; }
4648
4649 The previous behaviour was very Pythonic:
4650 >>> boolfunction("")
4651 'false'
4652 >>> boolfunction("hi")
4653 'true'
4654 >>> boolfunction(12.34)
4655 'true'
4656 >>> boolfunction(0)
4657 'false'
4658 >>> boolfunction(1)
4659 'true'
4660
4661 Now the new behaviour more along the lines of C++ due to stricter type checking. The
4662 above calls result in an exception and need to be explicitly converted into a bool as
4663 follows:
4664 >>> boolfunction(0)
4665 Traceback (most recent call last):
4666 File "<stdin>", line 1, in <module>
4667 TypeError: in method 'boolfunction', argument 1 of type 'bool'
4668 >>> boolfunction(bool(0))
4669 'false'
4670
4671 The old behaviour can be resurrected by passing the -DSWIG_PYTHON_LEGACY_BOOL command line
4672 parameter when executing SWIG. Typemaps can of course be written to customise the behaviour
4673 for specific parameters.
4674
4675 *** POTENTIAL INCOMPATIBILITY ***
4676
4677 2014-03-06: wsfulton
4678 Fix SF Bug #1363 - Problem with method overloading when some methods are added by %extend
4679 and others are real methods and using template default parameters with smart pointers.
4680 This is noticeable as a regression since 2.0.12 when using the default smart pointer
4681 handling for some languages when the smart pointer wraps std::map and other STL containers.
4682
4683 2014-03-02: wsfulton
4684 [Python] SF Patch #346 from Jens Krueger. Correct exception thrown attempting to
4685 access a non-existent C/C++ global variable on the 'cvar' object. The exception thrown
4686 used to be a NameError. However, as this access is via a primary, an AttributeError
4687 is more correct and so the exception thrown now is an AttributeError. Reference:
4688 http://docs.python.org/2/reference/expressions.html#attribute-references
4689
4690 *** POTENTIAL INCOMPATIBILITY ***
4691
4692 2014-03-01: wsfulton
4693 [Python] Patch #143 Fix type shown when using type() to include the module and package
4694 name when using -builtin.
4695
4696 2014-03-01: wsfulton
4697 [Python] SF patch #347 Fix missing argument count checking with -modern.
4698 Fixes regression introduced when builtin changes were introduced in SWIG-2.0.3.
4699
4700 2014-02-21: wsfulton
4701 [PHP] Fix warning suppression using %warnfilter for PHP reserved class names.
4702
4703 2014-02-19: olly
4704 [Lua] Add keyword warnings for Lua keywords and Basic Functions.
4705
4706 2014-02-19: olly
4707 -Wallkw now includes keywords for all languages with keyword
4708 warnings (previously Go and R were missing).
4709
4710 2014-02-19: olly
4711 [PHP] Update the lists of PHP keywords with new ones from PHP 5.4
4712 and newer (and some missing ones from 5.3). Reserved PHP constants
4713 names are now checked against enum values and constants, instead
4714 of against function and method names. Built-in PHP function names
4715 no longer match methods added by %extend. Functions and methods
4716 named '__sleep', '__wakeup', 'not', 'parent', or 'virtual' are no
4717 longer needlessly renamed.
4718
4719 2014-02-15: wsfulton
4720 Fix the %$ismember %rename predicates to also apply to members added via %extend.
4721
4722 Add %$isextendmember for %rename of members added via %extend. This can be used to
4723 distinguish between normal class/struct members and %extend members. For example
4724 '%$ismember, %$not %$isextendmember' will now identify just class/struct members.
4725
4726 *** POTENTIAL INCOMPATIBILITY ***
4727
4728 2014-02-16: hfalcic
4729 [Python] Patch #137 - fix crashes/exceptions in exception handling in Python 3.3
4730
4731 2014-02-15: wsfulton
4732 [Java] Add support for the cdata library.
4733
4734 2014-02-08: vkalinin
4735 Nested class support added. This primarily allows SWIG to properly parse nested
4736 classes and keep the nested class information in the parse tree. Java and C#
4737 have utilised this information wrapping the C++ nested classes as Java/C#
4738 nested classes. The remaining target languages ignore nested classes as in
4739 previous versions. Help is needed by users of these remaining languages to
4740 design how C++ nested classes can be best wrapped. Please talk to us on the
4741 swig-devel mailing list if you think you can help.
4742
4743 Previously, there was limited nested class support. Nested classes were treated
4744 as opaque pointers. However, the "nestedworkaround" feature provided a way to
4745 wrap a nested class as if it was a global class. This feature no longer exists
4746 and is replaced by the new "flatnested" feature. This effectively does the same
4747 thing with less manual code to be written. Please see the 'Nested classes'
4748 section in the documentation in SWIGPlus.html if you were previously using this
4749 feature.
4750
4751 SWIG now parses the contents of nested classes where previously it did not. You
4752 may find that you will need to make adjustments to your interface file as
4753 effectively extra code is being wrapped.
4754
4755 *** POTENTIAL INCOMPATIBILITY ***
4756
4757 2014-02-06: gjanssens
4758 [Guile] Patch #133. Make scm to string conversion work with non-ascii strings.
4759 Guile 2 has a completely rewritten string implementation. SWIG made some assumptions
4760 that are no longer valid as to the internals of guile's string representation.
4761
4762 2014-01-30: wsfulton
4763 [C#] Add new swigtype_inout.i library containing SWIGTYPE *& OUTPUT typemaps.
4764
4765 Example usage wrapping:
4766
4767 void f(XXX *& x) { x = new XXX(111); }
4768
4769 would be:
4770
4771 XXX x = null;
4772 f(out x);
4773 // use x
4774 x.Dispose(); // manually clear memory or otherwise leave out and leave it to the garbage collector
4775
4776 2014-01-21: ianlancetaylor
4777 [Go] Add %go_import directive.
4778
4779 2014-01-21: ianlancetaylor
4780 [Go] Add support for Go 1.3, not yet released.
4781
4782 2014-01-20: wsfulton
4783 Director exceptions (Swig::DirectorException) now derive from std::exception
4784 and hence provide the what() method. In Python and Ruby, this replaces the now
4785 deprecated DirectorException::getMessage() method.
4786
4787 2014-01-14: diorcety
4788 Patch #112 - Fix symbol resolution involving scopes that have multiple levels
4789 of typedefs - fixes some template resolutions as well as some typemap searches.
4790
4791 2014-01-11: wsfulton
4792 Fix and document the naturalvar feature override behaviour - the naturalvar
4793 feature attached to a variable name has precedence over the naturalvar
4794 feature attached to the variable's type. The overriding was not working
4795 when turning the feature off on the variable's name.
4796
4797 Fix so that any use of the naturalvar feature will override the global
4798 setting. Previously when set globally by -naturalvar or %module(naturalvar=1),
4799 use of the naturalvar feature was not always honoured.
4800
4801 2014-01-06: ianlancetaylor
4802 [Go] Fix bug that broke using directors from a thread not
4803 created by Go.
4804
4805 2013-12-24: ptomulik
4806 [Python] SF Bug #1297
4807
4808 Resolve several issues related to python imports.
4809 For example, it's now possible to import modules having the same module
4810 names, but belonging in different packages.
4811
4812 From the user's viewpoint, this patch gives a little bit more control on
4813 import statements generated by SWIG. The user may choose to use relative
4814 or absolute imports.
4815
4816 Some details:
4817 - we (still) generate import statements in the form 'import a.b.c' which
4818 corresponds to absolute imports in python3 and (the only available)
4819 ambiguous one in python2.
4820 - added -relativeimport option to use explicit relative import syntax
4821 (python3),
4822
4823 The "Python Packages" section in the documentation discusses how to work
4824 with importing packages including the new -relativeimport command line option.
4825
4826 2013-12-23: vadz
4827 [Octave, Perl, Python, R, Ruby, Tcl] Change the length of strings created from fixed-size char
4828 buffers in C code.
4829
4830 This is a potential backwards compatibility break: a "char buf[5]" containing "ho\0la" was
4831 returned as a string of length 5 before, but is returned as a string of length 2 now. Also,
4832 it was possible to assign a (non-NUL-terminated) string "hello" to such a buffer before but
4833 now this fails and only "helo" can fit.
4834
4835 Apply "char FIXSIZE[ANY]" typemaps to explicitly choose the old behaviour.
4836
4837 *** POTENTIAL INCOMPATIBILITY ***
4838
4839 2013-12-23: talby
4840 [Perl] Add support for directors.
4841
4842 2013-12-18: ianlancetaylor
4843 [Go] Don't require that Go environment variables be set
4844 when running examples or testsuite when using Go 1 or
4845 later.
4846
4847 2013-12-17: ianlancetaylor
4848 [Go] Remove -longsize option (for backward compatibility,
4849 ignore it if seen).
4850
4851 2013-12-17: ianlancetaylor
4852 [Go] Add -go-pkgpath option.
4853
4854 2013-12-16: ianlancetaylor
4855 [Go] Update for Go 1.2 release. Add support for linking
4856 SWIG code directly into executable, rather than using a
4857 shared library.
4858
4859 2013-12-13: ianlancetaylor
4860 [Go] Add SWIG source file name as comments in generated
4861 files. This can be used by Go documentation tools.
4862
4863 2013-12-12: jleveque
4864 [Lua] Fix typo (wchar instead of wchar_t) which made wchar.i
4865 for Lua useless.
4866
4867 2013-12-12: vmiklos
4868 [PHP] PHP's peculiar call-time pass-by-reference feature was
4869 deprecated in PHP 5.3 and removed in PHP 5.4, so update the REF
4870 typemaps in phppointers.i to specify pass-by-reference in the
4871 function definition. Examples/php/pointer has been updated
4872 accordingly.
4873
4874 2013-12-12: olly
4875 [PHP] The usage of $input in PHP directorout typemaps has been
4876 changed to be consistent with other languages. The typemaps
4877 provided by SWIG have been updated accordingly, but if you
4878 have written your own directorout typemaps, you'll need to
4879 update $input to &$input (or make equivalent changes).
4880
4881 *** POTENTIAL INCOMPATIBILITY ***
4882
4883 2013-11-27: vadz
4884 [C#, Java, Python] Add std_auto_ptr.i defining typemaps for returning std::auto_ptr<>.
4885
4886 2013-11-09: wsfulton
4887 [C#] Apply patch #79 from Brant Kyser
4888 - Remove using directives from the generated C# code and fully qualify the use of all .NET
4889 framework types in order to minimize potential name collisions from input files defining
4890 types, namespace, etc with the same name as .NET framework members.
4891 - Globally qualify the use of .NET framework types in the System namespace
4892 - Remove .NET 1.1 support, .NET 2 is the minimum for the C# module
4893
4894 This is a potential backwards compatibility break if code has been added relying on these using
4895 statements that used to be generated:
4896
4897 using System;
4898 using System.Runtime.InteropServices;
4899
4900 The quick fix to add these back in is to add the -DSWIG2_CSHARP command line option when
4901 executing SWIG. See CSharp.html documentation for more info.
4902
4903 *** POTENTIAL INCOMPATIBILITY ***
4904
4905 2013-11-05: wsfulton
4906 [Java] Fix some corner cases for the $packagepath/$javaclassname special variable substitution.
4907
4908 2013-11-05: wsfulton
4909 [Java] Apply patch #91 from Marvin Greenberg - Add director:except feature for improved
4910 exception handling in director methods for Java.
4911
4912 2013-10-15: vadz
4913 Allow using \l, \L, \u, \U and \E in the substitution part of %(regex:/pattern/subst/)
4914 inside %rename to change the case of the text being replaced.
4915
4916 2013-10-12: wsfulton
4917 [CFFI] Apply #96 - superclass not lispify
4918
4919 2013-10-12: wsfulton
4920 Merge in C++11 support from the gsoc2009-matevz branch where Matevz Jekovec first
4921 started the C++0x additions. Documentation of the C++11 features supported is in a
4922 new Chapter of the documentation, "SWIG and C++11" in Doc/Manual/CPlusPlus11.html.
4923
4924 2013-10-04: wsfulton
4925 Fix %naturalvar not having any affect on templated classes instantiated with an
4926 enum as the template parameter type. Problem reported by Vadim Zeitlin.
4927
4928 2013-09-20: wsfulton
4929 [Java] Fix a memory leak for the java char **STRING_ARRAY typemaps.
4930
4931 Version 2.0.12 (9 Feb 2014)
4932 ===========================
4933
4934 2014-01-16: wsfulton
4935 [PHP] Fix compilation error in ZTS mode (64 bit windows) due to incorrect placement
4936 of TSRMLS_FETCH() in SWIG_Php_GetModule() as reported by Mark Dawson-Butterworth.
4937
4938 2014-01-13: kwwette
4939 [Octave] update support to Octave version 3.8.0
4940
4941 - Octave 3.8.0 no longer defines OCTAVE_API_VERSION_NUMBER, but 3.8.1
4942 will define OCTAVE_{MAJOR,MINOR,PATCH}_VERSION instead: see
4943 http://hg.savannah.gnu.org/hgweb/octave/rev/b6b6e0dc700e
4944 So we now use a new macro SWIG_OCTAVE_PREREQ(major,minor,patch) to
4945 enable features requiring Octave version major.minor.patch or later.
4946
4947 For Octave versions prior to 3.8.1, we reconstruct values for
4948 OCTAVE_{MAJOR,MINOR,PATCH}_VERSION based on OCTAVE_API_VERSION_NUMBER,
4949 extracted from Octave's ChangeLogs. An additional hack is needed to
4950 distinguish between Octave <= 3.2.x and 3.8.0, neither of which define
4951 OCTAVE_API_VERSION_NUMBER.
4952
4953 - Octave 3.8.0 deprecates symbol_table::varref(), so remove its use
4954 for this and future versions of Octave.
4955
4956 - Octave 3.8.0 removes octave_value::is_real_nd_array(), used in
4957 octave_swig_type::dims(). Its use is not required here, so remove it.
4958
4959 - Retested against Octave versions 3.0.5, 3.2.4, 3.4.3, 3.6.4, and 3.8.0.
4960
4961 - Updated Octave documentation with tested Octave versions, and added a
4962 warning against using versions <= 3.x.x, which are no longer tested.
4963
4964 2013-12-22: wsfulton
4965 C++11 support for new versions of erase and insert in the STL containers.
4966
4967 The erase and insert methods in the containers use const_iterator instead
4968 of iterator in C++11. There are times when the methods wrapped must match
4969 the parameters exactly. Specifically when full type information for
4970 template types is missing or SWIG fails to look up the type correctly,
4971 for example:
4972
4973 %include <std_vector.i>
4974 typedef float Real;
4975 %template(RealVector) std::vector<Real>;
4976
4977 SWIG does not find std::vector<Real>::iterator because %template using
4978 typedefs does not always work and so SWIG doesn't know if the type is
4979 copyable and so uses SwigValueWrapper<iterator> which does
4980 not support conversion to another type (const_iterator). This resulted
4981 in compilation errors when using the C++11 version of the containers.
4982
4983 Closes #73
4984
4985 2013-10-17: wsfulton
4986 [R] Fix SF #1340 - Visual Studio compile error in C++ wrappers due to #include <exception>
4987 within extern "C" block.
4988
4989 2013-10-17: wsfulton
4990 [Python] Fix SF #1345 - Missing #include <stddef.h> for offsetof when using -builtin.
4991
4992 2013-10-12: wsfulton
4993 [Lua] Apply #92 - missing return statements for SWIG_Lua_add_namespace_details()
4994 and SWIG_Lua_namespace_register().
4995
4996 Version 2.0.11 (15 Sep 2013)
4997 ============================
4998
4999 2013-09-15: wsfulton
5000 [R] Fix attempt to free a non-heap object in OUTPUT typemaps for:
5001 unsigned short *OUTPUT
5002 unsigned long *OUTPUT
5003 signed long long *OUTPUT
5004 char *OUTPUT
5005 signed char*OUTPUT
5006 unsigned char*OUTPUT
5007
5008 2013-09-12: wsfulton
5009 [Lua] Pull Git patch #62.
5010 1) Static members and static functions inside class can be accessed as
5011 ModuleName.ClassName.FunctionName (MemberName respectively). Old way such as
5012 ModuleName.ClassName_FunctionName still works.
5013 2) Same goes for enums inside classes: ModuleName.ClassName.EnumValue1 etc.
5014
5015 2013-09-12: wsfulton
5016 [UTL] Infinity is now by default an acceptable value for type 'float'. This fix makes
5017 the handling of type 'float' and 'double' the same. The implementation requires the
5018 C99 isfinite() macro, or otherwise some platform dependent equivalents, to be available.
5019
5020 Users requiring the old behaviour of not accepting infinity, can define a 'check' typemap
5021 wherever a float is used, such as:
5022
5023 %typemap(check,fragment="<float.h>") float, const float & %{
5024 if ($1 < -FLT_MAX || $1 > FLT_MAX) {
5025 SWIG_exception_fail(SWIG_TypeError, "Overflow in type float");
5026 }
5027 %}
5028
5029 *** POTENTIAL INCOMPATIBILITY ***
5030
5031 2013-08-30: wsfulton
5032 [Lua] Pull Git patch #81: Include Lua error locus in SWIG error messages.
5033 This is standard information in Lua error messages, and makes it much
5034 easier to find bugs.
5035
5036 2013-08-29: wsfulton
5037 Pull Git patch #75: Handle UTF-8 files with BOM at beginning of file. Was giving an
5038 'Illegal token' syntax error.
5039
5040 2013-08-29: wsfulton
5041 [C#] Pull Git patch #77: Allow exporting std::map using non-default comparison function.
5042
5043 2013-08-28: wsfulton
5044 [Python] %implicitconv is improved for overloaded functions. Like in C++, the methods
5045 with the actual types are considered before trying implicit conversions. Example:
5046
5047 %implicitconv A;
5048 struct A {
5049 A(int i);
5050 };
5051 class CCC {
5052 public:
5053 int xx(int i) { return 11; }
5054 int xx(const A& i) { return 22; }
5055 };
5056
5057 The following python code:
5058
5059 CCC().xx(-1)
5060
5061 will now return 11 instead of 22 - the implicit conversion is not done.
5062
5063 2013-08-23: olly
5064 [Python] Fix clang++ warning in generated wrapper code.
5065
5066 2013-08-16: wsfulton
5067 [Python] %implicitconv will now accept None where the implicit conversion takes a C/C++ pointer.
5068 Problem highlighted by Bo Peng. Closes SF patch #230.
5069
5070 2013-08-07: wsfulton
5071 [Python] SF Patch #326 from Kris Thielemans - Remove SwigPyObject_print and SwigPyObject_str and
5072 make the generated wrapper use the default python implementations, which will fall back to repr
5073 (for -builtin option).
5074
5075 Advantages:
5076 - it avoids the swig user having to jump through hoops to get print to work as expected when
5077 redefining repr/str slots.
5078 - typing the name of a variable on the python prompt now prints the result of a (possibly redefined)
5079 repr, without the swig user having to do any extra work.
5080 - when redefining repr, the swig user doesn't necessarily have to redefine str as it will call the
5081 redefined repr
5082 - the behaviour is exactly the same as without the -builtin option while requiring no extra work
5083 by the user (aside from adding the %feature("python:slot...) statements of course)
5084
5085 Disadvantage:
5086 - default str() will give different (but clearer?) output on swigged classes
5087
5088 2013-07-30: wsfulton
5089 [Python, Ruby] Fix #64 #65: Missing code in std::multimap wrappers. Previously an instantiation
5090 of a std::map was erroneously required in addition to an instantiation of std::multimap with the
5091 same template parameters to prevent compilation errors for the wrappers of a std::multimap.
5092
5093 2013-07-14: joequant
5094 [R] Change types file to allow for SEXP return values
5095
5096 2013-07-05: wsfulton
5097 [Python] Add %pythonbegin directive which works like %pythoncode, except the specified code is
5098 added at the beginning of the generated .py file. This is primarily needed for importing from
5099 __future__ statements required to be at the very beginning of the file. Example:
5100
5101 %pythonbegin %{
5102 from __future__ import print_function
5103 print("Loading", "Whizz", "Bang", sep=' ... ')
5104 %}
5105
5106 2013-07-01: wsfulton
5107 [Python] Apply SF patch #340 - Uninitialized variable fix in SWIG_Python_NonDynamicSetAttr
5108 when using -builtin.
5109
5110 2013-07-01: wsfulton
5111 [Python, Ruby, Ocaml] Apply SF patch #341 - fix a const_cast in generated code that was generating
5112 a <:: digraph when using the unary scope operator (::) (global scope) in a template type.
5113
5114 2013-07-01: wsfulton
5115 [Python] Add SF patch #342 from Christian Delbaere to fix some director classes crashing on
5116 object deletion when using -builtin. Fixes SF bug #1301.
5117
5118 2013-06-11: wsfulton
5119 [Python] Add SWIG_PYTHON_INTERPRETER_NO_DEBUG macro which can be defined to use the Release version
5120 of the Python interpreter in Debug builds of the wrappers. The Visual Studio .dsp example
5121 files have been modified to use this so that Debug builds will now work without having
5122 to install or build a Debug build of the interpreter.
5123
5124 2013-06-07: wsfulton
5125 [Ruby] Git issue #52. Fix regression with missing rb_complex_new function for Ruby
5126 versions prior to 1.9 using std::complex wrappers if just using std::complex as an output type.
5127 Also fix the Complex helper functions external visibility (to static by default).
5128
5129 2013-06-04: olly
5130 [PHP] Fix SWIG_ZTS_ConvertResourcePtr() not to dereference NULL
5131 if the type lookup fails.
5132
5133 Version 2.0.10 (27 May 2013)
5134 ============================
5135
5136 2013-05-25: wsfulton
5137 [Python] Fix Python 3 inconsistency when negative numbers are passed
5138 where a parameter expects an unsigned C type. An OverFlow error is
5139 now consistently thrown instead of a TypeError.
5140
5141 2013-05-25: Artem Serebriyskiy
5142 SVN Patch ticket #338 - fixes to %attribute macros for template usage
5143 with %arg.
5144
5145 2013-05-19: wsfulton
5146 Fix ccache-swig internal error bug due to premature file cleanup.
5147
5148 Fixes SF bug 1319 which shows up as a failure in the ccache tests on
5149 Debian 64 bit Wheezy, possibly because ENABLE_ZLIB is defined.
5150
5151 This is a corner case which will be hit when the maximum number of files
5152 in the cache is set to be quite low (-F option), resulting in a cache miss.
5153
5154 2013-05-09: kwwette
5155 [Octave] Fix bugs in Octave module loading:
5156 - fix a memory leak in setting of global variables
5157 - install functions only once, to speed up module loads
5158
5159 2013-04-28: gjanssens
5160 [Guile] Updates in guile module:
5161 - Add support for guile 2.0
5162 - Drop support for guile 1.6
5163 - Drop support for generating wrappers using guile's gh interface.
5164 All generated wrappers will use the scm interface from now on.
5165 - Deprecate -gh and -scm options. They are no longer needed.
5166 A warning will be issued when these options are still used.
5167 - Fix all tests and examples to have a successful travis test
5168
5169 2013-04-18: wsfulton
5170 Apply Patch #36 from Jesus Lopez to add support for $descriptor() special variable macro expansion
5171 in fragments. For example:
5172
5173 %fragment("nameDescriptor", "header")
5174 %{
5175 static const char *nameDescriptor = "$descriptor(Name)";
5176 %}
5177
5178 which will generate into the wrapper if the fragment is used:
5179
5180 static const char *nameDescriptor = "SWIGTYPE_Name";
5181
5182 2013-04-18: wsfulton
5183 Fix SF Bug #428 - Syntax error when preprocessor macros are defined inside of enum lists, such as:
5184
5185 typedef enum {
5186 eZero = 0
5187 #define ONE 1
5188 } EFoo;
5189
5190 The macros are silently ignored.
5191
5192 2013-04-17: wsfulton
5193 [C#] Pull patch #34 from BrantKyser to fix smart pointers in conjunction with directors.
5194
5195 2013-04-15: kwwette
5196 [Octave] Fix bugs in output of cleanup code.
5197 - Cleanup code is now written also after the "fail:" label, so it will be called if
5198 a SWIG_exception is raised by the wrapping function, consistent with other modules.
5199 - Octave module now also recognises the "$cleanup" special variable, if needed.
5200
5201 2013-04-08: kwwette
5202 Add -MP option to SWIG for generating phony targets for all dependencies.
5203 - Prevents make from complaining if header files have been deleted before
5204 the dependency file has been updated.
5205 - Modelled on similar option in GCC.
5206
5207 2013-04-09: olly
5208 [PHP] Add missing directorin typemap for char* and char[] which
5209 fixes director_string testcase failure.
5210
5211 2013-04-05: wsfulton
5212 [Ruby] SF Bug #1292 - Runtime fixes for Proc changes in ruby-1.9 when using STL
5213 wrappers that override the default predicate, such as:
5214
5215 %template(Map) std::map<swig::LANGUAGE_OBJ, swig::LANGUAGE_OBJ, swig::BinaryPredicate<> >;
5216
5217 2013-04-05: wsfulton
5218 [Ruby] SF Bug #1159 - Correctly check rb_respond_to call return values to fix some
5219 further 1.9 problems with functors and use of Complex wrappers.
5220
5221 2013-04-02: wsfulton
5222 [Ruby] Runtime fixes for std::complex wrappers for ruby-1.9 - new native Ruby complex numbers are used.
5223
5224 2013-03-30: wsfulton
5225 [Ruby] Fix seg fault when using STL containers of generic Ruby types, GC_VALUE or LANGUAGE_OBJECT,
5226 on exit of the Ruby interpreter. More frequently observed in ruby-1.9.
5227
5228 2013-03-29: wsfulton
5229 [Ruby] Fix delete_if (reject!) for the STL container wrappers which previously would
5230 sometimes seg fault or not work.
5231
5232 2013-03-25: wsfulton
5233 [Python] Fix some undefined behaviour deleting slices in the STL containers.
5234
5235 2013-03-19: wsfulton
5236 [C#, Java, D] Fix seg fault in SWIG using directors when class and virtual method names are
5237 the same except being in different namespaces when the %nspace feature is not being used.
5238
5239 2013-02-19: kwwette
5240 Fix bug in SWIG's handling of qualified (e.g. const) variables of array type. Given the typedef
5241 a(7).q(volatile).double myarray // typedef volatile double[7] myarray;
5242 the type
5243 q(const).myarray // const myarray
5244 becomes
5245 a(7).q(const volatile).double // const volatile double[7]
5246 Previously, SwigType_typedef_resolve() produces the type
5247 q(const).a(7).q(volatile).double // non-sensical type
5248 which would never match %typemap declarations, whose types were parsed correctly.
5249 Add typemap_array_qualifiers.i to the test suite which checks for the correct behaviour.
5250
5251 2013-02-18: wsfulton
5252 Deprecate typedef names used as constructor and destructor names in %extend. The real
5253 class/struct name should be used.
5254
5255 typedef struct tagEStruct {
5256 int ivar;
5257 } EStruct;
5258
5259 %extend tagEStruct {
5260 EStruct() // illegal name, should be tagEStruct()
5261 {
5262 EStruct *s = new EStruct();
5263 s->ivar = ivar0;
5264 return s;
5265 }
5266 ~EStruct() // illegal name, should be ~tagEStruct()
5267 {
5268 delete $self;
5269 }
5270 }
5271
5272 For now these trigger a warning:
5273
5274 extend_constructor_destructor.i:107: Warning 522: Use of an illegal constructor name 'EStruct' in
5275 %extend is deprecated, the constructor name should be 'tagEStruct'.
5276 extend_constructor_destructor.i:111: Warning 523: Use of an illegal destructor name 'EStruct' in
5277 %extend is deprecated, the destructor name should be 'tagEStruct'.
5278
5279 These %extend destructor and constructor names were valid up to swig-2.0.4, however swig-2.0.5 ignored
5280 them altogether for C code as reported in SF bug #1306. The old behaviour of using them has been
5281 restored for now, but is officially deprecated. This does not apply to anonymously defined typedef
5282 classes/structs such as:
5283
5284 typedef struct {...} X;
5285
5286 2013-02-17: kwwette
5287 When generating functions provided by %extend, use "(void)" for no-argument functions
5288 instead of "()". This prevents warnings when compiling with "gcc -Wstrict-prototypes".
5289
5290 2013-02-17: kwwette
5291 [Octave] Minor fix to autodoc generation: get the right type for functions returning structs.
5292
5293 2013-02-15: wsfulton
5294 Deprecate typedef names used in %extend that are not the real class/struct name. For example:
5295
5296 typedef struct StructBName {
5297 int myint;
5298 } StructB;
5299
5300 %extend StructB {
5301 void method() {}
5302 }
5303
5304 will now trigger a warning:
5305
5306 swig_extend.i:19: Warning 326: Deprecated %extend name used - the struct name StructBName
5307 should be used instead of the typedef name StructB.
5308
5309 This is only partially working anyway (the %extend only worked if placed after the class
5310 definition).
5311
5312 2013-02-09: wsfulton
5313 [CFFI] Apply patch #22 - Fix missing package before &body
5314
5315 2013-01-29: wsfulton
5316 [Java] Ensure 'javapackage' typemap is used as it stopped working from version 2.0.5.
5317
5318 2013-01-28: wsfulton
5319 [Python] Apply patch SF #334 - Fix default value conversions "TRUE"->True, "FALSE"->False.
5320
5321 2013-01-28: wsfulton
5322 [Java] Apply patch SF #335 - Truly ignore constructors in directors with %ignore.
5323
5324 2013-01-18: Brant Kyser
5325 [Java] Patch #15 - Allow the use of the nspace feature without the -package commandline option.
5326 This works as long and the new jniclasspackage pragma is used to place the JNI intermediate class
5327 into a package and the nspace feature is used to place all exposed types into a package.
5328
5329 2013-01-15: wsfulton
5330 Fix Visual Studio examples to work when SWIG is unzipped into a directory containing spaces.
5331
5332 2013-01-15: wsfulton
5333 [C#] Fix cstype typemap lookup for member variables so that a fully qualified variable name
5334 matches. For example:
5335 %typemap(cstype) bool MVar::mvar "MyBool"
5336 struct MVar {
5337 bool mvar;
5338 };
5339
5340 2013-01-11: Brant Kyser
5341 [Java, C#, D] SF Bug #1299 - Fix generated names for when %nspace is used on
5342 classes with the same name in two different namespaces.
5343
5344 2013-01-11: Vladimir Kalinin
5345 [C#] Add support for csdirectorin 'pre', 'post' and 'terminator' attributes.
5346
5347 2013-01-08: olly
5348 [PHP] Fix to work with a ZTS build of PHP (broken in 2.0.7).
5349
5350 2013-01-07: olly
5351 Fix bashism in configure, introduced in 2.0.9.
5352
5353 2013-01-06: wsfulton
5354 Pull patch #4 from ptomulik to fix SF Bug #1296 - Fix incorrect warning for virtual destructors
5355 in templates, such as:
5356 Warning 521: Illegal destructor name B< A >::~B(). Ignored.
5357
5358 2013-01-05: wsfulton
5359 [Python] Pull patch #3 from ptomulik to fix SF Bug #1295 - standard exceptions as
5360 classes using the SWIG_STD_EXCEPTIONS_AS_CLASSES macro.
5361
5362 2013-01-04: wsfulton
5363 [Java] Pull patch #2 from BrantKyser to fix SF Bug #1283 - fix smart pointers in conjuction
5364 with directors.
5365
5366 2013-01-03: wsfulton
5367 [Java] Pull patch #1 from BrantKyser to fix SF Bug #1278 - fix directors and nspace feature when
5368 multilevel namespaces are used.
5369
5370 Version 2.0.9 (16 December 2012)
5371 ================================
5372
5373 2012-12-16: wsfulton
5374 Fix garbage line number / empty file name reporting for some missing
5375 '}' or ')' error messages.
5376
5377 2012-12-15: kkaempf
5378 [Ruby] Apply patch 3530444, Class#methods and Class#constants returns array of
5379 symbols in Ruby 1.9+
5380
5381 2012-12-14: kkaempf
5382 [Ruby] Apply patch 3530439 and finally replace all occurrences of the STR2CSTR() macro
5383 with StringValuePtr(). STR2CSTR was deprecated since years and got removed in Ruby 1.9
5384
5385 2012-12-14: kkaempf
5386 [Ruby] Applied patches #3530442 and 3530443 to adapt compile and runtime include
5387 paths to match Ruby 1.9+
5388
5389 2012-12-14: wsfulton
5390 [CFFI] Fix #3161614 - Some string constants are incorrect
5391
5392 2012-12-13: wsfulton
5393 [CFFI] Fix #3529690 - Fix incorrect constant names.
5394
5395 2012-12-12: drjoe
5396 [R] add fix to finalizer that was missed earlier
5397
5398 2012-12-11: wsfulton
5399 [Python] Apply patch #3590522 - fully qualified package paths for Python 3 even if a module is in the
5400 same package.
5401
5402 2012-12-08: wsfulton
5403 [Python] Bug #3563647 - PyInt_FromSize_t unavailable prior to Python 2.5 for unsigned int types.
5404
5405 2012-12-08: wsfulton
5406 [Perl] Fix bug #3571361 - C++ comment in C wrappers.
5407
5408 2012-12-07: wsfulton
5409 [C#] Apply patch #3571029 which adds missing director support for const unsigned long long &.
5410
5411 2012-11-28: kwwette
5412 [Octave] Simplified module loading: now just the syntax
5413 $ example;
5414 is accepted, which loads functions globally but constants and variables relative to the current scope.
5415 This make module loading behaviour reliably consistent, and reduces problems when loading modules which
5416 depend on other modules which may not have been previously loaded.
5417
5418 2012-11-27: wsfulton
5419 [cffi] Fix junk output when wrapping single character literal constants.
5420
5421 2012-11-17: wsfulton
5422 [Tcl, Modula3] Add missing support for -outdir.
5423
5424 2012-11-17: wsfulton
5425 Fix segfaults when using filename paths greater than 1024 characters in length.
5426
5427 2012-11-14: wsfulton
5428 [ccache-swig] Apply patch #3586392 from Frederik Deweerdt to fix some error cases - incorrectly using
5429 memory after it has been deleted.
5430
5431 2012-11-09: vzeitlin
5432 [Python] Fix overflow when passing values greater than LONG_MAX from Python 3 for parameters with unsigned long C type.
5433
5434 2012-11-09: wsfulton
5435 Fix some feature matching issues for implicit destructors and implicit constructors and implicit
5436 copy constructors added with %copyctor. Previously a feature for these had to be fully qualified
5437 in order to match. Now the following will also match:
5438
5439 %feature("xyz") ~XXX();
5440 struct XXX {};
5441
5442 2012-11-09: wsfulton
5443 Further consistency in named output typemap lookups for implicit constructors and destructors and
5444 implicit copy constructors added with %copyctor. Previously only the fully qualified name was being
5445 used, now the unqualified name will also be used. For example, previously:
5446
5447 example.i:38: Searching for a suitable 'out' typemap for: void Space::More::~More
5448 Looking for: void Space::More::~More
5449 Looking for: void
5450
5451 Now the unqualified name is also used:
5452
5453 example.i:38: Searching for a suitable 'out' typemap for: void Space::More::~More
5454 Looking for: void Space::More::~More
5455 Looking for: void ~More
5456 Looking for: void
5457
5458 2012-11-02: wsfulton
5459 Fix some subtle named output typemap lookup misses, the fully qualified name was not always being
5460 used for variables, for example:
5461
5462 struct Glob {
5463 int MyVar;
5464 };
5465
5466 Previously the search rules (as shown by -debug-tmsearch) for the getter wrapper were:
5467
5468 example.i:44: Searching for a suitable 'out' typemap for: int MyVar
5469 Looking for: int MyVar
5470 Looking for: int
5471
5472 Now the scope is named correctly:
5473
5474 example.i:44: Searching for a suitable 'out' typemap for: int Glob::MyVar
5475 Looking for: int Glob::MyVar
5476 Looking for: int MyVar
5477 Looking for: int
5478
5479 2012-10-26: wsfulton
5480 Fix director typemap searching so that a typemap specified with a name will be correctly matched. Previously
5481 the name was ignored during the typemap search. Applies to the following list of typemaps:
5482 directorout, csdirectorout, cstype, imtype, ctype, ddirectorout, dtype, gotype, jtype, jni, javadirectorout.
5483
5484 2012-10-11: wsfulton
5485 Most of the special variables available for use in %exception are now also available for expansion in
5486 %extend blocks. These are: $name $symname $overname $decl $fulldecl $parentclassname $parentclasssymname, see docs
5487 on "Class extension" in SWIGPlus.html. Patch based on submission from Kris Thielemans.
5488
5489 2012-10-10: wsfulton
5490 Additional new special variables in %exception are expanded as follows:
5491 $parentclassname - The parent class name (if any) for a method.
5492 $parentclasssymname - The target language parent class name (if any) for a method.
5493
5494 2012-10-08: iant
5495 [Go] Generating Go code now requires using the -intgosize option to
5496 indicate the size of the 'int' type in Go. This is because the
5497 size of the type is changing from Go 1.0 to Go 1.1 for x86_64.
5498
5499 2012-09-14: wsfulton
5500 Add new warning if the empty template instantiation is used as a base class, for example:
5501
5502 template <typename T> class Base {};
5503 %template() Base<int>;
5504 class Derived : public Base<int> {};
5505
5506 gives the following warning instead of silently ignoring the base:
5507
5508 cpp_inherit.i:52: Warning 401: Base class 'Base< int >' has no name as it is an empty template instantiated with '%template()'. Ignored.
5509 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.
5510
5511
5512 2012-09-11: wsfulton
5513 [Java] Fix #3535304 - Direct use of a weak global reference in directors
5514 sometimes causing seg faults especially on Android.
5515
5516 2012-09-06: wsfulton
5517 [Java] Fix (char *STRING, size_t LENGTH) typemaps to accept NULL string.
5518
5519 2012-08-26: drjoe
5520 [R] make ExternalReference slot ref to contain reference
5521
5522 2012-08-26: drjoe
5523 [R] fix Examples/Makefile to use C in $(CC) rather than $(CXX)
5524
5525 Version 2.0.8 (20 August 2012)
5526 ==============================
5527
5528 2012-08-15: wsfulton
5529 [Perl] Add size_type, value_type, const_reference to the STL containers.
5530
5531 2012-08-15: wsfulton
5532 [Python] Add discard and add methods to std::set wrappers so that pyabc.i can be used ensuring
5533 MutableSet is a valid abstract base class for std::set. As reported by Alexey Sokolov.
5534 Similarly for std::multiset.
5535
5536 2012-08-15: wsfulton
5537 [Python] Fix #3541744 - Missing PyInt_FromSize_t calls for Python 3.
5538
5539 2012-08-13: wsfulton
5540 [Java] Patch from David Baum to add the assumeoverride feature for Java directors to
5541 improve performance when all overridden methods can be assumed to be overridden.
5542
5543 2012-08-05: wsfulton
5544 [Python] #3530021 Fix unused variable warning.
5545
5546 2012-08-05: wsfulton
5547 [C#] Fix #3536360 - Invalid code sometimes being generated for director methods
5548 with many arguments.
5549
5550 2012-08-05: wsfulton
5551 [Perl] #3545877 - Don't undefine bool if defined by C99 stdbool.h - problem using
5552 Perl 5.16 and later.
5553
5554 2012-08-04: wsfulton
5555 Remove incorrect warning (314) about target language keywords which were triggered
5556 by using declarations and using directives. For example 'string' is a keyword in C#:
5557 namespace std { class string; }
5558 using std::string;
5559
5560 2012-07-21: wsfulton
5561 Fix display of pointers in various places on 64 bit systems - only 32 bits were being shown.
5562
5563 2012-07-21: wsfulton
5564 Fix gdb debugger functions 'swigprint' and 'locswigprint' to display to the gdb output window
5565 rather than stdout. This fixes display problems in gdbtui and the ensures the output
5566 appears where expected in other gdb based debuggers such as Eclipse CDT.
5567
5568 2012-07-20: kwwette
5569 [Octave] segfault-on-exit prevention hack now preserves exit status, and uses C99 _Exit().
5570
5571 2012-07-02: wsfulton
5572 Fix Debian bug http://bugs.debian.org/672035, typemap copy failure - regression introduced
5573 in swig-2.0.5:
5574 %include<stl.i>
5575 using std::pair;
5576 %template(StrPair) pair<std::string, std::string>;
5577
5578 2012-07-02: wsfulton
5579 Fix using declarations combined with using directives with forward class declarations so that
5580 types are correctly found in scope for templates. Example:
5581
5582 namespace Outer2 {
5583 namespace Space2 {
5584 template<typename T> class Thing2;
5585 }
5586 }
5587 using namespace Outer2;
5588 using Space2::Thing2;
5589 template<typename T> class Thing2 {};
5590 // STILL BROKEN void useit2(Thing2<int> t) {}
5591 void useit2a(Outer2::Space2::Thing2<int> t) {}
5592 void useit2b(::Outer2::Space2::Thing2<int> t) {}
5593 void useit2c(Space2::Thing2<int> t) {}
5594 namespace Outer2 {
5595 void useit2d(Space2::Thing2<int> t) {}
5596 }
5597
5598 %template(Thing2Int) Thing2<int>;
5599
5600
5601 2012-06-30: wsfulton
5602 Fix template namespace problems for symbols declared with a forward class declarations, such as:
5603
5604 namespace Space1 {
5605 namespace Space2 {
5606 template<typename T> struct YYY;
5607 }
5608 template<typename T> struct Space2::YYY {
5609 T yyy(T h) {
5610 return h;
5611 }
5612 };
5613 void testYYY1(Space1::Space2::YYY<int> yy) {}
5614 void testYYY2(Space2::YYY<int> yy) {}
5615 void testYYY3(::Space1::Space2::YYY<int> yy) {}
5616 }
5617
5618 %template(YYYInt) Space1::Space2::YYY<int>;
5619
5620 2012-06-30: wsfulton
5621 Fix namespace problems for symbols declared with a forward class declarations, such as:
5622
5623 namespace Space1 {
5624 namespace Space2 {
5625 struct XXX;
5626 struct YYY;
5627 }
5628
5629 struct Space2::YYY {};
5630 struct Space1::Space2::XXX {};
5631
5632 void testXXX2(Space2::XXX xx) {}
5633 void testYYY2(Space2::YYY yy) {}
5634 }
5635
5636 where xx and yy were not recognised as the proxy classes XXX and YYY.
5637
5638 2012-06-30: wsfulton
5639 Fix using declarations combined with using directives with forward class declarations so that
5640 types are correctly found in scope.
5641
5642 namespace Outer2 {
5643 namespace Space2 {
5644 class Thing2;
5645 }
5646 }
5647 using namespace Outer2;
5648 using Space2::Thing2;
5649 class Thing2 {};
5650 // None of the methods below correctly used the Thing2 proxy class
5651 void useit2(Thing2 t) {}
5652 void useit2a(Outer2::Space2::Thing2 t) {}
5653 void useit2b(::Outer2::Space2::Thing2 t) {}
5654 void useit2c(Space2::Thing2 t) {}
5655 namespace Outer2 {
5656 void useit2d(Space2::Thing2 t) {}
5657 }
5658
5659 2012-06-25: wsfulton
5660 Fix using declarations combined with using directives so that types are correctly found in scope.
5661 Example:
5662
5663 namespace Outer2 {
5664 namespace Space2 {
5665 class Thing2 {};
5666 }
5667 }
5668 using namespace Outer2; // using directive
5669 using Space2::Thing2; // using declaration
5670 void useit2(Thing2 t) {}
5671
5672 Similarly for templated classes.
5673
5674 2012-05-29: wsfulton
5675 Fix #3529601 - seg fault when a protected method has the "director"
5676 feature but the parent class does not. Also fix similar problems with
5677 the allprotected feature.
5678
5679 2012-05-28: wsfulton
5680 Fix seg fault when attempting to warn about an illegal destructor - #3530055, 3530078 and #3530118.
5681
5682 Version 2.0.7 (26 May 2012)
5683 ===========================
5684 2012-05-26: wsfulton
5685 std::string typemap modifications so they can be used with %apply for other string
5686 classes.
5687
5688 2012-05-25: wsfulton
5689 [Lua] Fixes for -external-runtime to work again.
5690
5691 2012-05-22: szager
5692 [python] Disambiguate SWIG_From_unsigned_SS_int and SWIG_From_unsigned_SS_long.
5693
5694 2012-05-18: olly
5695 [PHP] Fix getters for template members. (SF#3428833, SF#3528035)
5696
5697 2012-05-14: wsfulton
5698 Fix some language's std::map wrappers to recognise difference_type, size_type, key_type
5699 and mapped_type.
5700
5701 2012-05-14: kwwette (signed off by xavier98)
5702 [Octave] Prevent Octave from seg-faulting at exit when SWIG
5703 modules are loaded, due to bugs in Octave's cleanup code:
5704 * Wrapping functions now declared with Octave DEFUN_DLD macro,
5705 and loaded through Octave's dynamic module loader
5706 * Global variables of swigref type are now assigned a new()
5707 copy of the swigref class, to prevent double-free errors
5708 * SWIG module at-exit cleanup function now created in Octave
5709 through eval(), so not dependent on loaded .oct library
5710 * For Octave versions 3.1.* to 3.3.*, register C-level at-exit
5711 function which terminates Octave immediately (with correct
5712 status code) without performing memory cleanup. This function
5713 can be controlled with macros in Lib/octave/octruntime.swg
5714
5715 [Octave] New syntax for determing whether SWIG module should be
5716 loaded globally or non-globally. To load module "example" globally,
5717 type the module name
5718 $ example;
5719 as before; to load module non-globally, assign it to a variable:
5720 $ example = example;
5721 or
5722 $ ex = example;
5723 for a shorter (local) module name. -global/-noglobal command-line
5724 options and module command line are deprecated. Added usage info
5725 to module, so typing
5726 $ help example
5727 or incorrect usage should display proper usage, with examples.
5728
5729 *** POTENTIAL INCOMPATIBILITY ***
5730
5731 2012-05-12: olly
5732 [PHP] Fix memory leak in code generated for a callback. Patch from
5733 SF bug #3510806.
5734
5735 2012-05-12: olly
5736 [PHP] Avoid using zend_error_noreturn() as it doesn't work with all
5737 builds of PHP (SF bug #3166423). Instead we now wrap it in a
5738 SWIG_FAIL() function which we annotate as "noreturn" for GCC to
5739 avoids warnings. This also reduces the size of the compiled
5740 wrapper (e.g. the stripped size is reduced by 6% for Xapian's PHP
5741 bindings).
5742
5743 2012-05-11: wsfulton
5744 [Java] SF patch #3522855 Fix unintended uninitialised memory access in OUTPUT typemaps.
5745
5746 2012-05-11: wsfulton
5747 [Java] SF patch #3522674 Fix possible uninitialised memory access in char **STRING_OUT
5748 typemap.
5749
5750 2012-05-11: wsfulton
5751 [Java] SF patch #3522611 Fix uninitialised size regression in char **STRING_ARRAY
5752 introduced in swig-2.0.6.
5753
5754 2012-05-11: wsfulton
5755 SF bug #3525050 - Fix regression introduced in swig-2.0.5 whereby defining one typemap
5756 method such as an 'out' typemap may hide another typemap method such as an 'in' typemap -
5757 only occurs when the type is a template type where the template parameters are the same
5758 via a typedef.
5759
5760 2012-05-10: olly
5761 [PHP] Fix the constant typemaps for SWIGTYPE, etc - previously
5762 these used the wrong name for renamed constants. Add
5763 autodoc_runme.php to the testsuite as a regression test for this.
5764
5765 2012-05-02: ianlancetaylor
5766 [Go] Remove compatibility support for gccgo 4.6. Using
5767 SWIG with gccgo will now require gccgo 4.7. Using SWIG
5768 with the more commonly used gc compiler is unaffected.
5769
5770 2012-05-01: wsfulton
5771 Fix generated code for C forward enum declarations in some languages.
5772
5773 Version 2.0.6 (30 April 2012)
5774 =============================
5775
5776 2012-04-25: wsfulton
5777 [Lua] Fix uninitialised variable in SWIGTYPE **OUTPUT typemaps as reported by Jim Anderson.
5778
5779 2012-04-28: wsfulton
5780 [Python] Fix compilation errors when wrapping STL containers on Mac OS X and possibly other systems.
5781
5782 2012-04-28: wsfulton
5783 [Java] Patch 3521811 from Leo Davis - char **STRING_ARRAY typemaps fixed to handle
5784 null pointers.
5785
5786 Version 2.0.5 (19 April 2012)
5787 =============================
5788
5789 2012-04-14: wsfulton
5790 [Lua] Apply patch #3517435 from Miles Bader - prefer to use Lua_pushglobaltable
5791
5792 2012-04-14: wsfulton
5793 [Ruby] Apply patch #3517769 from Robin Stocker to fix compile error on MacRuby using RSTRING_PTR.
5794
5795 2012-04-13: wsfulton
5796 Apply patch #3511009 from Leif Middelschulte for slightly optimised char * variable wrappers.
5797
5798 2012-04-13: wsfulton
5799 [Lua] Apply #3219676 from Shane Liesegang which adds:
5800 - support for %factory
5801 - a __tostring method
5802 - a __disown method
5803
5804 2012-04-13: wsfulton
5805 [Xml] Apply #3513569 which adds a catchlist to the xml output.
5806
5807 2012-04-05: olly
5808 [Lua] Add support for Lua 5.2 (patch SF#3514593 from Miles Bader)
5809
5810 2012-03-26: xavier98
5811 [octave] Apply patch #3425993 from jgillis: add extra logic to the octave_swig_type::dims(void) method: it checks if the user has defined a __dims__ method and uses this in stead of returning (1,1)
5812 [octave] Apply patch #3424833 from jgillis: make is_object return true for swig types
5813
5814 2012-03-24: wsfulton
5815 [D] Apply #3502431 to fix duplicate symbols in multiple modules.
5816
5817 2012-03-21: wsfulton
5818 Fix #3494791 - %$isglobal for %rename matching.
5819
5820 2012-03-20: wsfulton
5821 Fix #3487706 and #3391906 - missing stddef.h include for ptrdiff_t when using %import
5822 for STL containers and compiling with g++-4.6. An include of stddef.h is now only
5823 generated when SWIG generates STL helper templates which require ptrdiff_t. If you
5824 were previously relying on "#include <stddef.h>" always being generated when using a
5825 %include of an STL header, you may now need to add this in manually.
5826
5827 2012-03-16: wsfulton
5828 Apply patch #3392264 from Sebastien Bine to parse (unsigned) long long types in enum value assignment.
5829
5830 2012-03-16: wsfulton
5831 Apply patch #3505530 from Karl Wette to allow custom allocators in STL string classes for the UTL languages.
5832
5833 2012-03-13: wsfulton
5834 Apply patch #3468362 from Karl Wette to fix %include inside %define.
5835
5836 2012-03-13: wsfulton
5837 [Python, Ruby, Octave, R] Fix #3475492 - iterating through std::vector wrappers of enumerations.
5838
5839 2012-02-27: xavier98 (patches from Karl Wette)
5840 [Octave] Use -globals . to load global variables in module namespace
5841 [Octave] Comment declaration of unimplemented function swig_register_director
5842 [Octave] Fix OCTAVE_PATH in octave Makefiles
5843 [Octave] Add support for std::list - fix li_std_containers_int test
5844 [Octave] Fix imports test
5845
5846 2012-02-16: wsfulton
5847 [Java] Make generated support functions in arrays_java.i static so that generated code
5848 from multiple instances of SWIG can be compiled and linked together - problem reported by
5849 Evan Krause.
5850
5851 2012-01-24: wsfulton
5852 Fix crash with bad regex - bug #3474250.
5853
5854 2012-01-24: wsfulton
5855 [Python] Add Python stepped slicing support to the STL wrappers (std::vector, std::list).
5856 Assigning to a slice, reading a slice and deleting a slice with steps now work.
5857 For example:
5858
5859 %template(vector_i) std::vector<int>
5860
5861 vi = vector_i(range(10))
5862 print list(vi)
5863 vi[1:4:2] = [111, 333]
5864 print list(vi)
5865 del vi[3:10:3]
5866 print list(vi)
5867 print list(vi[::-1])
5868
5869 gives (same behaviour as native Python sequences such as list):
5870
5871 [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
5872 [0, 111, 2, 333, 4, 5, 6, 7, 8, 9]
5873 [0, 111, 2, 4, 5, 7, 8]
5874 [8, 7, 5, 4, 2, 111, 0]
5875
5876 2012-01-23: klickverbot
5877 [D] Correctly annotate function pointers with C linkage.
5878 [D] Exception and Error have become blessed names; removed d_exception_name test case.
5879
5880 2012-01-20: wsfulton
5881 [Python] Fix some indexing bugs in Python STL wrappers when the index is negative, eg:
5882
5883 %template(vector_i) std::vector<int>
5884
5885 iv=vector_i([0,1,2,3,4,5])
5886 iv[-7:]
5887
5888 now returns [0, 1, 2, 3, 4, 5] instead of [5].
5889
5890 vv[7:9] = [22,33]
5891
5892 now returns [0, 1, 2, 3, 4, 5, 22, 33] instead of "index out range" error.
5893
5894 Also fix some segfaults when replacing ranges, eg when il is a std::list wrapper:
5895
5896 il[0:2] = [11]
5897
5898 2012-01-17: wsfulton
5899 [Go] Fix forward class declaration within a class when used as a base.
5900
5901 2012-01-07: wsfulton
5902 [C#] Add support for %nspace when using directors.
5903
5904 2012-01-06: wsfulton
5905 [Java] Patch #3452560 from Brant Kyser - add support for %nspace when using directors.
5906
5907 2011-12-21: wsfulton
5908 The 'directorin' typemap now accepts $1, $2 etc expansions instead of having to use workarounds -
5909 $1_name, $2_name etc.
5910
5911 2011-12-20: wsfulton
5912 [Java] Add (char *STRING, size_t LENGTH) director typemaps.
5913
5914 2011-12-20: wsfulton
5915 [C#, Go, Java, D] Add support for the 'directorargout' typemap.
5916
5917 2011-12-20: wsfulton
5918 [Ocaml, Octave, PHP, Python, Ruby] Correct special variables in 'directorargout' typemap.
5919 This change will break any 'directorargout' typemaps you may have written. Please change:
5920 $result to $1
5921 $input to $result
5922
5923 Also fix the named 'directorargout' DIRECTOROUT typemaps for these languages which didn't
5924 previously compile and add in $1, $2 etc expansion.
5925
5926 *** POTENTIAL INCOMPATIBILITY ***
5927
5928 2011-12-10: talby
5929 [perl5] SWIG_error() now gets decorated with perl source file/line number.
5930 [perl5] error handling now conforms to public XS api (fixes perl v5.14 issue).
5931
5932 2011-12-10: wsfulton
5933 [Android/Java] Fix directors to compile on Android.
5934
5935 Added documentation and examples for Android.
5936
5937 2011-12-08: vadz
5938 Bug fix: Handle methods renamed or ignored in the base class correctly in the derived classes
5939 (they could be sometimes mysteriously not renamed or ignored there before).
5940
5941 2011-12-03: klickverbot
5942 [D] Fix exception glue code for newer DMD 2 versions.
5943 [D] Do not default to 32 bit glue code for DMD anymore.
5944 [D] Use stdc.config.c_long/c_ulong to represent C long types.
5945
5946 2011-12-01: szager
5947 [python] Fixed bug 3447426: memory leak in vector.__getitem__.
5948
5949 2011-11-30: wsfulton
5950 [R] Remove C++ comments from generated C code.
5951
5952 2011-11-27: olly
5953 [Python] Fix some warnings when compiling generated wrappers with
5954 certain GCC warning options (Debian bug #650246).
5955
5956 2011-11-28: wsfulton
5957 Fix #3433541 %typemap(in, numinputs=0) with 10+ arguments.
5958
5959 2011-11-28: olly
5960 [Perl] Fix warnings when compiling generated wrappers with certain
5961 GCC warning options (Debian bug #436711).
5962
5963 2011-11-28: olly
5964 [PHP] Update keyword list to include keywords added in PHP releases up to 5.3.
5965
5966 2011-11-25: wsfulton
5967 [C#] Provide an easy way to override the default visibility for the proxy class pointer
5968 constructors and getCPtr() method. The visibility is 'internal' by default and if multiple
5969 SWIG modules are being used and compiled into different assemblies, then they need to be
5970 'public' in order to use the constructor or getCPtr() method from a different assembly.
5971 Use the following macros to change the visibilities in the proxy and type wrapper class:
5972
5973 SWIG_CSBODY_PROXY(public, public, SWIGTYPE)
5974 SWIG_CSBODY_TYPEWRAPPER(public, public, public, SWIGTYPE)
5975
5976 [Java] Provide an easy way to override the default visibility for the proxy class pointer
5977 constructors and getCPtr() method. The visibility is 'protected' by default and if multiple
5978 SWIG modules are being used and compiled into different packages, then they need to be
5979 'public' in order to use the constructor or getCPtr() method from a different package.
5980 Use the following macros to change the visibilities in the proxy and type wrapper class:
5981
5982 SWIG_JAVABODY_PROXY(public, public, SWIGTYPE)
5983 SWIG_JAVABODY_TYPEWRAPPER(public, public, public, SWIGTYPE)
5984
5985 The default for Java has changed from public to protected for the proxy classes. Use the
5986 SWIG_JAVABODY_PROXY macro above to restore to the previous visibilities.
5987
5988 *** POTENTIAL INCOMPATIBILITY ***
5989
5990 2011-11-22: szager
5991 [python] Bug 3440044: #ifdef out SWIG_Python_NonDynamicSetAttr if -builtin
5992 isn't being used, to avoid unnecessary binary incompatibilities between
5993 python installations.
5994
5995 2011-11-17: wsfulton
5996 Bug fix: Remove root directory from directory search list in Windows.
5997
5998 2011-11-13: wsfulton
5999 [Ruby] Apply patch #3421876 from Robin Stocker to fix #3416818 - same class name in
6000 different namespaces confusion when using multiple modules.
6001
6002 2011-11-11: wsfulton
6003 Fix pcre-build.sh to work with non-compressed tarballs - problem reported by Adrian Blakely.
6004
6005 2011-11-03: wsfulton
6006 Expand special variables in typemap warnings, eg:
6007
6008 %typemap(in, warning="1000:Test warning for 'in' typemap for $1_type $1_name") int "..."
6009
6010 2011-11-01: wsfulton
6011 Fix named output typemaps not being used when the symbol uses a qualifier and contains
6012 a number, eg:
6013
6014 %typemap(out) double ABC::m1 "..."
6015
6016 2011-10-24: talby
6017 [perl5] SF bug #3423119 - overload dispatch stack corruption fix. Better, but more research
6018 is needed on a stable path for tail calls in XS.
6019
6020 Also, fix for large long longs in 32 bit perl.
6021
6022 2011-10-13: xavier98
6023 [octave] Allow Octave modules to be re-loaded after a "clear all".
6024
6025 2011-09-19: wsfulton
6026 Fix regression introduced in swig-2.0.1 reported by Teemu Ikonone leading to uncompilable code
6027 when using typedef and function pointer references, for example:
6028
6029 typedef int FN(const int &a, int b);
6030 void *typedef_call1(FN *& precallback, FN * postcallback);
6031
6032 2011-09-14: wsfulton
6033 [Lua] Patch #3408012 from Raman Gopalan - add support for embedded Lua (eLua)
6034 including options for targeting Lua Tiny RAM (LTR).
6035
6036 2011-09-14: wsfulton
6037 [C#] Add boost_intrusive_ptr.i library contribution from patch #3401571.
6038
6039 2011-09-13: wsfulton
6040 Add warnings for badly named destructors, eg:
6041
6042 struct KStruct {
6043 ~NOT_KStruct() {}
6044 };
6045
6046 cpp_extend_destructors.i:92: Warning 521: Illegal destructor name ~NOT_KStruct. Ignored.
6047
6048 2011-09-13: wsfulton
6049 Fix %extend and destructors for templates. The destructor in %extend was not always wrapped,
6050 for example:
6051
6052 %extend FooT {
6053 ~FooT() { delete $self; } // was not wrapped as expected
6054 };
6055 template<class T> class FooT {};
6056 %template(FooTi) FooT<int>;
6057
6058 2011-09-13: wsfulton
6059 Fix special variables such as "$decl" and "$fulldecl" in destructors to include the ~ character.
6060
6061 2011-09-10: talby
6062 [perl5] SF bug #1481958 - Improve range checking for integer types.
6063 Enhance li_typemaps_runme.pl
6064
6065 2011-09-08: wsfulton
6066 Fix %extend on typedef classes in a namespace using the typedef name, for example:
6067 namespace Space {
6068 %extend CStruct {
6069 ...
6070 }
6071 typedef struct tagCStruct { ... } CStruct;
6072 }
6073
6074 2011-08-31: xavier98
6075 [octave] patches from Karl Wette: improvements to module loading behavior;
6076 added example of friend operator to operator example; fixed octave panic/crash in 3.0.5;
6077 documentation improvements
6078
6079 2011-08-30: szager
6080 [python] Bug 3400486, fix error signalling for built-in constructors.
6081
6082 2011-08-26: wsfulton
6083 [Go] Fix file/line number display for "gotype" when using typemap debugging options
6084 -tmsearch and -tmused.
6085
6086 2011-08-26: wsfulton
6087 [C#, D] Fix %callback which was generating uncompilable code.
6088
6089 2011-08-25: wsfulton
6090 Fix constructors in named typedef class declarations as reported by Gregory Bronner:
6091
6092 typedef struct A {
6093 A(){} // Constructor which was not accepted by SWIG
6094 B(){} // NOT a constructor --illegal, but was accepted by SWIG
6095 } B;
6096
6097 For C code, the fix now results in the use of 'struct A *' instead of just 'B *' in
6098 the generated code when wrapping members in A, but ultimately this does not matter, as
6099 they are the same thing.
6100
6101 2011-08-23: wsfulton
6102 Fix %newobject when used in conjunction with %feature("ref") as reported by Jan Becker. The
6103 code from the "ref" feature was not always being generated for the function specified by %newobject.
6104 Documentation for "ref" and "unref" moved from Python to the C++ chapter.
6105
6106 2011-08-22: szager
6107 [python] Fixed memory leak with --builtin option (bug 3385089).
6108
6109 2011-08-22: wsfulton
6110 [Lua] SF patch #3394339 from Torsten Landschoff - new option -nomoduleglobal to disable installing
6111 the module table into the global namespace. Require call also returns the module table instead
6112 of a string.
6113
6114 2011-08-09: xavier98
6115 Fix bug 3387394; Octave patches for 3.4.0 compatibility, etc. (from Karl Wette)
6116
6117 2011-08-04: wsfulton
6118 Add in $symname expansion for director methods.
6119
6120 2011-07-29: olly
6121 [PHP] Don't generate "return $r;" in cases where $r hasn't been set.
6122 This was basically harmless, except it generated a PHP E_NOTICE if
6123 the calling code had enabled them.
6124
6125 2011-07-26: wsfulton
6126 Fix scoping of forward class declarations nested within a class (for C++). Previously the symbol
6127 was incorrectly put into the outer namespace, eg
6128
6129 namespace std {
6130 template<class Key, class T> struct map {
6131 class iterator;
6132 };
6133 }
6134
6135 iterator was scoped as std::iterator, but now it is correctly std::map<Key, T>::iterator;
6136
6137 Also fixed is %template and template parameters that are a typedef when the template contains
6138 default template parameters, eg:
6139
6140 namespace Std {
6141 template<class Key, class T, class C = int> struct Map {
6142 typedef Key key_type;
6143 typedef T mapped_type;
6144 };
6145 }
6146 typedef double DOUBLE;
6147 %template(MM) Std::Map<int, DOUBLE>;
6148
6149 All symbols within Map will be resolved correctly, eg key_type and mapped_type no matter if the
6150 wrapped code uses Std::Map<int, double> or std::Map<int, DOUBLE> or Std::Map<int, double, int>
6151
6152 Also fixes bug #3378145 - regression introduced in 2.0.4 - %template using traits.
6153
6154 2011-07-20 szager
6155 [python] Fix closure for tp_call slot.
6156
6157 2011-07-16: wsfulton
6158 [python] Fix director typemap using PyObject *.
6159
6160 2011-07-13: szager
6161 [python] SF patch #3365908 - Add all template parameters to map support code in std_map.i
6162
6163 2011-07-13: szager
6164 [python] Fix for bug 3324753: %rename member variables with -builtin.
6165
6166 2011-07-01: wsfulton
6167 Fix some scope and symbol lookup problems when template default parameters are being
6168 used with typedef. For example:
6169
6170 template<typename XX, typename TT = SomeType> struct Foo {
6171 typedef XX X;
6172 typedef TT T;
6173 };
6174 template<typename TT> struct UsesFoo {
6175 void x(typename Foo<TT>::T, typename Foo<TT>::X);
6176 };
6177
6178 Also fixes use of std::vector<int>::size_type for Python as reported by Aubrey Barnard.
6179
6180 2011-06-23: olly
6181 [PHP] Fix director code to work when PHP is built with ZTS enabled,
6182 which is the standard configuration on Microsoft Windows.
6183
6184 2011-06-21: mutandiz
6185 [allegrocl]
6186 - various small tweaks and bug fixes.
6187 - Avoid name conflicts between smart pointer wrappers and the wrappers for
6188 the actual class.
6189 - Fix default typemaps for C bindings, which were incorrectly attempting to
6190 call non-existent destructors on user-defined types.
6191 - New feature, feature:aclmixins, for adding superclass to the foreign class
6192 wrappers.
6193 - Improve longlong typemaps.
6194
6195 2011-06-19: wsfulton
6196 Fix incorrect typemaps being used for a symbol within a templated type, eg:
6197 A<int>::value_type would incorrectly use a typemap for type A.
6198
6199 2011-06-18: olly
6200 [Tcl] Fix variable declarations in middle of blocks which isn't
6201 permitted in C90 (issue probably introduced in 2.0.3 by patch #3224663).
6202 Reported by Paul Obermeier in SF#3288586.
6203
6204 2011-06-17: wsfulton
6205 [Java] SF #3312505 - slightly easier to wrap char[] or char[ANY] with a Java byte[]
6206 using arrays_java.i.
6207
6208 2011-06-13: wsfulton
6209 [Ruby, Octave] SF #3310528 Autodoc fixes similar to those described below for Python.
6210
6211 2011-06-10: wsfulton
6212 [Python] Few subtle bugfixes in autodoc documentation generation,
6213 - Unnamed argument names fix for autodoc levels > 0.
6214 - Display of template types fixed for autodoc levels > 1.
6215 - Fix SF #3310528 - display of typedef structs for autodoc levels > 1.
6216 - Add missing type for self for autodoc levels 1 and 3.
6217 - autodoc levels 2 and 3 documented.
6218 - Minor tweaks to autodoc style to conform with PEP8.
6219
6220 2011-05-30: olly
6221 [PHP] Fix handling of directors when -prefix is used.
6222
6223 2011-05-24: olly
6224 [PHP] Fix handling of methods of classes with a virtual base class (SF#3124665).
6225
6226 Version 2.0.4 (21 May 2011)
6227 ===========================
6228
6229 2011-05-19: wsfulton
6230 [Guile] Patch #3191625 fixing overloading of integer types.
6231
6232 2011-05-19: wsfulton
6233 [Perl] Patch #3260265 fixing overloading of non-primitive types and integers in
6234 Perl 5.12 and later.
6235
6236 2011-05-19: wsfulton
6237 [Ruby] Fix %import where one of the imported files %include one of the STL include
6238 files such as std_vector.i.
6239
6240 2011-05-17: wsfulton
6241 [Java] Apply #3289851 from Alan Harder to fix memory leak in directors when checking
6242 for pending exceptions.
6243
6244 2011-05-17: wsfulton
6245 [Tcl] Apply #3300072 from Christian Delbaere to fix multiple module loading not
6246 always sharing variables across modules.
6247
6248 2011-05-16: xavier98
6249 [octave] Fix an incompatibility with never versions of Octave. Case on Octave
6250 API >= 40 to handle rename of Octave_map to octave_map.
6251 [octave] Add support for y.__rop__(x) operators when x.__op__(y) doesn't exist.
6252 [octave] Allow global operators to be defined by SWIG-wrapped functions.
6253 [octave] Fix several bugs around module namespaces; add -global, -noglobal,
6254 -globals <name> command line options to the module.
6255
6256 2011-05-14: wsfulton
6257 %varargs when used with a numeric argument used to create an additional argument
6258 which was intended to provide a guaranteed sentinel value. This never worked and now
6259 the additional argument is not generated.
6260
6261 2011-05-13: wsfulton
6262 [python] Additional fixes for python3.2 support.
6263
6264 2011-05-07: szager
6265 [python] Fixed PyGetSetDescr for python3.2.
6266
6267 2011-05-05: wsfulton
6268 [Lua, Python, Tcl] C/C++ prototypes shown in error message when calling an overloaded
6269 method with incorrect arguments improved to show always show fully qualified name
6270 and if a const method.
6271
6272 Also fixed other Lua error messages in generated code which weren't consistently
6273 using the fully qualified C++ name - requested by Gedalia Pasternak.
6274
6275 2011-04-29: szager
6276 Bug 2635919: Convenience method to convert std::map to a python dict.
6277
6278 2011-04-29: szager
6279 [Python] Fixed bug 2811549: return non-const iterators from STL
6280 methods begin(), end(), rbegin(), rend().
6281
6282 2011-04-25: szager
6283 [Python] Fixed bug 1498929: Access to member fields in map elements
6284
6285 2011-04-23: klickverbot
6286 [D] nspace: Correctly generate identifiers for base classes when
6287 not in split proxy mode.
6288
6289 2011-04-13: szager
6290 Fixed bug 3286333: infinite recursion with mutual 'using namespace' clauses.
6291
6292 2011-04-12: szager
6293 Fixed bug 1163440: vararg typemaps.
6294
6295 2011-04-12: szager
6296 Fixed bug #3285386: parse error from 'operator T*&()'. Added operator_pointer_ref
6297 test case to demonstrate.
6298
6299 2011-04-11: szager
6300 [Python] Fixed PyVarObject_HEAD_INIT to eliminate VC++ compiler errors about
6301 static initialization of struct members with pointers.
6302
6303 2011-04-11: wsfulton
6304 [Tcl] Apply patch #3284326 from Colin McDonald to fix some compiler warnings.
6305
6306 2011-04-11: szager
6307 [Python] Fixed PyVarObject_HEAD_INIT to eliminate VC++ compiler errors about
6308 static initialization of struct members with pointers.
6309
6310 2011-04-10: klickverbot
6311 [D] Fixed wrapping of enums that are type char, for example:
6312 enum { X = 'X'; } (this was already in 2.0.3 for C# and Java)
6313
6314 2011-04-10: klickverbot
6315 [D] nspace: Fixed referencing types in the root namespace when
6316 not in split proxy mode.
6317
6318 2011-04-09: szager
6319 [Python] Applied patch #1932484: migrate PyCObject to PyCapsule.
6320
6321 2011-04-09: szager
6322 [Python] Added preprocessor guards for python functions PyUnicode_AsWideChar and
6323 PySlice_GetIndices, which changed signatures in python3.2.
6324
6325 2011-04-07: wsfulton
6326 Fix wrapping of const array typedefs which were generating uncompilable code as
6327 reported by Karl Wette.
6328
6329 2011-04-03: szager
6330 [Python] Fixed the behavior of %pythonnondynamic to conform to the spec in Lib/pyuserdir.swg.
6331
6332 2011-04-03: szager
6333 [Python] Merged in the szager-python-builtin branch, adding the -builtin feature
6334 for python. The -builtin option may provide a significant performance gain
6335 in python wrappers. For full details and limitations, refer to Doc/Manual/Python.html.
6336 A small test suite designed to demonstrate the performance gain is in
6337 Examples/python/performance.
6338
6339 2011-04-01: wsfulton
6340 Add in missing wrappers for friend functions for some target languages, mostly
6341 the non-scripting languages like Java and C#.
6342
6343 Version 2.0.3 (29 March 2011)
6344 =============================
6345
6346 2011-03-29: wsfulton
6347 [R] Apply patch #3239076 from Marie White fixing strings for R >= 2.7.0
6348
6349 2011-03-29: wsfulton
6350 [Tcl] Apply patch #3248280 from Christian Delbaere which adds better error messages when
6351 the incorrect number or type of arguments are passed to overloaded methods.
6352
6353 2011-03-29: wsfulton
6354 [Tcl] Apply patch #3224663 from Christian Delbaere.
6355 1. Fix when function returns a NULL value, a "NULL" command will be created in the Tcl interpreter
6356 and calling this command will cause a segmentation fault.
6357
6358 2. Previous implementation searches for class methods using a linear search causing performance issues
6359 in wrappers for classes with many member functions. The patch adds a method hash table to classes and
6360 changes method name lookup to use the hash table instead of doing a linear search.
6361
6362 2011-03-26: wsfulton
6363 [C#, Java] SF bug #3195112 - fix wrapping of enums that are type char, for example:
6364 enum { X = 'X'; }
6365
6366 2011-03-21: vadz
6367 Allow setting PCRE_CFLAGS and PCRE_LIBS during configuration to override the values returned by
6368 pcre-config, e.g. to allow using a static version of PCRE library.
6369
6370 2011-03-17: wsfulton
6371 [UTL] Add missing headers in generated STL wrappers to fix compilation with gcc-4.6.
6372
6373 2011-03-17: wsfulton
6374 Fix regression introduced in swig-2.0.2 where filenames with spaces were not found
6375 when used with %include and %import. Reported by Shane Liesegang.
6376
6377 2011-03-15: wsfulton
6378 [UTL] Fix overloading when using const char[], problem reported by David Maxwell.
6379 Similarly for char[ANY] and const char[ANY].
6380
6381 2011-03-15: wsfulton
6382 [C#] Apply patch #3212624 fixing std::map Keys property.
6383
6384 2011-03-14: olly
6385 [PHP] Fix handling of overloaded methods/functions where some
6386 return void and others don't - whether this worked or not depended
6387 on the order they were encountered in (SF#3208299).
6388
6389 2011-03-13: klickverbot
6390 [D] Extended support for C++ namespaces (nspace feature).
6391
6392 2011-03-12: olly
6393 [PHP] Fix sharing of type information between multiple SWIG-wrapped
6394 modules (SF#3202463).
6395
6396 2011-03-09: wsfulton
6397 [Python] Fix SF #3194294 - corner case bug when 'NULL' is used as the default value
6398 for a primitive type parameter in a method declaration.
6399
6400 2011-03-07: olly
6401 [PHP] Don't use zend_error_noreturn() for cases where the function
6402 returns void - now this issue can only matter if you have a function
6403 or method which is directed and returns non-void.
6404
6405 2011-03-06: olly
6406 [PHP] Add casts to the typemaps for long long and unsigned long
6407 long to avoid issues when they are used with shorter types via
6408 %apply.
6409
6410 2011-03-02: wsfulton
6411 Templated smart pointers overloaded with both const and non const operator-> generated uncompilable
6412 code when the pointee was a class with either public member variables or static methods.
6413 Regression in 2.0.x reported as working in 1.3.40 by xantares on swig-user mailing list.
6414
6415 Version 2.0.2 (20 February 2011)
6416 ================================
6417
6418 2011-02-19: wsfulton
6419 [PHP] Add missing INPUT, OUTPUT and INOUT typemaps in the typemaps.i library
6420 for primitive reference types as well as signed char * and bool *.
6421
6422 2011-02-19: olly
6423 [PHP] Address bug in PHP on some platforms/architectures which
6424 results in zend_error_noreturn() not being available using
6425 SWIG_ZEND_ERROR_NORETURN which defaults to zend_error_noreturn but
6426 can be overridden when building the module by passing
6427 -DSWIG_ZEND_ERROR_NORETURN=zend_error to the compiler. This may
6428 result in compiler warnings, but should at least allow a module
6429 to be built on those platforms/architectures (SF#3166423).
6430
6431 2011-02-18: wsfulton
6432 Fix #3184549 - vararg functions and function overloading when using the -fastdispatch option.
6433
6434 2011-02-18: olly
6435 [PHP] An overloaded method which can return an object or a
6436 primitive type no longer causes SWIG to segfault. Reported by Paul
6437 Colby in SF#3168531.
6438
6439 2011-02-18: olly
6440 [PHP] Fix invalid erase during iteration of std::map in generated
6441 director code. Reported by Cory Bennett in SF#3175820.
6442
6443 2011-02-17: wsfulton
6444 Preprocessing now warns if extra tokens appear after #else and #end.
6445
6446 2011-02-16: wsfulton
6447 Fix #1653092 Preprocessor does not error out when #elif is missing an expression.
6448 This and other cases of missing preprocessor expressions now result in an error.
6449
6450 2011-02-14: wsfulton
6451 [Ocaml] Apply patch #3151788 from Joel Reymont. Brings Ocaml support up to date
6452 (ver 3.11 and 3.12), including std::string.
6453
6454 2011-02-13: wsfulton
6455 [Ruby] Apply patch #3176274 from James Masters - typecheck typemap for time_t.
6456
6457 2011-02-13: wsfulton
6458 Apply patch #3171793 from szager - protected director methods failing when -fvirtual is used.
6459
6460 2011-02-13: wsfulton
6461 Fix #1927852 - #include directives don't preprocess the file passed to it. The fix is for
6462 #include with -importall or -includeall, %include and %import, for example:
6463 #define FILENAME "abc.h"
6464 %include FILENAME
6465
6466 2011-02-12: wsfulton
6467 Fix #1940536, overactive preprocessor which was expanding defined(...) outside of #if and #elif
6468 preprocessor directives.
6469
6470 2011-02-05: wsfulton
6471 [MzScheme] SF #2942899 Add user supplied documentation to help getting started with MzScheme.
6472 Update chapter name to MzScheme/Racket accounting for the rename of MzScheme to Racket.
6473
6474 2011-02-05: wsfulton
6475 [C#] SF #3085906 - Possible fix running test-suite on Mac OS X.
6476
6477 2011-02-05: wsfulton
6478 SF #3173367 Better information during configure about Boost prerequisite for running
6479 the test-suite.
6480
6481 2011-02-05: wsfulton
6482 SF #3127633 Fix infinite loop in recursive typedef resolution.
6483
6484 2011-02-04: wsfulton
6485 [R] SF #3168676 Fix %rename not working for member variables and methods.
6486
6487 2011-02-04: wsfulton
6488 [clisp] SF #3148200 Fix segfault parsing nested unions.
6489
6490 2011-02-01: wsfulton
6491 [C#] Directors - a call to a method being defined in the base class, not
6492 overridden in a subclass, but again overridden in a class derived from
6493 the first subclass was not being dispatched correctly to the most derived class.
6494 See director_alternating.i for an example.
6495
6496 2011-02-01: wsfulton
6497 [C#, Java] Any 'using' statements in the protected section of a class were previously
6498 ignored with director protected (dirprot) mode.
6499
6500 2011-01-30: wsfulton
6501 Fix overloading with const pointer reference (SWIGTYPE *const&) parameters for a
6502 number of scripting languages.
6503
6504 2011-01-17: wsfulton
6505 New warning for smart pointers if only some of the classes in the inheritance
6506 chain are marked as smart pointer, eg, %shared_ptr should be used for all classes
6507 in an inheritance hierarchy, so this new warning highlights code where this is
6508 not the case.
6509
6510 example.i:12: Warning 520: Base class 'A' of 'B' is not similarly marked as a smart pointer.
6511 example.i:16: Warning 520: Derived class 'C' of 'B' is not similarly marked as a smart pointer.
6512
6513 2011-01-14: wsfulton
6514 Added some missing multi-argument typemaps: (char *STRING, size_t LENGTH) and
6515 (char *STRING, int LENGTH). Documentation for this updated. Java patch from
6516 Volker Grabsch.
6517
6518 2011-01-11: iant
6519 Require Go version 7077 or later.
6520
6521 2010-12-30: klickverbot
6522 [C#, D, Java] Check for collision of parameter names with target
6523 language keywords when generating the director glue code.
6524
6525 The situation in which the generated could would previously be
6526 invalid is illustrated in the new 'director_keywords' test case.
6527
6528 2010-12-23: wsfulton
6529 [C#] Fix $csinput special variable not being expanded for csvarin typemaps
6530 when used for global variables. Reported by Vadim Zeitlin.
6531
6532 2010-12-14: wsfulton
6533 Fix $basemangle expansion in array typemaps. For example if type is int *[3],
6534 $basemangle expands to _p_int.
6535
6536 2010-12-07: iant
6537 Check that we are using a sufficiently new version of the
6538 6g or 8g Go compiler during configure time. If not, disable Go.
6539 Minimum version is now 6707.
6540
6541 *** POTENTIAL INCOMPATIBILITY ***
6542
6543 2010-12-06: wsfulton
6544 Fix #3127394 - use of network paths on Windows/MSys.
6545
6546 2010-11-18: klickverbot
6547 [D] Added the D language module.
6548
6549 2010-11-12: vadz
6550 Fix handling of multiple regex-using %renames attached to the same
6551 declaration. For example, now
6552
6553 %rename("%(regex:/^Set(.*)/put\\1/)s") "";
6554 %rename("%(regex:/^Get(.*)/get\\1/)s") "";
6555
6556 works as expected whereas before only the last anonymous rename was
6557 taken into account.
6558
6559 2010-10-17: drjoe
6560 [R] Fix failure in overloaded functions which was breaking
6561 QuantLib-SWIG
6562
6563 2010-10-14: olly
6564 [PHP] Allow compilation on non-conforming Microsoft C++ compilers
6565 which don't accept: return function_returning_void();
6566 Reported by Frank Vanden Berghen on the SWIG mailing list.
6567
6568 2010-10-12: wsfulton
6569 Fix unary scope operator (::) (global scope) regression introduced in 2.0.0, reported by
6570 Ben Walker. The mangled symbol names were incorrect, sometimes resulting in types being
6571 incorrectly treated as opaque types.
6572
6573 Also fixes #2958781 and some other type problems due to better typedef resolution, eg
6574 std::vector<T *>::value_type didn't resolve to T * when it should have. The mangled type
6575 was incorrectly SWIGTYPE_std__vectorT_Test_p_std__allocatorT_Test_p_t_t__value_type and now
6576 it is correctly SWIGTYPE_p_Test.
6577
6578 Version 2.0.1 (4 October 2010)
6579 ==============================
6580
6581 2010-10-03: wsfulton
6582 Apply patch #3066958 from Mikael Johansson to fix default smart pointer
6583 handling when the smart pointer contains both a const and non-const operator->.
6584
6585 2010-10-01: wsfulton
6586 Add -pcreversion option to display PCRE version information.
6587
6588 2010-10-01: olly
6589 [Ruby] Avoid segfault when a method node has no parentNode
6590 (SF#3034054).
6591
6592 2010-10-01: olly
6593 [Python] Allow reinitialisation to work with an embedded Python
6594 interpreter (patch from Jim Carroll in SF#3075178).
6595
6596 2010-09-28: wsfulton
6597 [C#] Apply patch from Tomas Dirvanauskas for std::map wrappers to avoid
6598 throwing exceptions with normal usage of iterators.
6599
6600 2010-09-27: olly
6601 [Python] Improve error message given when a parameter of the wrong
6602 type is passed to an overloaded method (SF#3027355).
6603
6604 2010-09-25: wsfulton
6605 Apply SF patch #3075150 - Java directors using static variables in
6606 named namespace.
6607
6608 2010-09-24: wsfulton
6609 More file and line error/warning reporting fixes where SWIG macros
6610 are used within {} braces (where the preprocessor expands macros),
6611 for example macros within %inline {...} and %fragment(...) {...}
6612 and nested structs.
6613
6614 2010-09-18: wsfulton
6615 More file and line error/warning reporting fixes for various inherited
6616 class problems.
6617
6618 2010-09-15: wsfulton
6619 A much improved debugging of SWIG source experience is now available and
6620 documented in the "Debugging SWIG" section in the Doc/Devel/internals.html
6621 file, including a swig.dbg support file for the gdb debugger.
6622
6623 2010-09-11: wsfulton
6624 Fix incorrect line number reporting in errors/warnings when a macro
6625 definition ends with '/' and it is not the end of a C comment.
6626
6627 2010-09-11: wsfulton
6628 Fix incorrect line number reporting in errors/warnings after parsing
6629 macro invocations with parameters given over more than one line.
6630
6631 2010-09-10: wsfulton
6632 Remove extraneous extra line in preprocessed output after including files
6633 which would sometimes lead to error/warning messages two lines after the
6634 end of the file.
6635
6636 2010-09-10: wsfulton
6637 Fix #2149523 - Incorrect line number reporting in errors after parsing macros
6638 containing C++ comments.
6639
6640 2010-09-08: olly
6641 [PHP] Fix handling of OUTPUT typemaps (Patch from Ryan in SF#3058394).
6642
6643 2010-09-03: wsfulton
6644 Fix erroneous line numbers in error messages for macro expansions, for example,
6645 the error message now points to instantiation of the macro, ie the last line here:
6646
6647 #define MACRO2(a, b)
6648
6649 #define MACRO1(NAME) MACRO2(NAME,2,3)
6650
6651 MACRO1(abc)
6652
6653 2010-09-02: wsfulton
6654 Fix line numbers in error and warning messages for preprocessor messages within
6655 %inline, for example:
6656
6657 %inline %{
6658 #define FOOBAR 1
6659 #define FOOBAR "hi"
6660 %}
6661
6662 2010-09-02: wsfulton
6663 Fix line numbers in error and warning messages which were cumulatively one
6664 less than they should have been after parsing each %include/%import - bug
6665 introduced in swig-1.3.32. Also fix line numbers in error and warning messages
6666 when new line characters appear between the %include / %import statement and
6667 the filename.
6668
6669 2010-08-30: wsfulton
6670 Fix line number and file name reporting for some macro preprocessor warnings.
6671 The line number of the macro argument has been corrected and the line number
6672 of the start of the macro instead of one past the end of the macro is used.
6673 Some examples:
6674 file.h:11: Error: Illegal macro argument name '..'
6675 file.h:19: Error: Macro 'DUPLICATE' redefined,
6676 file.h:15: Error: previous definition of 'DUPLICATE'.
6677 file.h:25: Error: Variable-length macro argument must be last parameter
6678 file.h:32: Error: Illegal character in macro argument name
6679 file.i:37: Error: Macro 'SIT' expects 2 arguments
6680
6681 2010-08-26: wsfulton
6682 Fix __LINE__ and __FILE__ expansion reported by Camille Gillot. Mostly this
6683 did not work at all. Also fixes SF #2822822.
6684
6685 2010-08-17: wsfulton
6686 [Perl] Fix corner case marshalling of doubles - errno was not being correctly
6687 set before calling strtod - patch from Justin Vallon - SF Bug #3038936.
6688
6689 2010-08-17: wsfulton
6690 Fix make distclean when some of the more obscure languages are detected by
6691 configure - fixes from Torsten Landschoff.
6692
6693 2010-07-28: wsfulton
6694 Restore configuring out of source for the test-suite since it broke in 1.3.37.
6695 As previously, if running 'make check-test-suite' out of source, it needs to be
6696 done by invoking configure with a relative path. Invoking configure with an
6697 absolute path will not work. Running the full 'make check' still needs to be
6698 done in the source tree.
6699
6700 2010-07-16: wsfulton
6701 Fix wrapping of function pointers and member function pointers when the function
6702 returns by reference.
6703
6704 2010-07-13: vadz
6705 Removed support for the old experimental "rxspencer" encoder and
6706 "[not]rxsmatch" in %rename (see the 01/16/2006 entry). The new and
6707 officially supported "regex" encoder and "[not]regexmatch" checks
6708 should be used instead (see the two previous entries). Please
6709 replace "%(rxspencer:[pat][subst])s" with "%(regex:/pat/subst/)s"
6710 when upgrading. Notice that you will also need to replace the back-
6711 references of form "@1" with the more standard "\\1" and may need to
6712 adjust your regular expressions syntax as the new regex encoder uses
6713 Perl-compatible syntax and not (extended) POSIX syntax as the old one.
6714
6715 *** POTENTIAL INCOMPATIBILITY ***
6716
6717 2010-07-13: vadz
6718 Add "regexmatch", "regextarget" and "notregexmatch" which can be
6719 used to apply %rename directives to the declarations matching the
6720 specified regular expression only. The first two can be used
6721 interchangeably, both of the %renames below do the same thing:
6722
6723 %rename("$ignore", regexmatch$name="Old$") "";
6724 %rename("$ignore", regextarget=1) "Old$";
6725
6726 (namely ignore the declarations having "Old" suffix).
6727
6728 "notregexmatch" restricts the match to only the declarations which
6729 do not match the regular expression, e.g. here is how to rename to
6730 lower case versions all declarations except those consisting from
6731 capital letters only:
6732
6733 %rename("$(lowercase)s", notregexmatch$name="^[A-Z]+$") "";
6734
6735 2010-07-13: vadz
6736 Add the new "regex" encoder that can be used in %rename, e.g.
6737
6738 %rename("regex:/(\\w+)_(.*)/\\2/") "";
6739
6740 to remove any alphabetical prefix from all identifiers. The syntax
6741 of the regular expressions is Perl-like and PCRE library
6742 (http://www.pcre.org/) is used to implement this feature but notice
6743 that backslashes need to be escaped as usual inside C strings.
6744
6745 Original patch from Torsten Landschoff.
6746
6747 2010-07-08: wsfulton
6748 Fix #3024875 - shared_ptr of classes with non-public destructors. This also fixes
6749 the "unref" feature when used on classes with non-public destructors.
6750
6751 2010-06-17: ianlancetaylor
6752 [Go] Add the Go language module.
6753
6754 2010-06-10: wsfulton
6755 [Lua] Fix SWIG_lua_isnilstring multiply defined when using multiple
6756 modules and wrapping strings. Patch from 'Number Cruncher'.
6757
6758 2010-06-10: olly
6759 [PHP] Fix directors to correctly call a method with has a
6760 different name in PHP to C++ (we were always using the C++ name
6761 in this case).
6762
6763 2010-06-03: wsfulton
6764 Fix uncompilable code when %rename results in two enum items
6765 with the same name. Reported by Vadim Zeitlin.
6766
6767 Version 2.0.0 (2 June 2010)
6768 ===========================
6769
6770 2010-06-02: wsfulton
6771 [C#] Fix SWIG_STD_VECTOR_ENHANCED macro used in std::vector to work with
6772 types containing commas, for example:
6773
6774 SWIG_STD_VECTOR_ENHANCED(std::pair< double, std::string >)
6775
6776 2010-06-01: wsfulton
6777 Add in std_shared_ptr.i for wrapping std::shared_ptr. Requires the %shared_ptr
6778 macro like in the boost_shared_ptr.i library. std::tr1::shared_ptr can also be
6779 wrapped if the following macro is defined:
6780
6781 #define SWIG_SHARED_PTR_SUBNAMESPACE tr1
6782 %include <std_shared_ptr.i>
6783
6784 shared_ptr is also documented in Library.html now.
6785
6786 2010-05-27: wsfulton
6787 Add the ability for $typemap special variable macros to call other $typemap
6788 special variable macros, for example:
6789
6790 %typemap(cstype) CC "CC"
6791 %typemap(cstype) BB "$typemap(cstype, CC)"
6792 %typemap(cstype) AA "$typemap(cstype, BB)"
6793 void hah(AA aa);
6794
6795 This also fixes C# std::vector containers of shared_ptr and %shared_ptr.
6796
6797 Also added diagnostics for $typemap with -debug-tmsearch, for example, the
6798 above displays additional diagnostic lines starting "Containing: ":
6799
6800 example.i:34: Searching for a suitable 'cstype' typemap for: AA aa
6801 Looking for: AA aa
6802 Looking for: AA
6803 Using: %typemap(cstype) AA
6804 Containing: $typemap(cstype, BB)
6805 example.i:31: Searching for a suitable 'cstype' typemap for: BB
6806 Looking for: BB
6807 Using: %typemap(cstype) BB
6808 Containing: $typemap(cstype, CC)
6809 example.i:29: Searching for a suitable 'cstype' typemap for: CC
6810 Looking for: CC
6811 Using: %typemap(cstype) CC
6812
6813 2010-05-26: olly
6814 Fix %attribute2ref not to produce a syntax error if the last
6815 argument (AccessorMethod) is omitted. Patch from David Piepgras
6816 in SF#2235756.
6817
6818 2010-05-26: olly
6819 [PHP] When using %throws or %catches, SWIG-generated PHP5 wrappers
6820 now throw PHP Exception objects instead of giving a PHP error of
6821 type E_ERROR.
6822
6823 This change shouldn't cause incompatibility issues, since you can't
6824 set an error handler for E_ERROR, so previously PHP would just exit
6825 which also happens for unhandled exceptions. The benefit is you can
6826 now catch them if you want to.
6827
6828 Fixes SF#2545578 and SF#2955522.
6829
6830 2010-05-25: olly
6831 [PHP] Add missing directorin typemap for const std::string &.
6832 Fixes SF#3006404 reported by t-Legiaw.
6833
6834 2010-05-23: wsfulton
6835 [C#] Fix #2957375 - SWIGStringHelper and SWIGExceptionHelper not always being
6836 initialized before use in .NET 4 as the classes were not marked beforefieldinit.
6837 A static constructor has been added to the intermediary class like this:
6838
6839 %pragma(csharp) imclasscode=%{
6840 static $imclassname() {
6841 }
6842 %}
6843
6844 If you had added your own custom static constructor to the intermediary class in
6845 the same way as above, you will have to modify your approach to use static variable
6846 initialization or define SWIG_CSHARP_NO_IMCLASS_STATIC_CONSTRUCTOR - See csharphead.swg.
6847
6848 *** POTENTIAL INCOMPATIBILITY ***
6849
6850 2010-05-23: wsfulton
6851 Fix #2408232. Improve shared_ptr and intrusive_ptr wrappers for classes in an
6852 inheritance hierarchy. No special treatment is needed for derived classes.
6853 The proxy class also no longer needs to be specified, it is automatically
6854 deduced. The following macros are deprecated:
6855 SWIG_SHARED_PTR(PROXYCLASS, TYPE)
6856 SWIG_SHARED_PTR_DERIVED(PROXYCLASS, BASECLASSTYPE, TYPE)
6857 and have been replaced by
6858 %shared_ptr(TYPE)
6859 Similarly for intrusive_ptr wrappers, the following macro is deprecated:
6860 SWIG_INTRUSIVE_PTR(PROXYCLASS, TYPE)
6861 SWIG_INTRUSIVE_PTR_DERIVED(PROXYCLASS, BASECLASSTYPE, TYPE)
6862 and have been replaced by
6863 %intrusive_ptr(TYPE)
6864
6865 2010-05-21: olly
6866 [PHP] Stop generating a bogus line of code in certain constructors.
6867 This was mostly harmless, but caused a PHP notice to be issued, if
6868 enabled (SF#2985684).
6869
6870 2010-05-18: wsfulton
6871 [Java] Fix member pointers on 64 bit platforms.
6872
6873 2010-05-14: wsfulton
6874 Fix wrapping of C++ enum boolean values reported by Torsten Landschoff:
6875 typedef enum { PLAY = true, STOP = false } play_state;
6876
6877 2010-05-14: olly
6878 [PHP] Fix wrapping of global variables which was producing
6879 uncompilable code in some cases.
6880
6881 2010-05-12: drjoe
6882 [R] Add two more changes from Wil Nolan. Get garbage
6883 collection to work. Implement newfree
6884
6885 2010-05-09: drjoe
6886 Fix bug reported by Wil Nolan change creation of string so
6887 that R 2.7.0+ can use char hashes
6888
6889 2010-05-07: wsfulton
6890 Apply patch #2955146 from Sergey Satskiy to fix expressions containing divide by
6891 operator in constructor initialization lists.
6892
6893 2010-05-05: wsfulton
6894 [R] Memory leak fix handling const std::string & inputs, reported by Will Nolan.
6895
6896 2010-05-01: wsfulton
6897 Typemap matching enhancement for non-default typemaps. Previously all
6898 qualifiers were stripped in one step, now they are stripped one at a time
6899 starting with the left most qualifier. For example, int const*const
6900 is first stripped to int *const then int *.
6901
6902 *** POTENTIAL INCOMPATIBILITY ***
6903
6904 2010-04-25: bhy
6905 [Python] Fix #2985655 - broken constructor renaming.
6906
6907 2010-04-14: wsfulton
6908 Typemap fragments are now official and documented in Typemaps.html.
6909
6910 2010-04-09: wsfulton
6911 [Ruby] Fix #2048064 and #2408020.
6912 Apply Ubuntu patch to fix Ruby and std::vector wrappers with -minherit.
6913 https://bugs.launchpad.net/ubuntu/+source/swig1.3/+bug/522874
6914
6915 2010-04-09: wsfulton
6916 [Mzscheme] Apply Ubuntu patch to fix std::map wrappers:
6917 https://bugs.launchpad.net/ubuntu/+source/swig1.3/+bug/203876
6918
6919 2010-04-09: wsfulton
6920 [Python] Apply patch #2952374 - fix directors and the -nortti option.
6921
6922 2010-04-09: wsfulton
6923 [Lua] Fix #2887254 and #2946032 - SWIG_Lua_typename using wrong stack index.
6924
6925 2010-04-03: wsfulton
6926 [Python] Fix exceptions being thrown with the -threads option based on patch from Arto Vuori.
6927 Fixes bug #2818499.
6928
6929 2010-04-03: wsfulton
6930 Fix Makefile targets: distclean and maintainer-clean
6931
6932 2010-04-02: wsfulton
6933 [Lua] Fix char pointers, wchar_t pointers and char arrays so that nil can be passed as a
6934 valid value. Bug reported by Gedalia Pasternak.
6935
6936 2010-04-01: wsfulton
6937 Numerous subtle typemap matching rule fixes when using the default type. The typemap
6938 matching rules are to take a type and find the best default typemap (SWIGTYPE, SWIGTYPE* etc),
6939 then look for the next best match by reducing the chosen default type. The type deduction
6940 now follows C++ class template partial specialization matching rules.
6941
6942 Below are the set of changes made showing the default type deduction
6943 along with the old reduced type and the new version of the reduced type:
6944
6945 SWIGTYPE const &[ANY]
6946 new: SWIGTYPE const &[]
6947 old: SWIGTYPE (&)[ANY]
6948
6949 SWIGTYPE *const [ANY]
6950 new: SWIGTYPE const [ANY]
6951 old: SWIGTYPE *[ANY]
6952
6953 SWIGTYPE const *const [ANY]
6954 new: SWIGTYPE *const [ANY]
6955 old: SWIGTYPE const *[ANY]
6956
6957 SWIGTYPE const *const &
6958 new: SWIGTYPE *const &
6959 old: SWIGTYPE const *&
6960
6961 SWIGTYPE *const *
6962 new: SWIGTYPE const *
6963 old: SWIGTYPE **
6964
6965 SWIGTYPE *const &
6966 new: SWIGTYPE const &
6967 old: SWIGTYPE *&
6968
6969 Additionally, a const SWIGTYPE lookup is used now for any constant type. Some examples, where
6970 T is some reduced type, eg int, struct Foo:
6971
6972 T const
6973 new: SWIGTYPE const
6974 old: SWIGTYPE
6975
6976 T *const
6977 new: SWIGTYPE *const
6978 old: SWIGTYPE *
6979
6980 T const[]
6981 new: SWIGTYPE const[]
6982 old: SWIGTYPE[]
6983
6984 enum T const
6985 new: enum SWIGTYPE const
6986 old: enum SWIGTYPE
6987
6988 T (*const )[]
6989 new: SWIGTYPE (*const )[]
6990 old: SWIGTYPE (*)[]
6991
6992 Reminder: the typemap matching rules can now be seen for any types being wrapped by using
6993 either the -debug-tmsearch or -debug-tmused options.
6994
6995 In practice this leads to some subtle matching rule changes and the majority of users
6996 won't notice any changes, except in the prime area of motivation for this change: Improve
6997 STL containers of const pointers and passing const pointers by reference. This is fixed
6998 because many of the STL containers use a type 'T const&' as parameters and when T is
6999 a const pointer, for example, 'K const*', then the full type is 'K const*const&'. This
7000 means that the 'SWIGTYPE *const&' typemaps now match when T is either a non-const or
7001 const pointer. Furthermore, some target languages incorrectly had 'SWIGTYPE *&' typemaps
7002 when these should have been 'SWIGTYPE *const&'. These have been corrected (Java, C#, Lua, PHP).
7003
7004 *** POTENTIAL INCOMPATIBILITY ***
7005
7006 2010-03-13: wsfulton
7007 [Java] Some very old deprecated pragma warnings are now errors.
7008
7009 2010-03-13: wsfulton
7010 Improve handling of file names and directories containing double/multiple path separators.
7011
7012 2010-03-10: mutandiz (Mikel Bancroft)
7013 [allegrocl] Use fully qualified symbol name of cl::identity in emit_defun().
7014
7015 2010-03-06: wsfulton
7016 [Java] The intermediary JNI class modifiers are now public by default meaning these
7017 intermediary low level functions are now accessible by default from outside any package
7018 used. The proxy class pointer constructor and getCPtr() methods are also now public.
7019 These are needed in order for the nspace option to work without any other mods.
7020 The previous default of protected access can be restored using:
7021
7022 SWIG_JAVABODY_METHODS(protected, protected, SWIGTYPE)
7023 %pragma(java) jniclassclassmodifiers = "class"
7024
7025 2010-03-06: wsfulton
7026 [C#] Added the nspace feature for C#. Documentation for the nspace feature is now available.
7027
7028 2010-03-04: wsfulton
7029 Added the nspace feature. This adds some improved namespace support. Currently only Java
7030 is supported for target languages, where C++ namespaces are automatically translated into
7031 Java packages. The feature only applies to classes,struct,unions and enums declared within
7032 a namespace. Methods and variables declared in namespaces still effectively have their
7033 namespaces flattened. Example usage:
7034
7035 %feature(nspace) Outer::Inner1::Color;
7036 %feature(nspace) Outer::Inner2::Color;
7037
7038 namespace Outer {
7039 namespace Inner1 {
7040 struct Color {
7041 ...
7042 };
7043 }
7044 namespace Inner2 {
7045 struct Color {
7046 ...
7047 };
7048 }
7049 }
7050
7051 For Java, the -package option is also required when using the nspace feature. Say
7052 we use -package com.myco, the two classes can then be accessed as follows from Java:
7053
7054 com.myco.Outer.Inner1.Color and com.myco.Outer.Inner2.Color.
7055
7056 2010-02-27: wsfulton
7057 [Python] Remove -dirvtable from the optimizations included by -O as it this option
7058 currently leads to memory leaks as reported by Johan Blake.
7059
7060 2010-02-27: wsfulton
7061 License code changes: SWIG Source is GPL-v3 and library code license is now clearer
7062 and is provided under a very permissive license. See https://www.swig.org/legal.html.
7063
7064 2010-02-13: wsfulton
7065 [Ruby] A few fixes for compiling under ruby-1.9.x including patch from 'Nibble'.
7066
7067 2010-02-13: wsfulton
7068 [Ruby] Apply patch from Patrick Bennett to fix RARRAY_LEN and RARRAY_PTR usage for Ruby 1.9.x
7069 used in various STL wrappers.
7070
7071 2010-02-13: wsfulton
7072 [C#, Java] Fix incorrect multiply defined symbol name error when an enum item
7073 and class name have the same name, as reported by Nathan Krieger. Example:
7074
7075 class Vector {};
7076 namespace Text {
7077 enum Preference { Vector };
7078 }
7079
7080 This also fixes other incorrect corner case target language symbol name clashes.
7081
7082 2010-02-11: wsfulton
7083 Add the -debug-lsymbols option for displaying the target language layer symbols.
7084
7085 2010-02-09: wsfulton
7086 Fix -MM and -MMD options on Windows. They were not omitting files in the SWIG library as
7087 they should be.
7088
7089 2010-02-08: wsfulton
7090 Fix #1807329 - When Makefile dependencies are being generated using the -M family of options
7091 on Windows, the file paths have been corrected to use single backslashes rather than double
7092 backslashes as path separators.
7093
7094 2010-02-06: wsfulton
7095 Fix #2918902 - language specific files not being generated in correct directory on
7096 Windows when using forward slashes for -o, for example:
7097 swig -python -c++ -o subdirectory/theinterface_wrap.cpp subdirectory/theinterface.i
7098
7099 2010-02-05: wsfulton
7100 Fix #2894405 - assertion when using -xmlout.
7101
7102 2010-01-28: wsfulton
7103 Fix typemap matching bug when a templated type has a typemap both specialized and not
7104 specialized. For example:
7105
7106 template<typename T> struct XX { ... };
7107 %typemap(in) const XX & "..."
7108 %typemap(in) const XX< int > & "..."
7109
7110 resulted in the 2nd typemap being applied for all T in XX< T >.
7111
7112 2010-01-22: wsfulton
7113 Fix #2933129 - typemaps not being found when the unary scope operator (::) is used to denote
7114 global scope, the typemap is now used in situations like this:
7115
7116 struct X {};
7117 %typemap(in) const X & "..."
7118 void m(const ::X &);
7119
7120 and this:
7121
7122 struct X {};
7123 %typemap(in) const ::X & "..."
7124 void m(const X &);
7125
7126 2010-01-20: wsfulton
7127 Fix some unary scope operator (::) denoting global scope problems in the types generated
7128 into the C++ layer. Previously the unary scope operator was dropped in the generated code
7129 if the type had any sort of qualifier, for example when using pointers, references, like
7130 ::foo*, ::foo&, bar< ::foo* >.
7131
7132 2010-01-13: olly
7133 [PHP] Add datetime to the list of PHP predefined classes (patch
7134 from David Fletcher in SF#2931042).
7135
7136 2010-01-11: wsfulton
7137 Slight change to warning, error and diagnostic reporting. The warning number is no
7138 longer shown within brackets. This is to help default parsing of warning messages by
7139 other tools, vim on Unix in particular.
7140
7141 Example original display using -Fstandard:
7142 example.i:20: Warning(401): Nothing known about base class 'B'. Ignored.
7143 New display:
7144 example.i:20: Warning 401: Nothing known about base class 'B'. Ignored.
7145
7146 Also subtle fix to -Fmicrosoft format adding in missing space. Example original display:
7147 example.i(20): Warning(401): Nothing known about base class 'Base'. Ignored.
7148 New display:
7149 example.i(20) : Warning 401: Nothing known about base class 'Base'. Ignored.
7150
7151 2010-01-10: wsfulton
7152 Fix a few inconsistencies in reporting of file/line numberings including modifying
7153 the overload warnings 509, 512, 516, 474, 475 to now be two line warnings.
7154
7155 2010-01-10: wsfulton
7156 Modify -debug-tags output to use standard file name/line reporting so that editors
7157 can easily navigate to the appropriate lines.
7158 Was typically:
7159 . top . include . include (/usr/share/swig/temp/trunk/Lib/swig.swg:312)
7160 . top . include . include . include (/usr/share/swig/temp/trunk/Lib/swigwarnings.swg:39)
7161 now:
7162 /usr/share/swig/temp/trunk/Lib/swig.swg:312: . top . include . include
7163 /usr/share/swig/temp/trunk/Lib/swigwarnings.swg:39: . top . include . include . include
7164
7165 2010-01-03: wsfulton
7166 Fix missing file/line numbers for typemap warnings and in output from the
7167 -debug-tmsearch/-debug-tmused options.
7168
7169 2010-01-03: wsfulton
7170 Add typemaps used debugging option (-debug-tmused). When used each line displays
7171 the typemap used for each type for which code is being generated including the file
7172 and line number related to the type. This is effectively a condensed form of the
7173 -debug-tmsearch option. Documented in Typemaps.html.
7174
7175 2009-12-23: wsfulton
7176 Fix for %javaexception and directors so that all the appropriate throws clauses
7177 are generated. Problem reported by Peter Greenwood.
7178
7179 2009-12-20: wsfulton
7180 Add -debug-tmsearch option for debugging the typemap pattern matching rules.
7181 Documented in Typemaps.html.
7182
7183 2009-12-12: wsfulton
7184 [Octave] Remove the -api option and use the new OCTAVE_API_VERSION_NUMBER
7185 macro provided in the octave headers for determining the api version instead.
7186
7187 2009-12-04: olly
7188 [Ruby] Improve support for Ruby 1.9 under GCC. Addresses part of
7189 SF#2859614.
7190
7191 2009-12-04: olly
7192 Fix handling of modulo operator (%) in constant expressions
7193 (SF#2818562).
7194
7195 2009-12-04: olly
7196 [PHP] "empty" is a reserved word in PHP, so rename empty() method
7197 on STL classes to "is_empty()" (previously this was automatically
7198 renamed to "c_empty()").
7199 *** POTENTIAL INCOMPATIBILITY ***
7200
7201 2009-12-03: olly
7202 [PHP] Add typemaps for long long and unsigned long long, and for
7203 pointer to method.
7204
7205 2009-12-02: olly
7206 [PHP] Fix warning and rename of reserved class name to be case
7207 insensitive.
7208
7209 2009-12-01: wsfulton
7210 Revert support for %extend and memberin typemaps added in swig-1.3.39. The
7211 memberin typemaps are ignored again for member variables within a %extend block.
7212 Documentation inconsistency reported by Torsten Landschoff.
7213
7214 2009-11-29: wsfulton
7215 [Java, C#] Fix generated quoting when using %javaconst(1)/%csconst(1) for
7216 static const char member variables.
7217
7218 %javaconst(1) A;
7219 %csconst(1) A;
7220 struct X {
7221 static const char A = 'A';
7222 };
7223
7224 2009-11-26: wsfulton
7225 [Java, C#] Fix %javaconst(1)/%csconst(1) for static const member variables to
7226 use the actual constant value if it is specified, rather than the C++ code to
7227 access the member.
7228
7229 %javaconst(1) EN;
7230 %csconst(1) EN;
7231 struct X {
7232 static const int EN = 2;
7233 };
7234
7235 2009-11-23: wsfulton
7236 C++ nested typedef classes can now be handled too, for example:
7237 struct Outer {
7238 typedef Foo { } FooTypedef1, FooTypedef2;
7239 };
7240
7241 2009-11-18: wsfulton
7242 The wrappers for C nested structs are now generated in the same order as declared
7243 in the parsed code.
7244
7245 2009-11-18: wsfulton
7246 Fix #491476 - multiple declarations of nested structs, for example:
7247 struct Outer {
7248 struct {
7249 int val;
7250 } inner1, inner2, *inner3, inner4[1];
7251 } outer;
7252
7253 2009-11-17: wsfulton
7254 Fix parsing of enum declaration and initialization, for example:
7255
7256 enum ABC {
7257 a,
7258 b,
7259 c
7260 } A = a, *pC = &C, array[3] = {a, b, c};
7261
7262 2009-11-17: wsfulton
7263 Fix parsing of struct declaration and initialization, for example:
7264
7265 struct S {
7266 int x;
7267 } instance = { 10 };
7268
7269 2009-11-15: wsfulton
7270 Fix #1960977 - Syntax error parsing derived nested class declaration and member
7271 variable instance.
7272
7273 2009-11-14: wsfulton
7274 Fix #2310483 - function pointer typedef within extern "C" block.
7275
7276 2009-11-13: wsfulton
7277 Fix usage of nested template classes within templated classes so that compilable code
7278 is generated.
7279
7280 2009-11-13: olly
7281 [php] Fix place where class prefix (as specified with -prefix)
7282 wasn't being used. Patch from gverbruggen in SF#2892647.
7283
7284 2009-11-12: wsfulton
7285 Fix usage of nested template classes so that compilable code is generated - the nested
7286 template class is now treated like a normal nested classes, that is, as an opaque type
7287 unless the nestedworkaround feature is used.
7288
7289 2009-11-12: wsfulton
7290 Replace SWIGWARN_PARSE_NESTED_CLASS with SWIGWARN_PARSE_NAMED_NESTED_CLASS and
7291 SWIGWARN_PARSE_UNNAMED_NESTED_CLASS for named and unnamed nested classes respectively.
7292
7293 Named nested class ignored warnings can now be suppressed by name using %warnfilter, eg:
7294
7295 %warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::Inner;
7296
7297 but clearly unnamed nested classes cannot and the global suppression is still required, eg:
7298
7299 #pragma SWIG nowarn=SWIGWARN_PARSE_UNNAMED_NESTED_CLASS
7300
7301 2009-11-11: wsfulton
7302 Added the nestedworkaround feature as a way to use the full functionality of a nested class
7303 (C++ mode only). It removes the nested class from SWIG's type information so it is as if SWIG
7304 had never parsed the nested class. The documented nested class workarounds using a global
7305 fake class stopped working when SWIG treated the nested class as an opaque pointer, and
7306 this feature reverts this behaviour. The documentation has been updated with details of how
7307 to use and implement it, see the "Nested classes" section in SWIGPlus.html.
7308
7309 2009-11-11: wsfulton
7310 There were a number of C++ cases where nested classes/structs/unions were being handled
7311 as if C code was being parsed which would oftentimes lead to uncompilable code as an
7312 attempt was made to wrap the nested structs like it is documented for C code. Now all
7313 nested structs/classes/unions are ignored in C++ mode, as was always documented. However,
7314 there is an improvement as usage of nested structs/classes/unions is now always treated
7315 as an opaque type by default, resulting in generated code that should always compile.
7316
7317 *** POTENTIAL INCOMPATIBILITY ***
7318
7319 2009-11-09: drjoe
7320 Fix R for -fcompact and add std_map.i
7321
7322 2009-11-08: wsfulton
7323 Fix inconsistency for nested structs/unions/classes. Uncompilable code was being
7324 generated when inner struct and union declarations were used as types within the
7325 inner struct. The inner struct/union is now treated as a forward declaration making the
7326 behaviour the same as an inner class. (C++ code), eg:
7327
7328 struct Outer {
7329 struct InnerStruct { int x; };
7330 InnerStruct* getInnerStruct();
7331 };
7332
7333 2009-11-08: wsfulton
7334 Ignored nested class/struct warnings now display the name of the ignored class/struct.
7335
7336 2009-11-07: wsfulton
7337 Bug #1514681 - Fix nested template classes within a namespace generated uncompilable
7338 code and introduced strange side effects to other wrapper code especially code
7339 after the nested template class. Note that nested template classes are still ignored.
7340
7341 2009-11-07: wsfulton
7342 Add new debug options:
7343 -debug-symtabs - Display symbol tables information
7344 -debug-symbols - Display target language symbols in the symbol tables
7345 -debug-csymbols - Display C symbols in the symbol tables
7346
7347 2009-11-03: wsfulton
7348 Fix some usage of unary scope operator (::) denoting global scope, for example:
7349
7350 namespace AA { /* ... */ }
7351 using namespace ::AA;
7352
7353 and bug #1816802 - SwigValueWrapper should be used:
7354
7355 struct CC {
7356 CC(int); // no default constructor
7357 };
7358 ::CC x();
7359
7360 and in template parameter specializations:
7361
7362 struct S {};
7363 template <typename T> struct X { void a() {} };
7364 template <> struct X<S> { void b() {} };
7365 %template(MyTConcrete) X< ::S >;
7366
7367 plus probably some other corner case usage of ::.
7368
7369 2009-11-02: olly
7370 [Python] Fix potential memory leak in initialisation code for the
7371 generated module.
7372
7373 2009-10-23: wsfulton
7374 Fix seg fault when using a named nested template instantiation using %template(name)
7375 within a class. A warning that these are not supported is now issued plus processing
7376 continues as if no name was given.
7377
7378 2009-10-20: wsfulton
7379 [Python] Fix std::vector<const T*>. This would previously compile, but not run correctly.
7380
7381 2009-10-20: wsfulton
7382 Fixed previously fairly poor template partial specialization and explicit
7383 specialization support. Numerous bugs in this area have been fixed including:
7384
7385 - Template argument deduction implemented for template type arguments, eg this now
7386 works:
7387 template<typename T> class X {};
7388 template<typename T> class X<T *> {};
7389 %template(X1) X<const int *>; // Chooses T * specialization
7390
7391 and more complex cases with multiple parameters and a mix of template argument
7392 deduction and explicitly specialised parameters, eg:
7393 template <typename T1, typename T2> struct TwoParm { void a() {} };
7394 template <typename T1> struct TwoParm<T1 *, int *> { void e() {} };
7395 %template(E) TwoParm<int **, int *>;
7396
7397 Note that the primary template must now be in scope, like in C++, when
7398 an explicit or partial specialization is instantiated with %template.
7399
7400 *** POTENTIAL INCOMPATIBILITY ***
7401
7402 2009-09-14: wsfulton
7403 [C#] Add %csattributes for adding C# attributes to enum values, see docs for example.
7404
7405 2009-09-11: wsfulton
7406 Fix memmove regression in cdata.i as reported by Adriaan Renting.
7407
7408 2009-09-07: wsfulton
7409 Fix constant expressions containing <= or >=.
7410
7411 2009-09-02: wsfulton
7412 The following operators in constant expressions now result in type bool for C++
7413 wrappers and remain as type int for C wrappers, as per each standard:
7414
7415 && || == != < > <= >= (Actually the last 4 are still broken). For example:
7416
7417 #define A 10
7418 #define B 10
7419 #define A_EQ_B A == B // now wrapped as type bool for C++
7420 #define A_AND_B A && B // now wrapped as type bool for C++
7421
7422 2009-09-02: wsfulton
7423 Fix #2845746. true and false are now recognised keywords (only when wrapping C++).
7424 Constants such as the following are now wrapped (as type bool):
7425 #define FOO true
7426 #define BAR FOO && false
7427
7428 Version 1.3.40 (18 August 2009)
7429 ===============================
7430
7431 2009-08-17: olly
7432 [Perl] Add "#undef do_exec" to our clean up of Perl global
7433 namespace pollution.
7434
7435 2009-08-17: olly
7436 [PHP] Fix to wrap a resource returned by __get() in a PHP object (SF#2549217).
7437
7438 2009-08-17: wsfulton
7439 Fix #2797485 After doing a 'make clean', install fails if yodl2man or yodl2html
7440 is not available.
7441
7442 2009-08-16: wsfulton
7443 [Octave] Caught exceptions display the type of the C++ exception instead of the
7444 generic "c++-side threw an exception" message.
7445
7446 2009-08-16: wsfulton
7447 [Java] When %catches is used, fix so that any classes specified in the "throws"
7448 attribute of the "throws" typemap are generated into the Java method's throws clause.
7449
7450 2009-08-16: wsfulton
7451 [C#] Fix exception handling when %catches is used, reported by Juan Manuel Alvarez.
7452
7453 2009-08-15: wsfulton
7454 Fix %template seg fault on some cases of overloading the templated method.
7455 Bug reported by Jan Kupec.
7456
7457 2009-08-15: wsfulton
7458 [Ruby] Add numerous missing wrapped methods for std::vector<bool> specialization
7459 as reported by Youssef Jones.
7460
7461 2009-08-14: wsfulton
7462 [Perl] Add SWIG_ConvertPtrAndOwn() method into the runtime for smart pointer
7463 memory ownership control. shared_ptr support still to be added. Patch from
7464 David Fletcher.
7465
7466 2009-08-14: olly
7467 [PHP] PHP5 now wraps static member variables as documented.
7468
7469 2009-08-14: olly
7470 [PHP] Update the PHP "class" example to work with PHP5 and use
7471 modern wrapping features.
7472
7473 2009-08-13: wsfulton
7474 [PHP] std::vector wrappers overhaul. They no longer require the
7475 specialize_std_vector() macro. Added wrappers for capacity() and reserve().
7476
7477 2009-08-13: wsfulton
7478 [PHP] Add const reference typemaps. const reference primitive types are
7479 now passed by value rather than pointer like the other target languages.
7480 Fixes SF#2524029.
7481
7482 2009-08-08: wsfulton
7483 [Python] More user friendly AttributeError is raised when there are
7484 no constructors generated for the proxy class in the event that the
7485 class is abstract - the error message is now
7486 "No constructor defined - class is abstract" whereas if there are no
7487 public constructors for any other reason and the class is not abstract,
7488 the message remains
7489 "No constructor defined".
7490 [tcl] Similarly for tcl when using -itcl.
7491
7492 2009-08-04: olly
7493 [PHP] Fix generated code to work with PHP 5.3.
7494
7495 2009-08-04: vmiklos
7496 [PHP] Various mathematical functions (which would conflict
7497 with the built-in PHP ones) are now automatically handled by
7498 adding a 'c_' prefix.
7499
7500 2009-08-03: wsfulton
7501 [C#] The std::vector<T> implementation is improved and now uses $typemap such
7502 that the proxy class for T no longer has to be specified in some macros
7503 for correct C# compilation; the following macros are deprecated, where
7504 CSTYPE was the C# type for the C++ class CTYPE:
7505
7506 SWIG_STD_VECTOR_SPECIALIZE_MINIMUM(CSTYPE, CTYPE)
7507 usage should be removed altogether
7508
7509 SWIG_STD_VECTOR_SPECIALIZE(CSTYPE, CTYPE)
7510 should be replaced with:
7511 SWIG_STD_VECTOR_ENHANCED(CTYPE)
7512
7513 Some more details in csharp/std_vector.i
7514
7515 *** POTENTIAL INCOMPATIBILITY ***
7516
7517 2009-07-31: olly
7518 [Python] Fix indentation so that we give a useful error if the
7519 module can't be loaded. Patch from Gaetan Lehmann in SF#2829853.
7520
7521 2009-07-29: wsfulton
7522 Add $typemap(method, typelist) special variable macro. This allows
7523 the contents of a typemap to be inserted within another typemap.
7524 Fully documented in Typemaps.html.
7525
7526 2009-07-29: vmiklos
7527 [PHP] Static member variables are now prefixed with the
7528 class name. This allows static member variables with the
7529 same name in different classes.
7530
7531 2009-07-29: olly
7532 [Python] Add missing locks to std::map wrappers. Patch from
7533 Paul Hampson in SF#2813836.
7534
7535 2009-07-29: olly
7536 [PHP] Fix memory leak in PHP OUTPUT typemaps. Reported by Hitoshi
7537 Amano in SF#2826322.
7538
7539 2009-07-29: olly
7540 [PHP] Fix memory leak in PHP resource destructor for classes
7541 without a destructor and non-class types. Patch from Hitoshi Amano
7542 in SF#2825303.
7543
7544 2009-07-28: olly
7545 [PHP] Update warnings about clashes between identifiers and PHP
7546 keywords and automatic renaming to work with the PHP5 class
7547 wrappers. Fixes SF#1613679.
7548
7549 2009-07-28: vmiklos
7550 [PHP] If a member function is not public but it has a base
7551 which is public, then now a warning is issued and the member
7552 function will be public, as PHP requires this.
7553
7554 2009-07-21: vmiklos
7555 [PHP] Director support added.
7556
7557 2009-07-15: olly
7558 [Perl] Don't specify Perl prototype "()" for a constructor with a
7559 different name to the class, as such constructors can still take
7560 parameters.
7561
7562 2009-07-12: xavier98
7563 [Octave] Add support for Octave 3.2 API
7564
7565 2009-07-05: olly
7566 [PHP] Update the list of PHP keywords - "cfunction" is no longer a
7567 keyword in PHP5 and PHP 5.3 added "goto", "namespace", "__DIR__",
7568 and "__NAMESPACE__".
7569
7570 2009-07-03: olly
7571 [Tcl] To complement USE_TCL_STUBS, add support for USE_TK_STUBS
7572 and SWIG_TCL_STUBS_VERSION. Document all three in the Tcl chapter
7573 of the manual. Based on patch from SF#2810380 by Christian
7574 Gollwitzer.
7575
7576 2009-07-02: vmiklos
7577 [PHP] Added factory.i for PHP, see the li_factory testcase
7578 for more info on how to use it.
7579
7580 2009-07-02: wsfulton
7581 Fix -Wallkw option as reported by Solomon Gibbs.
7582
7583 2009-07-02: wsfulton
7584 Fix syntax error when a nested struct contains a comment containing a * followed
7585 eventually by a /. Regression from 1.3.37, reported by Solomon Gibbs.
7586
7587 2009-07-01: vmiklos
7588 [PHP] Unknown properties are no longer ignored in proxy
7589 classes.
7590
7591 2009-07-01: vmiklos
7592 [PHP] Fixed %newobject behaviour, previously any method
7593 marked with %newobject was handled as a constructor.
7594
7595 2009-06-30: olly
7596 [Ruby] Undefine close and connect macros defined by Ruby API
7597 headers as we don't need them and they can clash with C++ methods
7598 being wrapped. Patch from Vit Ondruch in SF#2814430.
7599
7600 2009-06-26: olly
7601 [Ruby] Fix to handle FIXNUM values greater than MAXINT passed for a
7602 double parameter.
7603
7604 2009-06-24: wsfulton
7605 Fix wrapping methods with default arguments and the compactdefaultargs feature
7606 where a class is passed by value and is assigned a default value. The SwigValueWrapper
7607 template workaround for a missing default constructor is no longer used as the code
7608 generated does not call the default constructor.
7609
7610 2009-06-16: wsfulton
7611 [Java,C#] Fix enum marshalling when %ignore is used on one of the enum items.
7612 Incorrect enum values were being passed to the C++ layer or compilation errors resulted.
7613
7614 2009-06-02: talby
7615 [Perl] Resolved reference.i overload support problem
7616 identified by John Potowsky.
7617
7618 2009-05-26: wsfulton
7619 [C#] Improved std::map wrappers based on patch from Yuval Baror. The C# proxy
7620 now implements System.Collections.Generic.IDictionary<>.
7621
7622 These std:map wrappers have a non-backwards compatible overhaul to make them
7623 like a .NET IDictionary. Some method names have changed as following:
7624 set -> setitem (use this[] property now)
7625 get -> getitem (use this[] property now)
7626 has_key -> ContainsKey
7627 del -> Remove
7628 clear -> Clear
7629
7630 The following macros used for std::map wrappers are deprecated and will no longer work:
7631 specialize_std_map_on_key
7632 specialize_std_map_on_value
7633 specialize_std_map_on_both
7634
7635 *** POTENTIAL INCOMPATIBILITY ***
7636
7637 2009-05-20: vmiklos
7638 [PHP] Add the 'thisown' member to classes. The usage of it
7639 is the same as the Python thisown one: it's 1 by default and
7640 you can set it to 0 if you want to prevent freeing it. (For
7641 example to prevent a double free.)
7642
7643 2009-05-14: bhy
7644 [Python] Fix the wrong pointer value returned by SwigPyObject_repr().
7645
7646 2009-05-13: mutandiz (Mikel Bancroft)
7647 [allegrocl] Minor tweak when wrapping in -nocwrap mode.
7648
7649 2009-05-11: wsfulton
7650 [C#] Improved std::vector wrappers on the C# proxy side from Yuval Baror. These
7651 implement IList<> instead of IEnumerable<> where possible.
7652
7653 2009-04-29: wsfulton
7654 [Java, C#] Add the 'notderived' attribute to the javabase and csbase typemaps.
7655 When this attribute is set, the typemap will not apply to classes that are derived
7656 from a C++ base class, eg
7657 %typemap(csbase, notderived="1") SWIGTYPE "CommonBase"
7658
7659 2009-04-29: olly
7660 [Python] Don't attempt to acquire the GIL in situations where we
7661 know that it will already be locked. This avoids some dead-locks
7662 with mod_python (due to mod_python bugs which are apparently
7663 unlikely to ever be fixed), and results in smaller wrappers which
7664 run a little faster (in tests with Xapian on x86-64 Ubuntu 9.04,
7665 the stripped wrapper library was 11% smaller and ran 2.7% faster).
7666
7667 2009-04-21: wsfulton
7668 [C#] Fix #2753469 - bool &OUTPUT and bool *OUTPUT typemaps initialisation.
7669
7670 2009-04-09: wsfulton
7671 Fix #2746858 - C macro expression using floating point numbers
7672
7673 2009-03-30: olly
7674 [PHP] The default out typemap for char[ANY] now returns the string up to a
7675 zero byte, or the end of the array if there is no zero byte. This
7676 is the same as Python does, and seems more generally useful than
7677 the previous behaviour of returning the whole contents of the array
7678 including any zero bytes. If you want the old behaviour, you can provide
7679 your own typemap to do this:
7680
7681 %typemap(out) char [ANY]
7682 %{
7683 RETVAL_STRINGL($1, $1_dim0, 1);
7684 %}
7685
7686 Version 1.3.39 (21 March 2009)
7687 ==============================
7688
7689 2009-03-19: bhy
7690 [Python] Fix the memory leak related to Python 3 unicode and C char* conversion,
7691 which can be shown in the following example before this fix:
7692
7693 from li_cstring import *
7694 i=0
7695 while True:
7696 i += 1
7697 n = str(i)*10
7698 test3(n)
7699
7700 This fix affected SWIG_AsCharPtrAndSize() so you cannot call this function with
7701 a null alloc and non-null cptr argument in Python 3, otherwise a runtime error
7702 will be raised.
7703
7704 2009-03-18: wsfulton
7705 [C#] std::vector<T> wrapper improvements for .NET 2 and also providing the
7706 necessary machinery to use the std::vector<T> wrappers with more advanced features such
7707 as LINQ - the C# proxy class now derives from IEnumerable<>. The default is now to
7708 generate code requiring .NET 2 as a minimum, although the C# code can be compiled
7709 for .NET 1 by defining the SWIG_DOTNET_1 C# preprocessor constant. See the
7710 std_vector.i file for more details.
7711
7712 *** POTENTIAL INCOMPATIBILITY ***
7713
7714 2009-03-12: wsfulton
7715 [Ruby] Fix #2676738 SWIG generated symbol name clashes.
7716
7717 2009-03-01: bhy
7718 [Python] Some fixes for Python 3.0.1 and higher support. In 3.0.1, the C API function
7719 PyObject_Compare is removed, so PyObject_RichCompareBool is used for replacement.
7720 Struct initilization of SwigPyObject and SwigPyObject_as_number changed to reflect
7721 the drop of tp_compare and nb_long.
7722
7723 2009-03-01: bhy
7724 [Python] Fix SF#2583160. Now the importer in Python shadow wrapper take care of the
7725 case that module already imported at other place.
7726
7727 2009-02-28: bhy
7728 [Python] Fix SF#2637352. Move struct declaration of SWIG_module in pyinit.swg before
7729 the method calls, since some C compiler don't allow declaration in middle of function
7730 body.
7731
7732 2009-02-21: wsfulton
7733 [Allegrocl] Fix seg fault wrapping some constant variable (%constant) types.
7734
7735 2009-02-20: wsfulton
7736 [CFFI] Fix seg faults when for %extend and using statements.
7737
7738 2009-02-20: wsfulton
7739 Fix SF #2605955: -co option which broke in 1.3.37.
7740
7741 2009-02-20: wsfulton
7742 New %insert("begin") section added. Also can be used as %begin. This is a new
7743 code section reserved entirely for users and the code within the section is generated
7744 at the top of the C/C++ wrapper file and so provides a means to put custom code
7745 into the wrapper file before anything else that SWIG generates.
7746
7747 2009-02-17: wsfulton
7748 'make clean-test-suite' will now run clean on ALL languages. Previously it only
7749 ran the correctly configured languages. This way it is now possible to clean up
7750 properly after running 'make partialcheck-test-suite'.
7751
7752 2009-02-14: wsfulton
7753 Extend attribute library support for structs/classes and the accessor functions use
7754 pass/return by value semantics. Two new macros are available and usage is identical
7755 to %attribute. These are %attributeval for structs/classes and %attributestring for
7756 string classes, like std::string. See attribute.swg for more details.
7757
7758 2009-02-13: wsfulton
7759 Add support for %extend and memberin typemaps. Previously the memberin typemaps were
7760 ignored for member variables within a %extend block.
7761
7762 2009-02-12: wsfulton
7763 Remove unnecessary temporary variable when wrapping return values that are references.
7764 Example of generated code for wrapping:
7765
7766 struct XYZ {
7767 std::string& refReturn();
7768 };
7769
7770 used to be:
7771
7772 std::string *result = 0 ;
7773 ...
7774 {
7775 std::string &_result_ref = (arg1)->refReturn();
7776 result = (std::string *) &_result_ref;
7777 }
7778
7779 Now it is:
7780
7781 std::string *result = 0 ;
7782 ...
7783 result = (std::string *) &(arg1)->refReturn();
7784
7785 2009-02-08: bhy
7786 Change the SIZE mapped by %pybuffer_mutable_binary and %pybuffer_binary in pybuffer.i from
7787 the length of the buffer to the number of items in the buffer.
7788
7789 2009-02-08: wsfulton
7790 Fix %feature not working for conversion operators, reported by Matt Sprague, for example:
7791 %feature("cs:methodmodifiers") operator bool "protected";
7792
7793 2009-02-07: wsfulton
7794 [MzScheme] Apply #2081967 configure changes for examples to build with recent PLT versions.
7795 Also fixes Makefile errors building SWIG executable when mzscheme package is installed
7796 (version 3.72 approx and later).
7797
7798 2009-02-04: talby
7799 [Perl] Fix SF#2564192 reported by David Kolovratnk.
7800 SWIG_AsCharPtrAndSize() now handles "get" magic.
7801
7802 Version 1.3.38 (31 January 2009)
7803 ================================
7804
7805 2009-01-31: bhy
7806 [Python] Fix SF#2552488 reported by Gaetan Lehmann. Now %pythonprepend
7807 and %pythonappend have correct indentation.
7808
7809 2009-01-31: bhy
7810 [Python] Fix SF#2552048 reported by Gaetan Lehmann. The parameter list
7811 of static member function in generated proxy code should not have the
7812 'self' parameter.
7813
7814 2009-01-29: wsfulton
7815 Fix regression introduced in 1.3.37 where the default output directory
7816 for target language specific files (in the absence of -outdir) was no
7817 longer the same directory as the generated c/c++ file.
7818
7819 2009-01-28: wsfulton
7820 [Java, C#] Fix proxy class not being used when the global scope operator
7821 was used for parameters passed by value. Reported by David Piepgrass.
7822
7823 2009-01-15: wsfulton
7824 [Perl] Fix seg fault when running with -v option, reported by John Ky.
7825
7826 Version 1.3.37 (13 January 2009)
7827 ================================
7828
7829 2009-01-13: mgossage
7830 [Lua] Added contract support for requiring that unsigned numbers are >=0
7831 Rewrote much of Examples/Lua/embed3.
7832 Added a lot to the Lua documentation.
7833
7834 2009-01-13: wsfulton
7835 Fix compilation error when using directors on protected virtual overloaded
7836 methods reported by Sam Hendley.
7837
7838 2009-01-12: drjoe
7839 [R] Fixed handling of integer arrays
7840
7841 2009-01-10: drjoe
7842 [R] Fix integer handling in r to deal correctly with signed
7843 and unsigned issues
7844
7845 2009-01-10: wsfulton
7846 Patch #1992756 from Colin McDonald - %contract not working for classes
7847 in namespace
7848
7849 2009-01-05: olly
7850 Mark SWIGPERL5, SWIGPHP5, and SWIGTCL8 as deprecated in the source
7851 code and remove documentation of them.
7852
7853 2008-12-30: wsfulton
7854 Bug #2430756. All the languages now define a macro in the generated C/C++
7855 wrapper file indicating which language is being wrapped. The macro name is the
7856 same as those defined when SWIG is run, eg SWIGJAVA, SWIGOCTAVE, SWIGCSHARP etc
7857 and are listed in the "Conditional Compilation" section in the documentation.
7858
7859 2008-12-23: wsfulton
7860 [Java] Fix #2153773 - %nojavaexception was clearing the exception feature
7861 instead of disabling it. Clearing checked Java exceptions also didn't work.
7862 The new %clearjavaexception can be used for clearing the exception feature.
7863
7864 2008-12-22: wsfulton
7865 Fix #2432801 - Make SwigValueWrapper exception safe for when copy constructors
7866 throw exceptions.
7867
7868 2008-12-21: wsfulton
7869 Apply patch #2440046 which fixes possible seg faults for member and global
7870 variable char arrays when the strings are larger than the string array size.
7871
7872 2008-12-20: wsfulton
7873 The ccache compiler cache has been adapted to work with SWIG and
7874 named ccache-swig. It now works with C/C++ compilers as well as SWIG
7875 and can result in impressive speedups when used to recompile unchanged
7876 code with either a C/C++ compiler or SWIG. Documentation is in CCache.html
7877 or the installed ccache-swig man page.
7878
7879 2008-12-12: wsfulton
7880 Apply patch from Kalyanov Dmitry which fixes parsing of nested structs
7881 containing comments.
7882
7883 2008-12-12: wsfulton
7884 Fix error message in some nested struct and %inline parsing error situations
7885 such as unterminated strings and comments.
7886
7887 2008-12-07: olly
7888 [PHP] Fix warnings when compiling generated wrapper with GCC 4.3.
7889
7890 2008-12-06: wsfulton
7891 [PHP] Deprecate %pragma(php4). Please use %pragma(php) instead.
7892 The following two warnings have been renamed:
7893 WARN_PHP4_MULTIPLE_INHERITANCE -> WARN_PHP_MULTIPLE_INHERITANCE
7894 WARN_PHP4_UNKNOWN_PRAGMA -> WARN_PHP_UNKNOWN_PRAGMA
7895
7896 *** POTENTIAL INCOMPATIBILITY ***
7897
7898 2008-12-04: bhy
7899 [Python] Applied patch SF#2158938: all the SWIG symbol names started with Py
7900 are changed, since they are inappropriate and discouraged in Python
7901 documentation (from http://www.python.org/doc/2.5.2/api/includes.html):
7902
7903 "All user visible names defined by Python.h (except those defined by
7904 the included standard headers) have one of the prefixes "Py" or "_Py".
7905 Names beginning with "_Py" are for internal use by the Python implementation
7906 and should not be used by extension writers. Structure member names do
7907 not have a reserved prefix.
7908
7909 Important: user code should never define names that begin with "Py" or "_Py".
7910 This confuses the reader, and jeopardizes the portability of the user
7911 code to future Python versions, which may define additional names beginning
7912 with one of these prefixes."
7913
7914 Here is a brief list of what changed:
7915
7916 PySwig* -> SwigPy*
7917 PyObject_ptr -> SwigPtr_PyObject
7918 PyObject_var -> SwigVar_PyObject
7919 PySequence_Base, PySequence_Cont, PySequence_Ref ->
7920 SwigPySequence_Base, SwigPySequence_Cont, SwigPySequence_Ref
7921 PyMap* -> SwigPyMap*
7922
7923 We provided a pyname_compat.i for backward compatibility. Users whose code having
7924 these symbols and do not want to change it could simply include this file
7925 at front of your code. A better solution is to run the converting tool on
7926 your code, which has been put in SWIG's SVN trunk (Tools/pyname_patch.py) and
7927 you can download it here:
7928 https://swig.svn.sourceforge.net/svnroot/swig/trunk/Tools/pyname_patch.py
7929
7930 *** POTENTIAL INCOMPATIBILITY ***
7931
7932 2008-12-02: wsfulton
7933 [Python] Apply patch #2143727 from Serge Monkewitz to fix importing base classes
7934 when the package option is specified in %module and that module is %import'ed.
7935
7936 2008-11-28: wsfulton
7937 [UTL] Fix #2080497. Some incorrect acceptance of types in the STL, eg a double * element
7938 passed into a vector<int *> constructor would be accepted, but the ensuing behaviour
7939 was undefined. Now the type conversion correctly raises an exception.
7940
7941 2008-11-24: wsfulton
7942 Add -outcurrentdir option. This sets the default output directory to the current
7943 directory instead of the path specified by the input file. This option enables
7944 behaviour similar to c/c++ compilers. Note that this controls the output directory,
7945 but only in the absence of the -o and/or -outdir options.
7946
7947 2008-11-23: wsfulton
7948 [ruby] Apply patch #2263850 to fix ruby/file.i ... rubyio.h filename change in
7949 ruby 1.9.
7950
7951 2008-11-23: wsfulton
7952 Apply patch #2319790 from Johan Hake to fix shared_ptr usage in std::tr1 namespace.
7953
7954 2008-11-21: wsfulton
7955 The use of the include path to find the input file is now deprecated.
7956 This makes the behaviour of SWIG the same as C/C++ compilers in preparation
7957 for use with ccache.
7958
7959 2008-11-16: wsfulton
7960 Fix -nopreprocess option to:
7961 - correctly report file names in warning and error messages.
7962 - use the original input filename that created the preprocessed output when
7963 determining the C++ wrapper file name (in the absence of -o). Previously
7964 the name of the input file containing the preprocessed output was used.
7965
7966 2008-11-11: wsfulton
7967 [Java] Add patch #2152691 from MATSUURA Takanori which fixes compiles using the
7968 Intel compiler
7969
7970 2008-11-01: wsfulton
7971 Add patch #2128249 from Anatoly Techtonik which corrects the C/C++ proxy
7972 class being reported for Python docstrings when %rename is used.
7973
7974 2008-11-01: wsfulton
7975 Add the strip encoder patch from Anatoly Techtonik #2130016. This enables an
7976 easy way to rename symbols by stripping a commonly used prefix in all the
7977 function/struct names. It works in the same way as the other encoders, such as
7978 title, lower, command etc outlined in CHANGES file dated 12/30/2005. Example
7979 below will rename wxAnotherWidget to AnotherWidget and wxDoSomething to
7980 DoSomething:
7981
7982 %rename("%(strip:[wx])s") "";
7983
7984 struct wxAnotherWidget {
7985 void wxDoSomething();
7986 };
7987
7988 2008-09-26: mutandiz
7989 [allegrocl]
7990 Lots of test-suite work.
7991 - Fix ordering of wrapper output and %{ %} header output.
7992 - Fix declarations of local vars in C wrappers.
7993 - Fix declaration of defined constants in C wrappers.
7994 - Fix declaration of EnumValues in C wrappers.
7995 - add some const typemaps to allegrocl.swg
7996 - add rename for operator bool() overloads.
7997
7998 2008-09-25: olly
7999 [PHP5] Fill in typemaps for SWIGTYPE and void * (SF#2095186).
8000
8001 2008-09-22: mutandiz (Mikel Bancroft)
8002 [allegrocl]
8003 - Support wrapping of types whose definitions are not seen by
8004 SWIG. They are treated as forward-referenced classes and if a
8005 definition is not seen are treated as (* :void).
8006 - Don't wrap the contents of unnamed namespaces.
8007 - More code cleanup. Removed some extraneous warnings.
8008 - start work on having the allegrocl mod pass the cpp test-suite.
8009
8010 2008-09-19: olly
8011 [PHP5] Add typemaps for long long and unsigned long long.
8012
8013 2008-09-18: wsfulton
8014 [C#] Added C# array typemaps provided by Antti Karanta.
8015 The arrays provide a way to use MarshalAs(UnmanagedType.LPArray)
8016 and pinning the array using 'fixed'. See arrays_csharp.i library file
8017 for details.
8018
8019 2008-09-18: wsfulton
8020 Document the optional module attribute in the %import directive,
8021 see Modules.html. Add a warning for Python wrappers when the
8022 module name for an imported base class is missing, requiring the
8023 module attribute to be added to %import, eg
8024
8025 %import(module="FooModule") foo.h
8026
8027 2008-09-18: olly
8028 [PHP5] Change the default input typemap for char * to turn PHP
8029 Null into C NULL (previously it was converted to an empty string).
8030 The new behaviour is consistent with how the corresponding output
8031 typemap works (SF#2025719).
8032
8033 If you want to keep the old behaviour, add the following typemap
8034 to your interface file (PHP's convert_to_string_ex() function does
8035 the converting from PHP Null to an empty string):
8036
8037 %typemap(in) char * {
8038 convert_to_string_ex($input);
8039 $1 = Z_STRVAL_PP($input);
8040 }
8041
8042 2008-09-18: olly
8043 [PHP5] Fix extra code added to proxy class constructors in the case
8044 where the only constructor takes no arguments.
8045
8046 2008-09-18: olly
8047 [PHP5] Fix wrapping of a renamed enumerated value of an enum class
8048 member (SF#2095273).
8049
8050 2008-09-17: mutandiz (Mikel Bancroft)
8051 [allegrocl]
8052 - Fix how forward reference typedefs are handled, so as not to conflict
8053 with other legit typedefs.
8054 - Don't (for now) perform an ffitype typemap lookup when trying to
8055 when calling compose_foreign_type(). This is actually a useful thing
8056 to do in certain cases, the test cases for which I can't currently
8057 locate :/. It's breaking some wrapping behavior that is more commonly
8058 seen, however. I'll readd in a more appropriate way when I can
8059 recreate the needed test case, or a user complains (which means
8060 they probably have a test case).
8061 - document the -isolate command-line arg in the 'swig -help' output.
8062 It was in the html docs, but not there.
8063 - small amount of code cleanup, removed some unused code.
8064 - some minor aesthetic changes.
8065
8066 2008-09-12: bhy
8067 [Python] Python 3.0 support branch merged into SWIG trunk. Thanks to
8068 Google Summer of Code 2008 for supporting this project! By default
8069 SWIG will generate interface files compatible with both Python 2.x
8070 and 3.0. And there's also some Python 3 new features that can be
8071 enabled by passing a "-py3" command line option to SWIG. These
8072 features are:
8073
8074 - Function annotation support
8075 Also, the parameter list of proxy function will be generated,
8076 even without the "-py3" option. However, the parameter list
8077 will fallback to *args if the function (or method) is overloaded.
8078 - Buffer interface support
8079 - Abstract base class support
8080
8081 For details of Python 3 support and these features, please see the
8082 "Python 3 Support" section in the "SWIG and Python" chapter of the SWIG
8083 documentation.
8084
8085 The "-apply" command line option and support of generating codes
8086 using apply() is removed. Since this is only required by very old
8087 Python.
8088
8089 This merge also patched SWIG's parser to solve a bug. By this patch,
8090 SWIG features able to be correctly applied on C++ conversion operator,
8091 such like this:
8092
8093 %feature("shadow") *::operator bool %{ ... %}
8094
8095 2008-09-02: richardb
8096 [Python] Commit patch #2089149: Director exception handling mangles
8097 returned exception. Exceptions raised by Python code in directors
8098 are now passed through to the caller without change. Also, remove
8099 the ": " prefix which used to be added to other director exceptions
8100 (eg, those due to incorrect return types).
8101
8102 2008-09-02: wsfulton
8103 [Python] Commit patch #1988296 GCItem multiple module linking issue when using
8104 directors.
8105
8106 2008-09-02: wsfulton
8107 [C#] Support for 'using' and 'fixed' blocks in the 'csin' typemap is now
8108 possible through the use of the pre attribute and the new terminator attribute, eg
8109
8110 %typemap(csin,
8111 pre=" using (CDate temp$csinput = new CDate($csinput)) {",
8112 terminator=" } // terminate temp$csinput using block",
8113 ) const CDate &
8114 "$csclassname.getCPtr(temp$csinput)"
8115
8116 See CSharp.html for more info.
8117
8118 2008-09-01: wsfulton
8119 [CFFI] Commit patch #2079381 submitted by Boris Smilga - constant exprs put into
8120 no-eval context in DEFCENUM
8121
8122 2008-08-02: wuzzeb
8123 [Chicken,Allegro] Commit Patch 2019314
8124 Fixes a build error in chicken, and several build errors and other errors
8125 in Allegro CL
8126
8127 2008-07-19: wsfulton
8128 Fix building of Tcl examples/test-suite on Mac OS X reported by Gideon Simpson.
8129
8130 2008-07-17: wsfulton
8131 Fix SF #2019156 Configuring with --without-octave or --without-alllang
8132 did not disable octave.
8133
8134 2008-07-14: wsfulton
8135 [Java, C#] Fix director typemaps for pointers so that NULL pointers are correctly
8136 marshalled to C#/Java null in director methods.
8137
8138 2008-07-04: olly
8139 [PHP] For std_vector.i and std_map.i, rename empty() to is_empty()
8140 since "empty" is a PHP reserved word. Based on patch from Mark Klein
8141 in SF#1943417.
8142
8143 2008-07-04: olly
8144 [PHP] The deprecated command line option "-make" has been removed.
8145 Searches on Google codesearch suggest that nobody is using it now
8146 anyway.
8147
8148 2008-07-04: olly
8149 [PHP] The SWIG cdata.i library module is now supported.
8150
8151 2008-07-03: olly
8152 [PHP] The deprecated command line option "-phpfull" has been
8153 removed. We recommend building your extension as a dynamically
8154 loadable module.
8155
8156 2008-07-02: olly
8157 [PHP4] Support for PHP4 has been removed. The PHP developers are
8158 no longer making new PHP4 releases, and won't even be providing
8159 patches for critical security issues after 2008-08-08.
8160
8161 2008-07-02: olly
8162 [Python] Import the C extension differently for Python 2.6 and
8163 later so that an implicit relative import doesn't produce a
8164 deprecation warning for 2.6 and a failure for 2.7 and later.
8165 Patch from Richard Boulton in SF#2008229, plus follow-up patches
8166 from Richard and Haoyu Bai.
8167
8168 Version 1.3.36 (24 June 2008)
8169 =============================
8170
8171 06/24/2008: wsfulton
8172 Remove deprecated -c commandline option (runtime library generation).
8173
8174 06/24/2008: olly
8175 [PHP] Fix assertion failure when handling %typemap(in,numinputs=0)
8176 (testcase ignore_parameter).
8177
8178 06/24/2008: olly
8179 [PHP] Fix segfault when wrapping a non-class function marked with
8180 %newobject (testcase char_strings).
8181
8182 06/22/2008: wsfulton
8183 [Java] Add a way to use AttachCurrentThreadAsDaemon instead of AttachCurrentThread
8184 in director code. Define the SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON macro, see
8185 Lib/java/director.swg.
8186
8187 06/21/2008: wsfulton
8188 [Ruby] Fix crashing in the STL wrappers (reject! and delete_if methods)
8189
8190 06/19/2008: wsfulton
8191 [Java, C#] C# and Java keywords will be renamed instead of just issuing a warning
8192 and then generating uncompilable code. Warning 314 gives the new name when a
8193 keyword is found.
8194
8195 06/19/2008: wsfulton
8196 [R] Keyword handling added. R Keywords will be renamed as necessary.
8197 Warning 314 gives the new name when a keyword is found.
8198
8199 06/17/2008: mgossage
8200 [Lua] Added missing support for bool& and bool*. Added runtest for li_typemaps testcase.
8201 (Bug #1938142)
8202
8203 06/07/2008: bhy
8204 Added test case keyword_rename, then made the keyword renaming works properly
8205 by fixing Swig_name_make() for a incomplete condition checking.
8206
8207 06/02/2008: wsfulton
8208 [Java, C#] Fix enum wrappers when using -noproxy.
8209
8210 05/30/2008: bhy
8211 Added std::wstring into Lib/typemaps/primtypes.swg, since it is also a primitive
8212 type in SWIG - fixed SF #1976978.
8213
8214 05/29/2008: wsfulton
8215 [Java, C#] Fix variable wrappers when using -noproxy.
8216
8217 05/29/2008: bhy
8218 [Python] Fixed a typo of %#ifdef in Lib/python/pycontainer.swg, which is related
8219 to -extranative SWIG option - SF #1971977.
8220
8221 05/20/2008: wsfulton
8222 New partialcheck makefile targets for partial testing of the test-suite. These
8223 just invoke SWIG, ie no compilation and no runtime testing. It can be faster
8224 when developing by just doing a directory diff of the files SWIG generates
8225 against those from a previous run. Example usage from the top level directory:
8226
8227 make partialcheck-test-suite
8228 make partialcheck-java-test-suite
8229
8230 This change also encompasses more flexibility in running the test-suite, eg
8231 it is possible to prefix the command line which runs any target language test
8232 with a tool. See the RUNTOOL, COMPILETOOL and SWIGTOOL targets in the common.mk
8233 file and makefiles in the test-suite directory. For example it is possible to
8234 run the runtime tests through valgrind using:
8235
8236 make check RUNTOOL="valgrind --leak-check=full"
8237
8238 or invoke SWIG under valgrind using:
8239
8240 make check SWIGTOOL="valgrind --tool=memcheck"
8241
8242 05/19/2008: drjoe
8243 [R] Fixed define that was breaking pre-2.7. Checked in
8244 patch from Soren Sonnenburg that creates strings in
8245 version independent way
8246
8247 05/15/2008: wsfulton
8248 [Java] Fix variable name clash in directors - SF #1963316 reported by Tristan.
8249
8250 05/14/2008: wsfulton
8251 Add an optimisation for functions that return objects by value, reducing
8252 the number of copies of the object that are made. Implemented using an
8253 optional attribute in the "out" typemap called "optimal". Details in
8254 Typemaps.html.
8255
8256 05/11/2008: olly
8257 [PHP] Check for %feature("notabstract") when generating PHP5 class
8258 wrapper.
8259
8260 05/11/2008: wsfulton
8261 Fix SF #1943608 - $self substitution in %contract, patch submitted by
8262 Toon Verstraelen.
8263
8264 05/09/2008: olly
8265 [PHP] Fix char * typemaps to work when applied to signed char * and
8266 unsigned char * (uncovered by testcase apply_strings).
8267
8268 05/09/2008: wsfulton
8269 Fix wrapping of char * member variables when using allprotected mode.
8270 Bug reported by Warren Wang.
8271
8272 05/09/2008: olly
8273 [PHP] Fix bad PHP code generated when wrapping an enum in a
8274 namespace (uncovered by testcase arrays_scope).
8275
8276 05/09/2008: olly
8277 [PHP] SWIG now runs the PHP testsuite using PHP5, not PHP4. PHP4
8278 is essentially obsolete now, so we care much more about solid PHP5
8279 support.
8280
8281 05/07/2008: wsfulton
8282 STL fixes when using %import rather than %include and the Solaris Workshop
8283 compiler and the Roguewave STL.
8284
8285 05/07/2008: wsfulton
8286 Fix wrapping of overloaded protected methods when using allprotected mode.
8287 Bug reported by Warren Wang.
8288
8289 05/03/2008: wsfulton
8290 Commit patch #1956607 to add -MT support from Richard Boulton.
8291 This patch mirrors the gcc -MT option which allows one to change the default
8292 Makefile target being generated when generating makefiles with the -M family
8293 of options. For example:
8294
8295 $ swig -java -MM -MT overriddenname -c++ example.i
8296 overriddenname: \
8297 example.i \
8298 example.h
8299
8300 04/30/2008: mgossage
8301 [Lua] Removed generation of _wrap_delete_XXXXX (wrappered destructor)
8302 which was unused and causing warning with g++ -Wall.
8303 Removed other unused warning in typemaps.i and other places.
8304 Added Examples/lua/embed3, and run tests a few test cases.
8305
8306 04/24/2008: olly
8307 [Python] Fix generated code for IBM's C++ compiler on AIX (patch
8308 from Goeran Uddeborg in SF#1928048).
8309
8310 04/24/2008: olly
8311 Rename BSIZE in Examples/test-suite/arrays_scope.i to BBSIZE to
8312 avoid a clash with BSIZE defined by headers on AIX with Perl
8313 (reported in SF#1928048).
8314
8315 04/20/2008: wsfulton
8316 Add the ability to wrap all protected members when using directors.
8317 Previously only the virtual methods were available to the target language.
8318 Now all protected members, (static and non-static variables, non-virtual methods
8319 and static methods) are wrapped when using the allprotected mode. The allprotected
8320 mode is turned on in the module declaration:
8321
8322 %module(directors="1", allprotected="1") modulename
8323
8324 Version 1.3.35 (7 April 2008)
8325 =============================
8326
8327 04/07/2008: wsfulton
8328 [Lua] Add missing pointer reference typemaps
8329
8330 04/06/2008: wsfulton
8331 Fix stack overflow when using typemap warning suppression, eg
8332 %warnfilter(SWIGWARN_TYPEMAP_CHARLEAK_MSG)
8333
8334 04/05/2008: wsfulton
8335 [Python] Fix shared_ptr typemaps so that %pythonnondynamic can be used. Also corrects
8336 display of the proxy class type. Reported by Robert Lupton.
8337
8338 04/04/2008: olly
8339 [Python] Add %newobject reference to python memory management subsection of manual
8340 (patch from mdbeachy in SF#1894610).
8341
8342 03/27/2008: wsfulton
8343 [Python] Fix shared_ptr typemaps where the pointer type is a templated type with
8344 with more than one parameter. Reported by Robert Lupton.
8345
8346 03/27/2008: mgossage
8347 [Lua] Added a typemap DISOWN for SWIGTYPE* and SWIGTYPE[], and support for %delobject feature.
8348 Added Examples/lua/owner which demonstrates the use of the memory management.
8349
8350 03/26/2008: wsfulton
8351 [Java] Apply patch #1844301 from Monty Taylor to suppress enum constructor
8352 unused warnings.
8353
8354 03/26/2008: wsfulton
8355 [Python] Apply patch #1924524 from Casey Raymondson which ensures the
8356 "No constructor defined" message is displayed when attempting to call a
8357 constructor on a class that doesn't have a constructor wrapper, eg if
8358 the C++ class is abstract.
8359
8360 03/26/2008: wsfulton
8361 [Python] Apply patch #1925702 from Casey Raymondson which removes warning 512
8362 for std::vector wrappers.
8363
8364 03/26/2008: olly
8365 [Python] Apply GCC 4.3 warnings patch from Philipp Thomas
8366 (SF#1925122).
8367
8368 03/21/2008: wsfulton
8369 [Python] Thread safety patch for STL iterators from Abhinandan Jain.
8370
8371 03/17/2008: mgossage
8372 [Lua] Added %luacode feature to add source code into wrappers.
8373 Updated documentation to document this.
8374 Added Examples/lua/arrays to show its use (and typemaps)
8375
8376 03/17/2008: olly
8377 Fix nonportable sed usage which failed on Mac OS X (and probably
8378 other platforms). Fixes SF#1903612.
8379
8380 03/17/2008: olly
8381 Fix memory leak in SWIG's parser (based on patch from Russell
8382 Bryant in SF#1914023).
8383
8384 03/12/2008: wsfulton
8385 Fix bug #1878285 - unnecessary cast for C struct creation wrappers.
8386
8387 03/12/2008: wsfulton
8388 [Python] Remove debugging info when using shared_ptr support
8389
8390 03/06/2008: mgossage
8391 [Lua] Updated documentation for Lua exceptions.
8392 Added Examples/lua/exception and Examples/lua/embed2.
8393 Small updates to the typemaps.
8394
8395 03/04/2008: wsfulton
8396 [Java, C#] Add char *& typemaps.
8397
8398 03/04/2008: wsfulton
8399 Fix occasional seg fault when attempting to report overloaded methods as being ignored.
8400
8401 02/29/2008: wsfulton
8402 [Perl] Fix #1904537 Swig causes a Perl warning "x used only once" in Perl 5.10
8403 reported by Ari Jolma
8404
8405 02/29/2008: wsfulton
8406 [Python] Add shared_ptr varin/varout typemaps for wrapping global variables.
8407
8408 02/25/2008: wsfulton
8409 Fix $wrapname to work in %exception (fixes some wrap:name assertions)
8410
8411 Version 1.3.34 (27 February 2008)
8412 =================================
8413
8414 02/13/2008: wsfulton
8415 [R] Fix wrapping of global function pointer variables.
8416
8417 02/13/2008: wsfulton
8418 Add new special variables for use within %exception:
8419 $wrapname - language specific wrapper name
8420 $overname - if a method is overloaded this contains the extra mangling used on
8421 the overloaded method
8422 $decl - the fully qualified C/C++ declaration of the method being wrapped
8423 without the return type
8424 $fulldecl - the fully qualified C/C++ declaration of the method being wrapped
8425 including the return type
8426
8427 02/12/2008: drjoe
8428 [R] Now setting S4 flag in SWIG created objects. This
8429 fixes R-SWIG for 2.6 and warning for 2.6 failure has been removed.
8430
8431 02/11/2008: mgossage
8432 [Lua] Added a patch by Torsten Landschoff to fix the unary minus issue
8433 Ran 'astyle --style=kr -2' across lua.cxx to neaten it up
8434
8435 02/10/2008: wsfulton
8436 Bump SWIG_RUNTIME_VERSION to 4. This is because of the recently introduced API
8437 change in the conversion functions, ie change in definition of swig_converter_func.
8438 Anyone calling SWIG_TypeCast must pass in a valid value for the new additional
8439 (third) parameter and then handle the newly created memory if the returned value
8440 is set to SWIG_CAST_NEW_MEMORY else a memory leak will ensue.
8441
8442 02/09/2008: wsfulton
8443 [Python] Experimental shared_ptr typemaps added. Usage is the same as the recently
8444 added Java and C# shared_ptr typemaps. Two macros are available, although these
8445 may well change in a future version:
8446
8447 For base classes or classes not in an inheritance chain:
8448 SWIG_SHARED_PTR(PROXYCLASS, TYPE)
8449 For derived classes:
8450 SWIG_SHARED_PTR_DERIVED(PROXYCLASS, BASECLASSTYPE, TYPE)
8451
8452 The PROXYCLASS is the name of the proxy class, but is only required for Java/C#.
8453 Example usage:
8454
8455 %include "boost_shared_ptr.i"
8456
8457 SWIG_SHARED_PTR(Klass, Space::Klass)
8458 SWIG_SHARED_PTR_DERIVED(KlassDerived, Space::Klass, Space::KlassDerived)
8459
8460 namespace Space {
8461 struct Klass { ... };
8462 struct KlassDerived : Klass { ... };
8463 }
8464
8465 Further details to follow in future documentation, but the following features
8466 should be noted:
8467
8468 - Not restricted to boost::shared_ptr, eg std::tr1::shared_ptr can also be used.
8469 - Available typemap groups:
8470 (a) Typemaps for shared_ptr passed by value, reference, pointer and pointer
8471 reference.
8472 - (b) Typemaps for passing by raw value, raw pointer, raw reference, raw pointer
8473 reference.
8474 - The code being wrapped does not even have to use shared_ptr, SWIG can use
8475 shared_ptr as the underlying storage mechanism instead of a raw pointer due to
8476 the typemaps in group (b) above.
8477 - No array support as shared_ptr does not support arrays.
8478 - This works quite differently to the usual SWIG smart pointer support when
8479 operator-> is parsed by SWIG:
8480 - An additional smart pointer class is not generated reducing code bloat in
8481 the wrappers.
8482 - Using smart pointers and raw pointers can be mixed seamlessly.
8483 - Missing constructors for the smart pointers is no longer a problem and so
8484 separate factory type functions do not have to be written and wrapped.
8485 - The implicit C++ shared_ptr< derived class > to shared_ptr< base class >
8486 cast also works in the target language. This negates the necessity to write
8487 an explicit helper cast function providing the upcast which would need
8488 calling prior to passing a derived class to a method taking a shared_ptr to
8489 a base class.
8490
8491 02/09/2008: wsfulton
8492 [Python] Add support for overriding the class registration function via a new
8493 "smartptr" feature. This is a very low level of customisation most users
8494 would never need to know. The feature will typically be used for intrusive
8495 smart pointers along with additional typemaps. Example usage of the feature:
8496
8497 %feature("smartptr", noblock=1) Foo { boost::shared_ptr< Foo > }
8498 class Foo {};
8499
8500 The generated Foo_swigregister function will then register boost::shared < Foo >
8501 (SWIGTYPE_p_boost__shared_ptrTFoo_t instead of SWIGTYPE_p_Foo) as the underlying
8502 type for instantiations of Foo.
8503
8504 02/09/2008: wsfulton
8505 Features now supports the optional 'noblock' attribute for all usage of %feature.
8506 When specified, the { } braces are removed from the feature code. This is identical
8507 in behaviour to usage of 'noblock' in typemaps and is used when the preprocessor
8508 is required to operate on the code in the feature and the enclosing { } braces
8509 are not required. Example:
8510
8511 #define FOO foo
8512 %feature("smartptr", noblock="1") { FOO::bar }
8513
8514 The preprocessor then reduces this as if this had been used instead:
8515
8516 %feature("smartptr") "foo::bar"
8517
8518 02/01/2008: olly
8519 [Python] Fix format string bug (SF#1882220).
8520
8521 01/31/2008: wsfulton
8522 Additions to the %types directive. Now the conversion / casting code can be
8523 overridden to some custom code in the %types directive, like so:
8524
8525 %types(fromtype = totype) %{
8526 ... code to convert fromtype to totype and return ...
8527 %}
8528
8529 The special variable $from will be replaced by the name of the parameter of the
8530 type being converted from. The code must return the totype cast to void *. Example:
8531
8532 class Time;
8533 class Date;
8534 Date &Time::dateFromTime();
8535
8536 %types(Time = Date) %{
8537 Time *t = (Time *)$from;
8538 Date &d = t->dateFromTime();
8539 return (void *) &d;
8540 %}
8541
8542 resulting in the conversion / casting code looking something like:
8543
8544 static void *_p_TimeTo_p_Date(void *x) {
8545 Time *t = (Time *)x;
8546 Date &d = t->dateFromTime();
8547 return (void *) &d;
8548 }
8549
8550 This is advanced usage, please use only if you understand the runtime type system.
8551
8552 01/30/2008: mgossage
8553 Small update to documentation in Typemaps.html, to warn about use of local
8554 variables in typemaps for multiple types.
8555
8556 01/25/2008: wsfulton
8557 [Java] Fix bug reported by Kevin Mills in ARRAYSOFCLASSES typemaps where any
8558 changes made to an array element passed from Java to C are not reflected back
8559 into Java.
8560
8561 01/24/2008: mgossage
8562 More updates to the configure script for detecting lua.
8563 Also looks in /usr/include/lua*
8564 Also changed typemaps.i not to check for NULL before freeing a pointer
8565
8566 01/21/2008: wsfulton
8567 [Python] For STL containers, SWIG no longer attempts to convert from one
8568 STL container to another, eg from std::vector<int> to std::vector<double>
8569 or std::list<int> to std::vector<int> or even std::vector<Foo> to
8570 std::vector<Bar> as it previously did. In fact SWIG no longer attempts to
8571 convert any SWIG wrapped C++ proxy class that is also a Python sequence,
8572 whereas previously it would. Any non-SWIG Python sequence will still be
8573 accepted wherever an STL container is accepted. Overloaded methods using
8574 containers should be faster.
8575
8576 01/18/2008: wsfulton
8577 [C#] Add 'directorinattributes' and 'directoroutattributes' typemap attributes
8578 for the imtype typemap. These should contain C# attributes which will
8579 be generated into the C# director delegate methods.
8580
8581 01/18/2008: olly
8582 Fix handling of byte value 255 in input files on platforms where
8583 char is signed (it was getting mapped to EOF). Fixes SF#1518219.
8584
8585 01/16/2008: wsfulton
8586 Fix template member variables wrapped by a smart pointer. Bug reported
8587 by Robert Lupton.
8588
8589 01/14/2008: mgossage
8590 Substantial changes to configure script for detecting lua.
8591 Code can now link to liblua.a, liblua50.a or liblua51.a
8592 It's also a lot neater now.
8593
8594 12/16/2007: wsfulton
8595 [Perl] Backed out #1798728 - numbers can be passed to functions taking char *
8596
8597 12/16/2007: wsfulton
8598 Fix #1832613 - Templates and some typedefs involving pointers or function pointers
8599
8600 12/12/2007: wsfulton
8601 [Java] Fix #1632625 - Compilation errors on Visual C++ 6 when using directors.
8602
8603 12/12/2007: wsfulton
8604 [Perl] Fix #1798728 - numbers can be passed to functions taking char *.
8605
8606 12/12/2007: wsfulton
8607 Fix #1819847 %template with just one default template parameter
8608
8609 template<typename T = int> class Foo {...};
8610 %template(FooDefault) Foo<>;
8611
8612 12/12/2007: mgossage
8613 [Lua] Small correction on Lua.html
8614
8615 12/09/2007: wsfulton
8616 Apply patch #1838248 from Monty Taylor for vpath builds of SWIG.
8617
8618 12/08/2007: wsfulton
8619 [Lua] Fixes to remove gcc-4.2 warnings
8620
8621 12/06/2007: wsfulton
8622 Fix #1734415 - template template parameters with default arguments such as:
8623
8624 template<typename t_item, template<typename> class t_alloc = pfc::alloc_fast >
8625 class list_t : public list_impl_t<t_item,pfc::array_t<t_item,t_alloc> > { ... };
8626
8627 12/04/2007: mgossage
8628 [lua] Fix a bug in the class hierachy code, where the methods were not propagated,
8629 if the name ordering was in a certain order.
8630 Added new example programs (dual, embed) and runtime tests for test-suite.
8631
8632 11/30/2007: wsfulton
8633 Fix using statements using a base class method where the methods were overloaded.
8634 Depending on the order of the using statements and method declarations, these
8635 were previously generating uncompilable wrappers, eg:
8636
8637 struct Derived : Base {
8638 virtual void funk();
8639 using Base::funk;
8640 };
8641
8642 Version 1.3.33 (November 23, 2007)
8643 ==================================
8644
8645 11/21/2007: mikel
8646 [allegrocl] omit private slot type info in the classes/types
8647 defined on the lisp side. Fix bug in mapping of C/++ types
8648 to lisp types. Fix typo in modules generated defpackage form.
8649 Have std::string *'s automatically marshalled between foreign
8650 and lisp strings.
8651
8652 11/20/2007: olly
8653 [Python] Fill in Python Dictionary functions list (patch from
8654 Jelmer Vernooij posted to swig-devel).
8655
8656 11/20/2007: beazley
8657 Fixed a bug in the C scanner related to backslash characters.
8658
8659 11/19/2007: wsfulton
8660 [Perl] Fix broken compilation of C++ wrappers on some compilers.
8661
8662 11/16/2007: olly
8663 [Python] Don't pass Py_ssize_t for a %d printf-like format as
8664 that's undefined behaviour when sizeof(Py_ssize_t) != sizeof(int).
8665
8666 Version 1.3.32 (November 15, 2007)
8667 ==================================
8668
8669 11/14/2007: wsfulton
8670 [R] Package name and dll name is now the same as the SWIG module
8671 name. It used to be the module name with _wrap as a suffix. The package
8672 and dll names can be modified using the -package and -dll commandline
8673 options.
8674
8675 *** POTENTIAL INCOMPATIBILITY ***
8676
8677 11/11/2007: wsfulton
8678 [R] Add support for Windows (Visual C++ 8 tested)
8679
8680 11/10/2007: olly
8681 [php] Fix makefile generated by -make (SF#1633679). Update
8682 documentation to mark "-make" as deprecated (none of the other
8683 SWIG backends seem to offer such a feature, it can't realistically
8684 generate a fully portable makefile, and the commands to build an
8685 extension are easy enough to write for the user's preferred build
8686 tool). Also recommend against the use of "-phpfull" (it's only
8687 really useful when static linking, and a dynamically loadable
8688 module is virtually always the better approach).
8689
8690 11/09/2007: olly
8691 Fix --help output to note that `export SWIG_FEATURES' is required.
8692
8693 10/29/2007: wsfulton
8694 [R] Fix seg fault on Windows
8695 [R] Examples R scripts are now platform independent
8696
8697 10/30/2007: mgossage
8698 [lua] fixed bug in template classes which cases template_default2
8699 and template_specialization_defarg to fail.
8700 Added several warning filters into the overload's test cases.
8701 Added runtime tests for several codes.
8702 You can now make check-lua-test-suite with no errors and only a few warnings.
8703
8704 10/30/2007: olly
8705 [guile] Fix the configure test to put GUILELINK in LIBS not LDFLAGS
8706 (SF#1822430).
8707
8708 10/30/2007: olly
8709 [guile] Fix the guile examples on 64-bit platforms.
8710
8711 10/29/2007: wsfulton
8712 [C#] Fix member pointers on 64 bit platforms.
8713
8714 10/28/2007: olly
8715 [lua] Fix swig_lua_class instances to be static to allow multiple
8716 SWIG wrappers to be compiled into the same executable statically.
8717 Patch from Andreas Fredriksson (posted to the swig mailing list).
8718
8719 10/28/2007: olly
8720 [lua] Fix Examples/lua to pass SRCS for C tests rather than CXXSRCS.
8721 The code as it was happened to work on x86, but broke on x86_64 (and
8722 probably any other platforms which require -fPIC).
8723
8724 10/28/2007: wsfulton
8725 [Java, C#] New approach for fixing uninitialised variable usage on error in director
8726 methods using the new templated initialisation function SwigValueInit().
8727
8728 10/28/2007: wsfulton
8729 [Perl] Use more efficient SvPV_nolen(x) instead of SvPV(x,PL_na) if SvPV_nolen is
8730 supported.
8731
8732 10/26/2007: wuzzeb
8733 [Chicken] Fix global variables of class member function pointers.
8734 Other minor fixes, so all tests in the chicken test suite now pass
8735
8736 10/25/2007: olly
8737 Fix UTL typecheck macro for a function taking char[] or const
8738 char[] (SF#1820132).
8739
8740 10/22/2007: mkoeppe
8741 [Guile] Filter out -ansi -pedantic from CFLAGS while compiling test programs for Guile
8742 in configure. This enables running the test suite for Guile if it is installed and
8743 usable.
8744
8745 10/22/2007: mkoeppe
8746 [Guile -scm] Fix testcases apply_signed_char and apply_strings
8747 by adding explicit casts to the appropriate $ltype.
8748
8749 10/22/2007: wsfulton
8750 [Java, C#] Fix uninitialised variable usage on error in director methods.
8751
8752 10/19/2007: wsfulton
8753 [Java, C#] Bug #1794247 - fix generated code for derived classes when csbase or javabase
8754 typemaps are used with the replace="1" attribute.
8755
8756 10/19/2007: wsfulton
8757 [Python] Docs updated to suggest using distutils. Patch #1796681 from Christopher Barker.
8758
8759 10/19/2007: olly
8760 [perl5] Clear errno before calls to strtol(), strtoul(), strtoll()
8761 and strtoull() which we check errno after to avoid seeing a junk
8762 value of errno if there isn't an error in the call.
8763
8764 10/16/2007: wsfulton
8765 Deprecate %attribute_ref and replace with %attributeref. There is just an argument
8766 order change in order to maintain consistency with %attribute, from:
8767
8768 %attribute_ref(Class, AttributeType, AccessorMethod, AttributeName)
8769 to
8770 %attributeref(Class, AttributeType, AttributeName, AccessorMethod)
8771
8772 10/16/2007: olly
8773 [Tcl] Fix several occurrences of "warning: deprecated conversion
8774 from string constant to 'char*'" from GCC 4.2 in generated C/C++
8775 code.
8776
8777 10/16/2007: olly
8778 [PHP] Fix many occurrences of "warning: deprecated conversion from
8779 string constant to 'char*'" from GCC 4.2 in generated C/C++ code
8780 when compiling with a new enough version of PHP 5 (tested with
8781 PHP 5.2.3, but PHP 5.2.1 is probably the minimum requirement).
8782
8783 10/15/2007: wsfulton
8784 Patch #1797133 from David Piepgrass fixes %attribute when the getter has the same name
8785 as the attribute name and no longer generate non-functional setter for read-only attributes.
8786
8787 10/15/2007: olly
8788 [Tcl] Prevent SWIG_Tcl_ConvertPtr from calling the unknown proc.
8789 Add Examples/tcl/std_vector/ which this change fixes. Patch
8790 is from "Cliff C" in SF#1809819.
8791
8792 10/12/2007: wsfulton
8793 [Java] Add DetachCurrentThread back in for directors. See entry dated 08/11/2006 and
8794 search for DetachCurrentThread on the mailing lists for details. The crashes on Solaris
8795 seem to be only present in jdk-1.4.2 and lower (jdk-1.5.0 and jdk-1.6.0 are okay), so
8796 anyone using directors should use a recent jdk on Solaris, or define (see director.swg)
8797 SWIG_JAVA_NO_DETACH_CURRENT_THREAD to the C++ compiler to get old behaviour.
8798
8799 10/12/2007: wsfulton
8800 [Java] Ensure the premature garbage collection prevention parameter (pgcpp) is generated
8801 when there are C comments in the jtype and jstype typemaps.
8802
8803 10/12/2007: wuzzeb
8804 Added a testsuite entry for Bug #1735931
8805
8806 10/09/2007: olly
8807 Automatically rerun autogen.sh if configure.in is modified.
8808
8809 10/09/2007: olly
8810 Enhance check-%-test-suite rule and friends to give a more helpful
8811 error message if you try them for a language which doesn't exist
8812 (e.g. "make check-php-test-suite" rather than the correct
8813 "make check-php4-test-suite").
8814
8815 10/09/2007: olly
8816 Add make rule to regenerate Makefile from Makefile.in if it has
8817 changed.
8818
8819 10/09/2007: olly
8820 [php] Fix long-standing memory leak in wrapped constructors and
8821 wrapped functions/methods which return an object.
8822
8823 10/08/2007: olly
8824 Fix Makefile.in to read check.list files correctly in a VPATH
8825 build.
8826
8827 10/07/2007: wsfulton
8828 [C#, Java] Experimental shared_ptr typemaps added
8829
8830 09/27/2007: mgossage
8831 [lua] added more verbose error messages for incorrect typechecks.
8832 Added a routine which checks the exact number of parameters passed to a function
8833 (breaks operator_overloading for unary minus operator, currently disabled).
8834 Reorganised the luatypemaps.swg to tidy it up.
8835 Added a lot of %ignores on the operators not supported by lua.
8836 Added support for constant member function pointers & runtest for member_pointer.i
8837 Added first version of wchar.i
8838
8839 09/25/2007: wsfulton
8840 [C#, Java] throws typemaps for std::wstring using C# patch #1799064 from David Piepgrass
8841
8842 09/24/2007: wsfulton
8843 [Tcl] Apply #1771313 to fix bug #1650229 - fixes long long and unsigned long long
8844 handling.
8845
8846 09/20/2007: olly
8847 [Java] Eliminate some unnecessary uses of a temporary buffer
8848 allocated using new[]. SF#1796609.
8849
8850 09/19/2007: wsfulton
8851 [C#] The $csinput special variable can be used in the csvarin typemap where it is always
8852 expanded to 'value'.
8853
8854 09/19/2007: wsfulton
8855 [C#] Fix bug reported by Glenn A Watson and #1795260 where the cstype typemap used the 'ref'
8856 keyword in the typemap body, it produced uncompilable C# properties (variable wrappers).
8857 The type for the property now correctly comes from the 'out' attribute in the cstype typemap.
8858
8859 09/19/2007: wsfulton
8860 [Java] Fix const std::wstring& typemaps
8861
8862 09/19/2007: wsfulton
8863 [Java] Ensure the premature garbage collection prevention parameter (pgcpp) is generated
8864 where a parameter is passed by pointer reference, eg in the std::vector wrappers. The pgcpp
8865 is also generated now when user's custom typemaps use a proxy class in the jstype typemap
8866 and a 'long' in the jtype typemap.
8867
8868 09/18/2007: olly
8869 [php] Add typemaps for handling parameters of type std::string &
8870 which are modified by the wrapped function.
8871
8872 09/17/2007: olly
8873 [python] Split potentially long string literals to avoid hitting
8874 MSVC's low fixed limit on string literal length - patch from
8875 SF#1723770, also reported as SF#1630855.
8876
8877 09/17/2007: olly
8878 [ocaml] Fix renaming of overloaded methods in the method_table -
8879 my patch from SF#940399.
8880
8881 09/17/2007: olly
8882 [python] Simpler code for SWIG_AsVal_bool() which fixes a "strict
8883 aliasing" warning from GCC - patch from SF#1724581 by Andrew
8884 Baumann.
8885
8886 09/17/2007: olly
8887 [perl5] Use sv_setpvn() to set a scalar from a pointer and length
8888 - patch from SF#174460 by "matsubaray".
8889
8890 09/17/2007: olly
8891 When wrapping C++ code, generate code which uses
8892 std::string::assign(PTR, LEN) rather than assigning
8893 std::string(PTR, LEN). Using assign generates more efficient code
8894 (tested with GCC 4.1.2).
8895
8896 09/07/2007: wsfulton
8897 Fix %ignore on constructors which are not explicitly declared [SF #1777712]
8898
8899 09/05/2007: wuzzeb (John Lenz)
8900 - Change r_ltype in typesys.c to store a hashtable instead of a single value.
8901 several very subtle bugs were being caused by multiple ltypes being mapped
8902 to a single mangled type, mostly when using typedefed template parameters.
8903 Now, r_ltype stores a hashtable of possible ltypes, and when generating the
8904 type table, all the ltypes are added into the swig_type_info structure.
8905
8906 08/31/2007: wsfulton
8907 SF #1754967 from James Bigler.
8908 - Fix bug in turning on warnings that were turned off by default. Eg 'swig -w+309' will now
8909 turn on the normally suppressed warning 309.
8910
8911 - New -Wextra commandline option which enables the extra warning numbers:
8912 202,309,403,512,321,322 (this is the list of warnings that have always been suppressed by
8913 default). By specifying -Wextra, all warnings will be turned on, but unlike -Wall,
8914 warnings can still be selectively turned on/off using %warnfilter,
8915 #pragma SWIG nowarn or further -w commandline options, eg:
8916 swig -Wextra -w309
8917 will turn on all warnings except 309.
8918
8919 08/28/2007: wsfulton
8920 - New debugging options, -debug-module <n> and -debug-top <n> to display the parse tree at
8921 various stages, where <n> is a comma separated list of stages 1-4.For example, to
8922 display top of parse tree at stages 1 and 3:
8923 swig -debug-top 1,3
8924
8925 - Deprecate the following options which have equivalents below:
8926 -dump_parse_module => -debug-module 1
8927 -dump_module => -debug-module 4
8928 -dump_parse_top => -debug-top 1
8929 -dump_top => -debug-top 4
8930
8931 - Renamed some commandline options for naming consistency across all options:
8932 -debug_template => -debug-template
8933 -debug_typemap => -debug-typemap
8934 -dump_classes => -debug-classes
8935 -dump_tags => -debug-tags
8936 -dump_typedef => -debug-typedef
8937 -dump_memory => -debug-memory
8938
8939 08/25/2007: olly
8940 [PHP5] Fix handling of double or float parameters with an integer
8941 default value.
8942
8943 08/25/2007: olly
8944 [PHP5] Generate __isset() methods for setters for PHP 5.1 and later.
8945
8946 08/20/2007: wsfulton
8947 [Java C#] Fix director bug #1776651 reported by Stephane Routelous which occurred when
8948 the director class name is the same as the start of some other symbols used within
8949 the director class.
8950
8951 08/17/2007: wsfulton
8952 Correct behaviour for templated methods used with %rename or %ignore and the empty
8953 template declaration - %template(). A warning is issued if the method has not been
8954 renamed.
8955
8956 08/16/2007: mutandiz (Mikel Bancroft)
8957 [allegrocl] Name generated cl file based on input file rather than by
8958 module name. It was possible to end up with a mypackage.cl and a test_wrap.c
8959 when parsing a test.i input file. Confusing. Also, include external-format
8960 templates for :fat and :fat-le automatically to avoid these being compiled
8961 at runtime.
8962
8963 08/15/2007: efuzzyone
8964 [cffi] Apply patch #1766076 from Leigh Smith adding support for newly introduced
8965 in cffi :long-long and :unsigned-long-long.
8966
8967 08/10/2007: wsfulton
8968 [Java] Add documentation patch #1743573 from Jeffrey Sorensen. It contains a neat
8969 idea with respect to better memory management by the JVM of C++ allocated memory.
8970
8971 08/10/2007: wsfulton
8972 [Perl] Apply patch #1771410 from Wade Brainerd to fix typedef XS(SwigPerlWrapper) in
8973 perlrun.swg for ActiveState Perl build 822 and Perl 5.8.9 and 5.10 branches.
8974
8975 08/10/2007: wsfulton
8976 [Lua] const enum reference typemaps fixed.
8977
8978 08/09/2007: wsfulton
8979 [C#] Added missing support for C++ class member pointers.
8980
8981 08/09/2007: wsfulton
8982 [C#, Java] Add support for $owner in the "out" typemaps like in the scripting
8983 language modules. Note that $owner has always been supported in the "javaout" / "csout"
8984 typemaps.
8985
8986 08/01/2007: wsfulton
8987 Fix smart pointer handling for classes that have templated methods within the smart
8988 pointer type. Problem reported by craigdo at ee.washington.edu.
8989
8990 07/31/2007: efuzzyone
8991 [cffi] fixed memory access after being freed bug. thanks to Martin Percossi.
8992 package name clos changed to cl. thanks to Ralf Mattes
8993
8994 07/24/2007: wsfulton
8995 Parallel make support added for the examples and test-suite for developers who have
8996 more than one CPU. Now parallel make can be used for checking in addition to building
8997 the SWIG executable. Some typical checking examples:
8998
8999 make -j8 -k check
9000 make -j4 check-java-test-suite
9001 make -j2 check-java-examples
9002
9003 07/19/2007: mgossage
9004 Fixed bug that stopped configure working on mingw (applied dos2unix to configure.in)
9005
9006 07/10/2007: mgossage
9007 [lua] Extra compatibility with Lua 5.1 (updated SWIG_init, docs, examples, test suite)
9008 Removed name clash for static link of multiple modules
9009
9010 07/05/2007: mgossage
9011 [lua] Fix a bug in SWIG_ALLOC_ARRAY()
9012 improved the error messages for incorrect arguments.
9013 Changed the output of swig_type() to use the human readable form of the type,
9014 rather than the raw swig type.
9015
9016 07/03/2007: wsfulton
9017 [C#] Fix directors for some overloaded methods where the imtype resulted in identical
9018 methods being generated in the C# director class, eg void foo(int *) and void foo(double *)
9019 used to generated two of these:
9020
9021 private void SwigDirectorfoo(IntPtr p) { ... }
9022
9023 06/25/2007: wsfulton
9024 [Java, C#] Some parameter name changes in std_vector.i allowing better targeting
9025 of typemaps for method parameters (for memory management of containers of pointers).
9026
9027 06/07/2007: mutandiz (Mikel Bancroft)
9028 [allegrocl]
9029 fix foreign-type constructor to properly look for ffitype typemap
9030 bindings. fix inout_typemaps.i for strings.
9031
9032 06/06/2007: olly
9033 [Ruby]
9034 Use whichever of "long" or "long long" is the same size as "void*"
9035 to hold pointers as integers, rather than whichever matches off_t.
9036 Fixes compilation on OS X and GCC warnings on platforms where
9037 sizeof(void*) < sizeof(off_t) (SF patch #1731979).
9038
9039 06/06/2007: olly
9040 [PHP5]
9041 Fix handling of a particular case involving overloaded functions
9042 with default parameters.
9043
9044 06/05/2007: mutandiz (Mikel Bancroft)
9045 [allegrocl]
9046 Fix case where we'd pass fully qualified identifiers
9047 (i.e. NS1::NS2::FOO) to swig-insert-id. All namespaces
9048 should be stripped.
9049
9050 Fix bug in TypedefHandler introduced by last fix.
9051
9052 06/05/2007: olly
9053 Fix reporting of filenames in errors after %include (patch from
9054 Leigh Smith in #1731040; also reported as #1699940).
9055
9056 05/31/2007: olly
9057 [Python]
9058 Fix "missing initialiser" warning when compiling generated C/C++
9059 wrapper code with Python 2.5 with warnings enabled (patch from
9060 bug#1727668 from Luke Moore).
9061
9062 05/29/2007: olly
9063 [Python]
9064 Split docstrings into separate string literals at each newline when
9065 generating C/C++ wrapper code (the C/C++ compiler will just combine
9066 them back into a single string literal). This avoids MSVC
9067 complaining that the strings are too long (problem reported by
9068 Bo Peng on the mailing list).
9069
9070 05/28/2007: olly
9071 [Python]
9072 Escape backslashes in docstrings.
9073
9074 05/26/2007: olly
9075 [Python]
9076 Fix autodoc generation of enums to be more consistent with how the
9077 enums are wrapped - patch #1697226 from Josh Cherry.
9078
9079 05/26/2007: olly
9080 [PHP5]
9081 Fix wrapping of methods and functions which return a pointer to a
9082 class (bug#1700788) and those which have overloaded forms returning
9083 both classes and non-classes (bug#1712717, thanks to Simon
9084 Berthiaume for the patch).
9085
9086 05/25/2007: wsfulton
9087 Fixed %rename inconsistency in conversion operators as reported by Zhong Ren. The matching
9088 is now done on the operator name in the same way as it is done for parameters. For example:
9089
9090 %rename(opABC) Space::ABC::operator ABC() const;
9091 %rename(methodABC) Space::ABC::method(ABC a) const;
9092 namespace Space {
9093 class ABC {
9094 public:
9095 void method(ABC a) const {}
9096 operator ABC() const { ABC a; return a; }
9097 };
9098 }
9099
9100 Note that qualifying the conversion operator previously may or may not have matched.
9101 Now it definitely won't, so this will not match:
9102
9103 %rename(opABC) Space::ABC::operator Space::ABC() const;
9104
9105 in the same way that this does not match:
9106
9107 %rename(methodABC) Space::ABC::method(Space::ABC a) const;
9108
9109 The documentation has been improved with respect to %rename, namespaces and templates.
9110 Conversion operators documentation too.
9111
9112 *** POTENTIAL INCOMPATIBILITY ***
9113
9114 05/16/2007: mutandiz
9115 [allegrocl]
9116 Fix bad generation of local var ltype's in functionWrapper().
9117 Try to work better with the backward order in which swig
9118 unrolls nested class definitions.
9119 cleaned up a little unnecessary code/debug printf's.
9120 Remove warning when replacing $ldestructor for ff:foreign-pointer
9121
9122 05/12/2007: olly
9123 [Python]
9124 swig -python -threads now generates C/C++ code which uses Python's
9125 own threading abstraction (from pythread.h) rather than OS specific
9126 code. The old code failed to compile on MS Windows. (See SF patch
9127 tracker #1710341).
9128
9129 05/04/2007: gga
9130 [Ruby]
9131 Changed STL renames to be global renames. This fixes
9132 STL functions not being renamed when autorename is on.
9133 This is a not a totally perfect work-around, but better.
9134 Someone really needs to fix the template renaming code.
9135 (See bug #1545634)
9136
9137 05/04/2007 gga
9138 [All]
9139 Changed %rename("%(undercase)s") a little so that single
9140 numbers at the end of a function are not undercased. That is:
9141 getSomething -> get_something
9142 get2D -> get_2d
9143 get234 -> get_234
9144 BUT:
9145 asFloat2 -> as_float2
9146 (Bug #1699714)
9147
9148 05/03/2007: gga
9149 [Ruby]
9150 Made __swigtype__ => @__swigtype__ so it can be accessed
9151 from the scripting language (and follows Ruby's official
9152 documentation, just in case).
9153 Made tracking => @__trackings__ for same reason.
9154 Currently storing ivars without the @ seems valid, but
9155 the PickAxe says this is not correct, so just in case...
9156
9157 05/03/2007: gga
9158 [Ruby]
9159 Applied patch for -minherit bug and exception classes.
9160 This issue should be revisited more closely, as Multiple
9161 Inheritance in Ruby is still problematic.
9162 (patch/bug #1604878)
9163
9164 05/03/2007: gga
9165 [Ruby]
9166 Overloaded functions in ruby will now report to the user
9167 the possible prototypes when the user mistypes the number or
9168 type of a parameter.
9169
9170 05/03/2007: gga
9171 [Ruby]
9172 Forgot to document the bug fixing of an old bug regarding
9173 exceptions.
9174 (bug #1458247)
9175
9176 05/03/2007: gga
9177 [Ruby]
9178 Fixed Ruby documentation to use the proper css styles for
9179 each section. Added autodoc section to Ruby's docs to
9180 document the features supported by Ruby in documenting its modules.
9181 Made rdoc documentation spit out the full name of the class +
9182 method name. Albeit this will make the current rdoc not recognize
9183 the method, this is still needed to disambiguate between different
9184 classes with similar methods (rdoc was created to document the
9185 ruby source which only contains one class per c file, unlike swig)
9186 I have patched rdoc to make it more friendly to swig. This
9187 patch needs to be merged in the ruby std library now.
9188
9189 05/03/2007: gga
9190 [Ruby]
9191 Changed flag -feature to be -init_name to better reflect its
9192 purpose and avoid confusion with -features.
9193
9194 05/03/2007: gga
9195 [Ruby]
9196 Improved autodoc generation.
9197 Added autodoc .swg files to Ruby library for easily adding
9198 documentation to common Ruby methods and STL methods.
9199 Fixed autodoc documenting of getters and setters and module.
9200 Made test suite always generate autodocs.
9201
9202 05/03/2007: gga
9203 [Ruby]
9204 Removed some warnings from STL and test suite.
9205
9206 05/02/2007: mgossage
9207 [Lua] Fixed issues with C++ classes and hierachies across multiple
9208 source files. Fixed imports test case & added run test.
9209 Added Examples/imports.
9210 Added typename for raw lua_State*
9211 Added documentation on native functions.
9212
9213 05/02/2007: gga
9214 [Ruby]
9215 Docstrings are now supported.
9216 %feature("autodoc") and %feature("docstring") are now
9217 properly supported in Ruby. These features will generate
9218 a _wrap.cxx file with rdoc comments in them.
9219
9220 05/02/2007: gga
9221 [Ruby]
9222 STL files have been upgraded to follow the new swig/python
9223 Lib/std conventions.
9224 This means std::vector, std::set, std::map, set::multimap,
9225 std::multiset, std::deque and std::string are now properly
9226 supported, including their iterators, support for containing
9227 ruby objects (swig::GC_VALUE) and several other ruby
9228 enhancements.
9229 std::complex, std::ios, std::iostream, std::iostreambuf and
9230 std::sstream are now also supported.
9231 std::wstring, std::wios, std::wiostream, std::wiostreambuf
9232 and std::wsstream are supported verbatim with no unicode
9233 conversion.
9234
9235 std_vector.i now mimics the behavior of Ruby Arrays much more
9236 closely, supporting slicing, shifting, unshifting,
9237 multiple indexing and proper return values on assignment.
9238
9239 COMPATABILITY NOTE: this changes the older api a little bit in
9240 that improper indexing would previously (incorrectly) raise
9241 exceptions. Now, nil is returned instead, following ruby's
9242 standard Array behavior.
9243
9244 05/02/2007: gga
9245 [Ruby]
9246 Changed the value of SWIG_TYPECHECK_BOOL to be 10000 (ie. higher
9247 than that of all integers).
9248 This is because Ruby allows typecasting
9249 integers down to booleans which can make overloaded functions on
9250 bools and integers to fail.
9251 (bug# 1488142)
9252
9253 05/02/2007: gga
9254 [Ruby]
9255 Fixed a subtle bug in multiple argouts that could get triggered if
9256 the user returned two or more arguments and the first one was an
9257 array.
9258
9259 05/01/2007: gga
9260 [Ruby]
9261 Improved the documentation to document the new features
9262 added, add directorin/out/argout typemaps, etc.
9263
9264 05/01/2007: gga
9265 [Ruby]
9266 Added %initstack and %ignorestack directives for director
9267 functions. These allow you to control whether a director
9268 function should re-init the Ruby stack.
9269 This is sometimes needed for an embedded Ruby where the
9270 director method is used as a C++ callback and not called
9271 by the user from ruby code.
9272 Explanation:
9273 Ruby's GC needs to be aware of the running OS stack in order to
9274 mark any VALUE (Ruby objects) it finds there to avoid collection
9275 of them. This allows the ruby API to be very simple and allows
9276 you to write code like "VALUE a = sth" anywhere without needing
9277 to do things like refcounting like python.
9278 By default, the start of the stack is set when ruby_init() is
9279 called. If ruby is inited within main(), as it usually is the
9280 case with the main ruby executable, ruby will be able to calculate
9281 its stack properly. However, when this is not possible, as when
9282 ruby is embedded as a plugin to an application where main is not
9283 available, ruby_init() will be called in the wrong place, and
9284 ruby will be incorrectly tracking the stack from the function
9285 that called ruby_init() forwards only, which can lead to
9286 all sorts of weird crashes or to ruby thinking it has run out of
9287 stack space incorrectly.
9288 To avoid this, director (callback) functions can now be tagged
9289 to try to reset the ruby stack, which will solve the issues.
9290 NOTE: ruby1.8.6 still contains a bug in it in that its function
9291 to reset the stack will not always do so. This bug is triggered
9292 very rarely, when ruby is called from two very distinct places
9293 in memory, like a branch of main() and another dso. This bug
9294 has now been reported to ruby-core and is pending further
9295 investigation.
9296 (bug #1700535 and patch #1702907)
9297
9298 04/30/2007: wsfulton
9299 Fix #1707582 - Restore building from read-only source directories.
9300
9301 04/30/2007: gga
9302 [Ruby]
9303 Ruby will now report the parameter index properly on type
9304 errors as well as the class and value of the incorrect
9305 argument passed.
9306 (feature request #1699670)
9307
9308 04/30/2007: gga
9309 [Ruby]
9310 Ruby no longer creates the free_Class function if the class
9311 contains its own user defined free function (%freefunc).
9312 (bug #1702882)
9313
9314 04/30/2007: gga
9315 [Ruby]
9316 Made directors raise a ruby exception for incorrect argout
9317 returned values if RUBY_EMBEDDED is set, instead of throwing
9318 an actual SwigDirector exception.
9319 This will prevent crashes when ruby is embedded and unaware
9320 of the SwigDirector exception.
9321
9322 04/30/2007: gga
9323 [Ruby]
9324 Removed the need for -DSWIGEXTERN.
9325 Changed swig_ruby_trackings to be a static variable, but also
9326 be kept within a hidden instance variable in the SWIG module.
9327 This allows properly dealing with trackings across multiple
9328 DSOs, which was previously broken.
9329 (bug #1700535 and improvement to patch #1702907)
9330
9331 04/29/2007: gga
9332 [Ruby] Fixed GC memory issues with trackings that could lead
9333 to segfaults when dealing, mainly, with static variables.
9334 (bug #1700535 and patch #1702907)
9335
9336 04/29/2007: gga
9337 [Ruby]
9338 Fixed String conversion using old ruby1.6 macros. Now
9339 StringValuePtr() is used if available. This removes warnings
9340 when converting strings with \0 in them.
9341 (bug #1700535 and patch #1702907)
9342
9343 04/29/2007: gga
9344 [Ruby]
9345 Fixed the argout count in directors for Ruby. Previously,
9346 ignored or "numinputs=0" typemaps would incorrectly not get
9347 counted towards the argout count.
9348 (bug/patch #1545585)
9349
9350 04/29/2007: gga
9351 [Ruby]
9352 Upgraded Ruby converter to recognize "numinputs=0". Previously,
9353 only the old "ignore" flag was checked (which would currently
9354 still work properly, but is deprecated).
9355
9356 04/29/2007: gga
9357 [Ruby - but should be made generic]
9358
9359 %feature("numoutputs","0") added.
9360
9361 This feature allows you to ignore the output of a function so
9362 that it is not added to a list of output values
9363 ( ie. argouts ).
9364 This should also become a feature of %typemap(directorout)
9365 as "numoutputs"=0, just like "numinputs"=0 exists.
9366
9367 %feature("directors"=1)
9368
9369 %include <typemaps.i>
9370
9371 %feature("numoutputs","0") { Class::member_function1 };
9372 %typemap(out) MStatus { // some code, like check mstatus
9373 // and raise exception if wrong };
9374
9375 %inline %{
9376 typedef int MStatus;
9377 class Class {
9378
9379 // one argument returned, but director out code added
9380 // MStatus is discarded as a return (out) parameter.
9381 virtual MStatus member_function1( int& OUTPUT );
9382
9383 // two arguments returned, director out code added
9384 // MStatus is not discarded
9385 virtual MStatus member_function2( int& OUTPUT );
9386 };
9387 %}
9388
9389
9390 04/21/2007: olly
9391 Fix parsing of float constants with an exponent (e.g. 1e-02f)
9392 (bug #1699646).
9393
9394 04/20/2007: olly
9395 [Python] Fix lack of generation of docstrings when -O is used.
9396 Also, fix generation of docstrings containing a double quote
9397 character. Patch from Richard Boulton in bug#1700146.
9398
9399 04/17/2007: wsfulton
9400 [Java, C#] Support for adding in Java/C# code before and after the intermediary call,
9401 specifically related to the marshalling of the proxy type to the intermediary type.
9402 The javain/csin typemap now supports the 'pre' and 'post' attributes to achieve this.
9403 The javain typemap also supports an optional 'pgcppname' attribute for premature garbage
9404 collection prevention parameter naming and the csin typemap supports an optional 'cshin'
9405 attribute for the parameter type used in a constructor helper generated when the type is used
9406 in a constructor. Details in the Java.html and CSharp.html documentation.
9407
9408 04/16/2007: olly
9409 Don't treat `restrict' as a reserved identifier in C++ mode
9410 (bug#1685534).
9411
9412 04/16/2007: olly
9413 [PHP5] Fix how zend_throw_exception() is called (bug #1700785).
9414
9415 04/10/2007: olly
9416 Define SWIGTEMPLATEDISAMBIGUATOR to template for aCC (reported on
9417 swig-user that this is needed).
9418
9419 04/04/2007: olly
9420 [PHP5] If ZTS is enabled, release <module>_globals_id in MSHUTDOWN
9421 to avoid PHP interpreter crash on shutdown. This solution was
9422 suggested here: http://bugs.php.net/bug.php?id=40985
9423
9424 04/03/2007: olly
9425 [PHP4] Add missing ZTS annotations to generated C++ wrapper code
9426 to fix compilation failures when using ZTS enabled SWIG (Linux
9427 distributions tend to disable ZTS, but notably the Windows build
9428 uses it by default).
9429
9430 04/01/2007: efuzzyone
9431 [CFFI] Patch #1684261: fixes handling of unsigned int literals, thanks Leigh Smith.
9432 Also, improved documentation.
9433
9434 03/30/2007: olly
9435 Avoid generating '<:' token when using SwigValueWrapper<> on a type
9436 which starts with '::' (patch #1690948).
9437
9438 03/25/2007: wuzzeb (John Lenz)
9439 [perl5] Add SWIG_fail to the SWIG_exception macro. Fixes a few problems reported
9440 on the mailing list.
9441
9442 03/23/2007: wsfulton
9443 String copying patch from Josh Cherry reducing memory consumption by about 25%.
9444
9445 03/21/2007: wsfulton
9446 [Java] Apply patch #1631987 from Ulrik Peterson - bool INOUT typemaps
9447 fail on big endian machines.
9448
9449 03/16/2007: wsfulton
9450 Fix seg fault given dodgy C++ code: namespace abc::def { }
9451
9452 03/16/2007: wsfulton
9453 [Java] Fixes so that ARRAYSOFCLASSES and ARRAYSOFENUMS in arrays_java.i can be applied
9454 to pointer types.
9455
9456 03/03/2007: olly
9457 [PHP5] When we know the literal numeric value for a constant, use
9458 that to initialise the const member in the PHP wrapper class.
9459
9460 03/02/2007: olly
9461 [PHP5] Fix PHP wrapper code generated for certain cases of
9462 overloaded forms with default arguments.
9463
9464 02/26/2007: efuzzyone
9465 [CFFI] Patch #1656395: fixed hex and octal values bug, thanks to Arthur Smyles.
9466
9467 02/22/2007: mgossage
9468 [Lua] Fixed bug in typemaps which caused derived_byvalue and rname test cases to fail.
9469 Updated derived_byvalue.i to explain how to find and fix the problem
9470
9471 01/25/2007: wsfulton
9472 Fix #1538522 and #1338527, forward templated class declarations without a
9473 name for the templated class parameters, such as:
9474
9475 template <typename, class> class X;
9476
9477 01/23/2007: mgossage
9478 [Lua] Patch #1640862: <malloc.h> replaced by <stdlib.h>
9479 Patch #1598063 Typo in typemaps.i
9480
9481 01/22/2007: mgossage
9482 [Lua] Added a lua specific carrays.i which adds the operator[] support.
9483 modified the main code to make it not emit all the class member functions & accessors
9484 Note: C structs are created using new_XXX() while C++ classes use XXX() (should be standardised)
9485 Updated test case: li_carrays
9486 Updated the documentation.
9487
9488 01/12/2007: wsfulton
9489 [Php] Add support for newfree typemaps (sometimes used by %newobject)
9490
9491 01/12/2007: beazley
9492 New command line option -macroerrors. When supplied, this will force
9493 the C scanner/parser to report proper location information for code contained
9494 inside SWIG macros (defined with %define). By default, SWIG merely reports
9495 errors on the line at which a macro is used. With this option, you
9496 can expand the error back to its source---something which may simplify
9497 debugging.
9498
9499 01/12/2007: beazley
9500 [Internals] Major overhaul of C/C++ scanning implementation. For quite
9501 some time, SWIG contained two completely independent C/C++ tokenizers--
9502 the legacy scanner in CParse/cscanner.c and a general purpose scanner
9503 in Swig/scanner.c. SWIG still has two scanning modules, but the C parser
9504 scanner (CParse/cscanner.c) now relies upon the general purpose
9505 scanner found in Swig/scanner.c. As a result, it is much smaller and
9506 less complicated. This change also makes it possible to maintain all
9507 of the low-level C tokenizing in one central location instead of two
9508 places as before.
9509
9510 ***POTENTIAL FLAKINESS***
9511 This change may cause problems with accurate line number reporting
9512 as well as error reporting more generally. I have tried to resolve this
9513 as much as possible, but there might be some corner cases.
9514
9515 01/12/2007: mgossage
9516 [Lua] Added typemap throws for std::string*, typemap for SWIGTYPE DYNAMIC,
9517 changed the existing throws typemap to throw a string instead of making a copy of
9518 the object (updating a few test cases to deal with the change).
9519 fixed test case: dynamic_casts, exception_partial_info, li_std_string, size_t
9520
9521 01/03/2007: beazley
9522 [Internals]. Use of swigkeys.c/.h variables is revoked. Please use
9523 simple strings for attribute names.
9524
9525 12/30/2006: beazley
9526 Internal API functions HashGetAttr() and HashCheckAttr() have been revoked.
9527 Please use Getattr() to retrieve attributes. The function Checkattr() can
9528 be used to check attributes. Note: These functions have been revoked
9529 because they only added a marginal performance improvement at the expense
9530 code clarity.
9531
9532 12/26/2006: mgossage
9533 [Lua] Added more STL (more exceptions, map, size_t),
9534 fixed test case: conversion_ns_template.
9535
9536 12/21/2006: mgossage
9537 [Lua] Update to throw errors when setting immutables,
9538 and allowing user addition of module variables.
9539
9540 12/20/2006: wsfulton
9541 Fix typedef'd variable wrappers that use %naturalvar, eg, std::string.
9542
9543 12/14/2006: wsfulton
9544 [C#] Add std::wstring and wchar_t typemaps
9545
9546 12/14/2006: olly
9547 [php] Fix bug #1613673 (bad PHP5 code generated for getters and
9548 setters).
9549
9550 12/02/2006: wsfulton, John Lenz, Dave Beazley
9551 Move from cvs to Subversion for source control
9552
9553 11/30/2006: beazley
9554 Cleaned up swigwarnings.swg file not to use nested macro
9555 definitions.
9556
9557 11/12/2006: wsfulton
9558 [Java, C#] Fix for %extend to work for static member variables.
9559
9560 Version 1.3.31 (November 20, 2006)
9561 ==================================
9562
9563 11/12/2006: Luigi Ballabio
9564 [Python] Alternate fix for Python exceptions bug #1578346 (the previous one broke Python
9565 properties in modern classes)
9566
9567 11/12/2006: wsfulton
9568 -fakeversion commandline option now generates the fake version into the generated wrappers
9569 as well as displaying it when the -version commandline option is used.
9570
9571 14/11/2006: mgossage
9572 [lua] update to typemap for object by value, to make it c89 compliant
9573
9574 Version 1.3.30 (November 13, 2006)
9575 ==================================
9576
9577 11/12/2006: wsfulton
9578 [java] Remove DetachCurrentThread patch from 08/11/2006 - it causes segfaults
9579 on some systems.
9580
9581 11/12/2006: wsfulton
9582 [python] Fix #1578346 - Python exceptions with -modern
9583
9584 11/10/2006: wsfulton
9585 Fix #1593291 - Smart pointers and inheriting from templates
9586
9587 11/09/2006: wsfulton
9588 Fix director operator pointer/reference casts - #1592173.
9589
9590 11/07/2006: wsfulton
9591 Add $self special variable for %extend methods. Please use this instead of just 'self'
9592 as the C++ 'this' pointer.
9593
9594 11/07/2006: mutandiz
9595 [allegrocl]
9596 allegrocl.swg: swig-defvar updated to allow specifying of
9597 non-default foreign type (via :ftype keyword arg).
9598 allegrocl.cxx: Specify proper access type for enum values.
9599
9600 11/03/2006: wsfulton
9601 [Java/C#] Fix const std::string& return types for directors as reported by
9602 Mark Donselzmann
9603
9604 10/29/2006: wsfulton
9605 [Java] Remove DeleteLocalRef from end of director methods for now as it is causing a
9606 seg fault when run on Solaris 8.
9607
9608 10/29/2006: wuzzeb (John Lenz)
9609 [Guile] Patch from Chris Shoemaker to clean up some warnings in the generated code.
9610
9611 10/29/2006: wsfulton
9612 [Java] Important fix to prevent early garbage collection of the Java proxy class
9613 while it is being used in a native method. The finalizer could destroy the underlying
9614 C++ object while it was being used. The problem occurs when the proxy class is no
9615 longer strongly reachable after a native call. The problem seems to occur in
9616 memory stress situations on some JVMs. It does not seem to occur on the
9617 Sun client JVM up to jdk 1.5. However the 1.6 client jdk has a more aggressive garbage
9618 collector and so the problem does occur. It does occur on the Sun server
9619 JVMs (certainly 1.4 onwards). The fix entails passing the proxy class into the native
9620 method in addition to the C++ pointer in the long parameter, as Java classes are not
9621 collected when they are passed into JNI methods. The extra parameter can be suppressed
9622 by setting the nopgcpp attribute in the jtype typemap to "1" or using the new -nopgcpp
9623 commandline option.
9624
9625 See Java.html#java_pgcpp for further details on this topic.
9626
9627 10/24/2006: wsfulton
9628 [C#] Fix smart pointer wrappers. The virtual/override/new keyword is not generated
9629 for each method as the smart pointer class does not mirror the underlying pointer
9630 class inheritance hierarchy. SF #1496535
9631
9632 10/24/2006: mgossage
9633 [lua] added support for native methods & member function pointers.
9634 fixed test cases arrays_dimensionless & cpp_basic. Added new example (functor).
9635 tidied up a little of the code (around classHandler).
9636
9637 10/17/2006: wsfulton
9638 [C#, Java] directorout typemap changes to fall in line with the other director
9639 languages. $result is now used where $1 used to be used. Please change your typemaps
9640 if you have a custom directorout typemap.
9641
9642 10/18/2006: wsfulton
9643 Some fixes for applying the char array typemaps to unsigned char arrays.
9644
9645 10/17/2006: wsfulton
9646 [C#, Java] Add in const size_t& and const std::size_t& typemaps.
9647
9648 10/15/2006: efuzzyone
9649 [CFFI] Suppress generating defctype for enums, thanks to Arthur Smyles. Patch 1560983.
9650
9651 10/14/2006: wuzzeb (John Lenz)
9652 [Chicken] Minor fix to make SWIG work with the (as yet unreleased) chicken 2.5
9653
9654 [Guile,Chicken] Fix SF Bug 1573892. Added an ext_test to the test suite to test
9655 this bug, but this test can not really be made generic because the external code must
9656 plug into the target language interpreter directly.
9657 See Examples/test-suite/chicken/ext_test.i and ext_test_external.cxx
9658
9659 Added a %.externaltest to common.mk, and any interested language modules can
9660 copy and slightly modify either the chicken or the guile ext_test.i
9661
9662 10/14/2006: mgossage
9663 [Lua] added OUTPUT& for all number types, added a long long type
9664 fixed several test cases.
9665 update: changed typemaps to use SWIG_ConvertPtr rather than SWIG_MustGetPointer
9666 started spliting lua.swg into smaller parts to make it neater
9667
9668 10/13/2006: wsfulton
9669 [C#, Java] Marginally better support for multiple inheritance only in that you can
9670 control what the base class is. This is done using the new 'replace' attribute in the
9671 javabase/csbase typemap, eg in the following, 'Me' will be the base class,
9672 no matter what Foo is really derived from in the C++ layer.
9673
9674 %typemap(javabase, replace="1") Foo "Me"
9675 %typemap(csbase, replace="1") Foo "Me"
9676
9677 Previously it was not possible for the javabase/csbase typemaps to override the C++ base.
9678
9679 10/12/2006: wsfulton
9680 [Java] Remove potential race condition on the proxy class' delete() method
9681 (it is now a synchronized method, but is now customisable by changing the
9682 methodmodifiers attribute in the javadestruct or javadestruct_derived typemap)
9683
9684 [C#] Remove potential race condition on the proxy class' Dispose() method,
9685 similar to Java's delete() above.
9686
9687 *** POTENTIAL INCOMPATIBILITY ***
9688
9689 10/12/2006: wsfulton
9690 [Ruby, Python] Remove redundant director code in %extend methods (%extend
9691 methods cannot be director methods)
9692
9693 10/12/2006: wsfulton
9694 [Ruby, Python] Fix #1505594 - director objects not returned as director objects
9695 in %extend methods.
9696
9697 10/11/2006: wsfulton
9698 [Java] Fix #1238798 - Directors using unsigned long long or any other type
9699 marshalled across the JNI boundary using a Java class (where the jni typemap
9700 contains jobject).
9701
9702 10/06/2006: wsfulton
9703 Fix #1162194 - #include/%include within a structure
9704
9705 10/06/2006: wsfulton
9706 Fix #1450661, string truncation in String_seek truncating Java/C# enums.
9707
9708 10/06/2006: mgossage
9709 [Lua] Fix #1569587. The name is now correct.
9710
9711 10/04/2006: wsfulton
9712 Director fixes for virtual conversion operators
9713
9714 10/04/2006: olly
9715 [php] Fix #1569587 for PHP. Don't use sizeof() except with string
9716 literals. Change some "//" comments to "/* */" for portability.
9717
9718 10/04/2006: mgossage
9719 [Lua] Partial Fix #1569587. The type is now correct, but the name is still not correct.
9720
9721 10/03/2006: wsfulton
9722 [Ruby] Fix #1527885 - Overloaded director virtual methods sometimes produced
9723 uncompilable code when used with the director:except feature.
9724
9725 10/03/2006: wsfulton
9726 Directors: Directors are output in the order in which they are declared in
9727 the C++ class rather than in some pseudo-random order.
9728
9729 10/03/2006: mmatus
9730 Fix #1486281 and #1471039.
9731
9732 10/03/2006: olly
9733 [Perl] Fix for handling strings with zero bytes from Stephen Hutsal.
9734
9735 09/30/2006: efuzzyone
9736 [CFFI] Bitfield support and vararg support due to Arthur Smyles.
9737 C expression to Lisp conversion, thanks to Arthur Smyles for the initial
9738 idea, it now supports conversion for a whole range of C expressions.
9739
9740 09/28/2006: wsfulton
9741 Fix #1508327 - Overloaded methods are hidden when using -fvirtual optimisation.
9742 Overloaded methods are no longer candidates for elimination - this mimics
9743 C++ behaviour where all overloaded methods must be defined and implemented
9744 in a derived class in order for them to be available.
9745
9746 09/25/2006: wsfulton
9747 [Ruby, Python, Ocaml] Fix #1505591 Throwing exceptions in extended directors
9748
9749 09/25/2006: wsfulton
9750 Fix #1056100 - virtual operators.
9751
9752 09/24/2006: olly
9753 Don't accidentally create a "<:" token (which is the same as "[" in C++).
9754 Fixes bug # 1521788.
9755
9756 09/23/2006: olly
9757 [Ruby] Support building with recent versions of the Ruby 1.9
9758 development branch. Fixes bug #1560092.
9759
9760 09/23/2006: olly
9761 Templates can now be instantiated using negative numbers and
9762 constant expressions, e.g.:
9763
9764 template<int q> class x {};
9765 %template(x_minus1) x<-1>;
9766 %template(x_1plus2) x<1+2>;
9767
9768 Also, constant expressions can now include comparisons (>, <, >=,
9769 <=, !=, ==), modulus (%), and ternary conditionals (a ? b : c).
9770
9771 Fixes bugs #646275, #925555, #956282, #994301.
9772
9773 09/22/2006: wsfulton
9774 Fix %ignore on director methods - Bugs #1546254, #1543533
9775
9776 09/20/2006: wsfulton
9777 Fix %ignore on director constructors
9778
9779 09/20/2006: wsfulton
9780 Fix seg faults and asserts when director methods are ignored (#1543533)
9781
9782 09/20/2006: wsfulton
9783 Fix out of source builds - bug #1544718
9784
9785 09/20/2006: olly
9786 Treat a nested class definition as a forward declaration rather
9787 than ignoring it completely, so that we generate correct code for
9788 passing opaque pointers to the nested class (fixes SF bug #909387).
9789
9790 09/20/2006: olly
9791 *** POTENTIAL INCOMPATIBILITY ***
9792 [php] Overload resolution now works. However to allow this, SWIG
9793 generated wrappers no longer coerce PHP types (which reverts a change
9794 made in 1.3.26). So for example, if a method takes a string, you
9795 can no longer pass a number without explicitly converting it to a
9796 string in PHP using: (string)x
9797
9798 09/18/2006: mgossage
9799 [ALL] fix on swiginit.swg, has been reported to crash on several test cases
9800 found and fixed problem in imports under python (mingw)
9801
9802 09/16/2006: wsfulton
9803 [Python] Patch from Michal Marek for Python 2.5 to fix 64 bit array indexes on
9804 64 bit machines.
9805
9806 09/13/2006: wsfulton
9807 The explicitcall feature has been scrapped. This feature was introduced primarily
9808 to solve recursive director method calls. Director upcall improvements made instead:
9809
9810 [Python, Ruby, Ocaml] The swig_up flag is no longer used. The required mutexes
9811 wrapping this flag are also no longer needed. The recursive calls going from C++
9812 to the target language and back again etc are now avoided by a subtlely different
9813 approach. Instead of using the swig_up flag in each director method to indicate
9814 whether the explicit C++ call to the appropriate base class method or a normal
9815 polymorphic C++ call should be made, the new approach makes one of these calls
9816 directly from the wrapper method.
9817
9818 [Java, C#] The recursive call problem when calling a C++ base class method from
9819 Java/C# is now fixed. The implementation is slightly different to the other languages
9820 as the detection as to whether the explicit call or a normal polymorphic call is made
9821 in the Java/C# layer rather than in the C++ layer.
9822
9823 09/11/2006: mgossage
9824 [ALL] updated swiginit.swg to allow multiple interpreters to use multiple
9825 swig modules at once. This has been tested in Lua (mingw & linux),
9826 perl5 & python (linux) only.
9827
9828 09/11/2006: mgossage
9829 [lua] added support for passing function pointers as well as native lua object
9830 into wrappered function.
9831 Added example funcptr3 to demonstrate this feature
9832
9833 09/05/2006: olly
9834 [php] Rename ErrorCode and ErrorMsg #define-s to SWIG_ErrorCode
9835 and SWIG_ErrorMsg to avoid clashes with code the user might be
9836 wrapping (patch from Darren Warner in SF bug #1466086). Any
9837 user typemaps which use ErrorCode and/or ErrorMsg directly will
9838 need adjusting - you can easily fix them to work with both old
9839 and new SWIG by changing to use SWIG_ErrorMsg and adding:
9840
9841 #ifndef SWIG_ErrorMsg
9842 #define SWIG_ErrorMsg() ErrorMsg()
9843 #endif
9844
9845 08/29/2006: olly
9846 [php] Move constant initialisation from RINIT to MINIT to fix a
9847 warning when using Apache and mod_php. We only need to create
9848 PHP constants once when we're first initialised, not for every HTTP
9849 request.
9850
9851 08/21/2006: mgossage
9852 [Lua]
9853 Bugfix #1542466 added code to allow mapping Lua nil's <-> C/C++ NULL's
9854 updated various typemaps to work correctly with the changes
9855 added voidtest_runme.lua to show the features working
9856
9857 08/19/2006: wuzzeb (John Lenz)
9858 [Guile] Add feature:constasvar to export constants as variables instead of functions
9859 that return the constant value.
9860
9861 08/11/2006: wsfulton
9862 [Java] DetachCurrentThread calls have been added so that natively created threads
9863 no longer prevent the JVM from exiting. Bug reported by Thomas Dudziak and
9864 Paul Noll.
9865
9866 08/10/2006: wsfulton
9867 [C#] Fix director protected methods so they work
9868
9869 07/25/2006: mutandiz
9870 [allegrocl]
9871 more additions to std::string, some tweaks and small bug fixes
9872 -nocwrap mode.
9873
9874 07/21/2006: mgossage
9875 [Lua]
9876 Bugfix #1526022 pdated std::string to support strings with '\0' inside them
9877 updated typemaps.i to add support for pointer to pointers
9878
9879 07/19/2006: mutandiz
9880 [allegrocl]
9881 - Add std_string.i support.
9882 - Add newobject patch submitted by mkoeppe (thanks!)
9883 - Fix type name mismatch issue for nested type definitions.
9884 specifically typedefs in templated class defns.
9885
9886 07/18/2006: mgossage
9887 Bugfix #1522858
9888 updated lua.cxx to support -external-runtime command
9889
9890 07/14/2006: wuzzeb (John Lenz)
9891 Increment the SWIG_RUNTIME_VERSION to 3, because of the
9892 addition of the owndata member in swig_type_info.
9893 Reported by: Prabhu Ramachandran
9894
9895 07/05/2006: wsfulton
9896 Search path fixes:
9897 - Fix search path for library files to behave as documented in Library.html.
9898 - Fix mingw/msys builds which did not find the SWIG library when installed.
9899 - Windows builds also output the mingw/msys install location when running
9900 swig -swiglib.
9901 - The non-existent and undocumented config directory in the search path has
9902 been removed.
9903
9904 07/05/2006: wsfulton
9905 Fix $symname special variable expansion.
9906
9907 07/04/2006: wuzzeb (John Lenz)
9908 [Chicken]
9909 Add %feature("constasvar"), which instead of exporting a constant as a
9910 scheme function, exports the constant as a scheme variable. Update the
9911 documentation as well.
9912
9913 07/04/2006: wsfulton
9914 [See entry of 09/13/2006 - explicitcall feature and documentation to it removed]
9915 New explicitcall feature which generates additional wrappers for virtual methods
9916 that call the method explicitly, not relying on polymorphism to make the method
9917 call. The feature is a feature flag and is enabled like any other feature flag.
9918 It also recognises an attribute, "suffix" for mangling the feature name, see
9919 SWIGPlus.html#SWIGPlus_explicitcall documentation for more details.
9920
9921 [Java, C#]
9922 The explicitcall feature is also a workaround for solving the recursive calls
9923 problem when a director method makes a call to a base class method. See
9924 Java.html#java_directors_explicitcall for updated documentation.
9925
9926 06/28/2006: joe (Joseph Wang)
9927 [r] Initial support for R
9928
9929 06/20/2006: wuzzeb (John Lenz)
9930 [Chicken]
9931 Minor fixes to get apply_strings.i testsuite to pass
9932 Remove integers_runme.scm from the testsuite, because SWIG and Chicken does
9933 handle overflows.
9934
9935 06/19/2005: olly
9936 [php] Add support for generating PHP5 class wrappers for C++
9937 classes (use "swig -php5").
9938
9939 06/17/2006: olly
9940 [php] Added some missing keywords to the PHP4 keyword list, and
9941 fixed __LINE__ and __FILE__ which were in the wrong category.
9942 Also added all the keywords new in PHP5, and added comments
9943 noting the PHP4 keywords which aren't keywords in PHP5.
9944
9945 06/17/2006: olly
9946 [php] Don't segfault if PHP Null is passed as this pointer (e.g.
9947 Class_method(Null)) - give a PHP Error instead.
9948
9949 06/15/2006: mutandiz
9950 [allegrocl]
9951 Add initial support for std::list container class.
9952 Fix a few bugs in helper functions.
9953
9954 05/13/2006: wsfulton
9955 [Java] Replace JNIEXPORT with SWIGEXPORT, thereby enabling the possibility
9956 of using gcc -fvisibility=hidden for potentially smaller faster loading wrappers.
9957
9958 05/13/2006: wsfulton
9959 Fix for Makefiles for autoconf-2.60 beta
9960
9961 05/13/2006: wsfulton
9962 Vladimir Menshakov patch for compiling wrappers with python-2.5 alpha.
9963
9964 05/12/2006: wsfulton
9965 Fix buffer overflow error when using large %feature(docstring) reported
9966 by Joseph Winston.
9967
9968 05/12/2006: wsfulton
9969 [Perl] Operator overload fix from Daniel Moore.
9970
9971 05/25/2006: mutandiz
9972 [allegrocl]
9973 Fix bug in generation of CLOS type declarations for unions
9974 and equivalent types.
9975
9976 05/24/2006: mutandiz
9977 [allegrocl]
9978 Don't require a full class definition to generate a CLOS wrapper.
9979
9980 05/20/2006: olly
9981 [php] GCC Visibility support now works with PHP.
9982
9983 05/19/2006: olly
9984 [php] Removed support for -dlname (use -module instead). Fixed
9985 naming of PHP extension module to be consistent with PHP
9986 conventions (no "php_" prefix on Unix; on PHP >= 4.3.0, handle Unix
9987 platforms which use something other than ".so" as the extension.)
9988
9989 05/13/2006: wsfulton
9990 [C#] Director support added
9991
9992 05/07/2006: olly
9993 [php] Don't segfault if PHP Null is passed where a C++ reference
9994 is wanted.
9995
9996 05/05/2006: olly
9997 [php] Fix wrappers generated for global 'char' variables to not
9998 include a terminating zero byte in the PHP string.
9999
10000 05/03/2006: wsfulton
10001 Modify typemaps so that char * can be applied to unsigned char * or signed char *
10002 types and visa versa.
10003
10004 05/03/2006: efuzzyone
10005 [cffi]Thanks to Luke J Crook for this idea.
10006 - a struct/enum/union is replaced with :pointer only if
10007 that slot is actually a pointer to that type. So,:
10008 struct a_struct { int x; } and
10009 struct b_struct { a_struct struct_1; };
10010 will be converted as:
10011 (cffi:defcstruct b_struct
10012 (struct_1 a_struct))
10013 - Other minor fixes in lispifying names.
10014
10015 05/02/2006: wsfulton
10016 Fix possible redefinition of _CRT_SECURE_NO_DEPRECATE for VC++.
10017
10018 04/14/2006: efuzzyone
10019 [cffi]
10020 Thanks to Thomas Weidner for the patch.
10021 - when feature export is set (export 'foo) is
10022 generated for every symbol
10023 - when feature inline is set (declaim (inline foo)) is
10024 generated before every function definition
10025 - when feature intern_function is set
10026 #.(value-of-intern-function "name" "nodeType" package)
10027 is emitted instead of the plain symbol. A sample swig-lispify
10028 is provided.
10029 - every symbol is prefixed by it's package.
10030
10031 04/13/2006: efuzzyone
10032 [cffi]
10033 Fixed the generation of wrappers for global variables.
10034 Added the option [no]swig-lisp which turns on/off generation
10035 of code for swig helper lisp macro, functions, etc.
10036
10037 Version 1.3.29 (March 21, 2006)
10038 ===============================
10039
10040 04/05/2006: mutandiz
10041 [allegrocl]
10042 Fix output typemap of char so it produces a character instead
10043 of an integer. Also adds input/output typemaps for 'char *'.
10044
10045 add command-line argument -isolate to generate an interface
10046 file that won't interfere with other SWIG generated files that
10047 may be used in the same application.
10048
10049 03/20/2005: mutandiz
10050 [allegrocl]
10051 More tweaks to INPUT/OUTPUT typemaps for bool.
10052
10053 Fix constantWrapper for char and string literals.
10054
10055 find-definition keybindings should work in ELI/SLIME.
10056 Output (in-package <module-name>) to lisp wrapper
10057 instead of (in-package #.*swig-module-name*).
10058
10059 slight rework of multiple return values.
10060
10061 doc updates.
10062
10063 03/17/2005: mutandiz
10064 [allegrocl]
10065 mangle names of constants generated via constantWrapper.
10066
10067 When using OUTPUT typemaps and the function has a non-void
10068 return value, it should be first in the values-list, followed
10069 by the OUTPUT mapped values.
10070
10071 Fix bug with boolean parameters, which needed to be
10072 passed in as int values, rather than T or NIL.
10073
10074 03/15/2006: mutandiz
10075 [allegrocl]
10076 Generate wrappers for constants when in C++ or -cwrap mode.
10077 Make -cwrap the default, since it is most correct. Users
10078 can use the -nocwrap option to avoid the creation of a .cxx
10079 file when interfacing to C code.
10080
10081 When in -nocwrap mode, improve the handling of converting
10082 infix literals to prefix notation for lisp. This is very
10083 basic and not likely to be improved upon since this only
10084 applies to the -nocwrap case. Literals we can't figure out
10085 will result in a warning and be included in the generated
10086 code.
10087
10088 validIdentifier now more closely approximates what may be
10089 a legal common lisp symbol.
10090
10091 Fix typemap error in allegrocl.swg
10092
10093 03/12/2006: mutandiz
10094 [allegrocl]
10095 fix up INPUT/OUTPUT typemaps for bool.
10096 Generate c++ style wrapper functions for struct/union members
10097 when -cwrap option specified.
10098
10099 03/10/2006: mutandiz
10100 [allegrocl]
10101 Fix bug in C wrapper generation introduced by last allegrocl
10102 commit.
10103
10104 03/10/2006: wsfulton
10105 [Java]
10106 Commit #1447337 - Delete LocalRefs at the end of director methods to fix potential leak
10107
10108 03/10/2006: wsfulton
10109 Fix #1444949 - configure does not honor --program-prefix.
10110 Removed non-standard configure option --with-release-suffix. Fix the autoconf standard
10111 options --program-prefix and --program-suffix which were being shown in the help,
10112 but were being ignored. Use --program-suffix instead of --with-release-suffix now.
10113
10114 03/10/2006: wsfulton
10115 [Java]
10116 Fix #1446319 with patch from andreasth - more than one wstring parameter in director methods
10117
10118 03/07/2006: mkoeppe
10119 [Guile]
10120 Fix for module names containing a "-" in non-"shadow" mode.
10121 Patch from Aaron VanDevender (#1441474).
10122
10123 03/04/2006: mmatus
10124 - Add -O to the main program, which now enables -fastdispatch
10125
10126 [Python]
10127
10128 - Add the -fastinit option to enable faster __init__
10129 methods. Setting 'this' as 'self.this.append(this)' in the python
10130 code confuses PyLucene. Now the initialization is done in the
10131 the C++ side, as reported by Andi and Robin.
10132
10133 - Add the -fastquery option to enable faster SWIG_TypeQuery via a
10134 python dict cache, as proposed by Andi Vajda
10135
10136 - Avoid to call PyObject_GetAttr inside SWIG_Python_GetSwigThis,
10137 since this confuses PyLucene, as reported by Andi Vajda.
10138
10139 03/02/2006: wsfulton
10140 [Java]
10141 Removed extra (void *) cast when casting pointers to and from jlong as this
10142 was suppressing gcc's "dereferencing type-punned pointer will break strict-aliasing rules"
10143 warning. This warning could be ignored in versions of gcc prior to 4.0, but now the
10144 warning is useful as gcc -O2 and higher optimisation levels includes -fstrict-aliasing which
10145 generates code that doesn't work with these casts. The assignment is simply never made.
10146 Please use -fno-strict-aliasing to both suppress the warning and fix the bad assembly
10147 code generated. Note that the warning is only generated by the C compiler, but not
10148 the C++ compiler, yet the C++ compiler will also generate broken code. Alternatively use
10149 -Wno-strict-aliasing to suppress the warning for gcc-3.x. The typemaps affected
10150 are the "in" and "out" typemaps in java.swg and arrays_java.swg. Users ought to fix
10151 their own typemaps to do the same. Note that removal of the void * cast simply prevents
10152 suppression of the warning for the C compiler and nothing else. Typical change:
10153
10154 From:
10155 %typemap(in) SWIGTYPE * %{ $1 = *($&1_ltype)(void *)&$input; %}
10156 To:
10157 %typemap(in) SWIGTYPE * %{ $1 = *($&1_ltype)&$input; %}
10158
10159 From:
10160 %typemap(out) SWIGTYPE * %{ *($&1_ltype)(void *)&$result = $1; %}
10161 To:
10162 %typemap(out) SWIGTYPE * %{ *($&1_ltype)&$result = $1; %}
10163
10164 03/02/2006: mkoeppe
10165 [Guile -scm]
10166 Add typemaps for "long long"; whether the generated code compiles, however, depends
10167 on the version and configuration of Guile.
10168
10169 03/02/2006: wsfulton
10170 [C#]
10171 Add support for inner exceptions. If any of the delegates are called which construct
10172 a pending exception and there is already a pending exception, it will create the new
10173 exception with the pending exception as an inner exception.
10174
10175 03/02/2006: wsfulton
10176 [Php]
10177 Added support for Php5 exceptions if compiling against Php5 (patch from Olly Betts).
10178
10179 03/01/2006: mmatus
10180 Use the GCC visibility attribute in SWIGEXPORT.
10181
10182 Now you can compile (with gcc 3.4 or later) using
10183 CFLAGS="-fvisibility=hidden".
10184
10185 Check the difference for the 'std_containers.i' python
10186 test case:
10187
10188 Sizes:
10189
10190 3305432 _std_containers.so
10191 2383992 _std_containers.so.hidden
10192
10193 Exported symbols (nm -D <file>.so | wc -l):
10194
10195 6146 _std_containers.so
10196 174 _std_containers.so.hidden
10197
10198 Execution times:
10199
10200 real 0m0.050s user 0m0.039s sys 0m0.005s _std_containers.so
10201 real 0m0.039s user 0m0.026s sys 0m0.007s _std_containers.so.hidden
10202
10203 Read http://gcc.gnu.org/wiki/Visibility for more details.
10204
10205
10206 02/27/2006: mutandiz
10207 [allegrocl]
10208 Add support for INPUT, OUTPUT, and INOUT typemaps.
10209 For OUTPUT variables, the lisp wrapper returns multiple
10210 values.
10211
10212 02/26/2006: mmatus
10213
10214 [Ruby] add argcargv.i library file.
10215
10216 Use it as follow:
10217
10218 %include argcargv.i
10219
10220 %apply (int ARGC, char **ARGV) { (size_t argc, const char **argv) }
10221
10222 %inline {
10223 int mainApp(size_t argc, const char **argv)
10224 {
10225 return argc;
10226 }
10227 }
10228
10229 then in the ruby side:
10230
10231 args = ["asdf", "asdf2"]
10232 n = mainApp(args);
10233
10234
10235 This is the similar to the python version Lib/python/argcargv.i
10236
10237 02/24/2006: mgossage
10238
10239 Small update Lua documents on troubleshooting problems
10240
10241 02/22/2006: mmatus
10242
10243 Fix all the errors reported for 1.3.28.
10244 - fix bug #1158178
10245 - fix bug #1060789
10246 - fix bug #1263457
10247 - fix 'const char*&' typemap in the UTL, reported by Geoff Hutchison
10248 - fixes for python 2.1 and the runtime library
10249 - fix copyctor + template bug #1432125
10250 - fix [ 1432152 ] %rename friend operators in namespace
10251 - fix gcc warning reported by R. Bernstein
10252 - avoid assert when finding a recursive scope inheritance,
10253 emit a warning in the worst case, reported by Nitro
10254 - fix premature object deletion reported by Paul in tcl3d
10255 - fix warning reported by Nitro in VC7
10256 - more fixes for old Solaris compiler
10257 - fix for python 2.3 and gc_refs issue reported by Luigi
10258 - fix fastproxy for methods using kwargs
10259 - fix overload + protected member issue reported by Colin McDonald
10260 - fix seterrormsg as reported by Colin McDonald
10261 - fix directors, now the test-suite runs again using -directors
10262 - fix for friend operator and Visual studio and bug 1432152
10263 - fix bug #1435090
10264 - fix using + %extend as reported by William
10265 - fix bug #1094964
10266 - fix for Py_NotImplemented as reported by Olly and Amaury
10267 - fix nested namespace issue reported by Charlie
10268
10269 and also:
10270
10271 - allow director protected members by default
10272 - delete extra new lines in swigmacros[UTL]
10273 - cosmetic for generated python code
10274 - add the factory.i library for UTL
10275 - add swigregister proxy method and move __repr__ to a
10276 single global module [python]
10277
10278 02/22/2006: mmatus
10279
10280 When using directors, now swig will emit all the virtual
10281 protected methods by default.
10282
10283 In previous releases, you needed to use the 'dirprot'
10284 option to achieve the same.
10285
10286 If you want, you can disable the new default behaviour,
10287 use the 'nodirprot' option:
10288
10289 swig -nodirprot ...
10290
10291 and/or the %nodirector feature for specific methods, i.e.:
10292
10293 %nodirector Foo::bar;
10294
10295 struct Foo {
10296 virtual ~Foo();
10297
10298 protected:
10299 virtual void bar();
10300 };
10301
10302
10303 As before, pure abstract protected members are allways
10304 emitted, independent of the 'dirprot/nodirprot' options.
10305
10306
10307 02/22/2006: mmatus
10308 Add the factory.i library for languages using the UTL (python,tcl,ruby,perl).
10309
10310 factory.i implements a more natural wrap for factory methods.
10311
10312 For example, if you have:
10313
10314 ---- geometry.h --------
10315 struct Geometry {
10316 enum GeomType{
10317 POINT,
10318 CIRCLE
10319 };
10320
10321 virtual ~Geometry() {}
10322 virtual int draw() = 0;
10323
10324 //
10325 // Factory method for all the Geometry objects
10326 //
10327 static Geometry *create(GeomType i);
10328 };
10329
10330 struct Point : Geometry {
10331 int draw() { return 1; }
10332 double width() { return 1.0; }
10333 };
10334
10335 struct Circle : Geometry {
10336 int draw() { return 2; }
10337 double radius() { return 1.5; }
10338 };
10339
10340 //
10341 // Factory method for all the Geometry objects
10342 //
10343 Geometry *Geometry::create(GeomType type) {
10344 switch (type) {
10345 case POINT: return new Point();
10346 case CIRCLE: return new Circle();
10347 default: return 0;
10348 }
10349 }
10350 ---- geometry.h --------
10351
10352
10353 You can use the %factory with the Geometry::create method as follows:
10354
10355 %newobject Geometry::create;
10356 %factory(Geometry *Geometry::create, Point, Circle);
10357 %include "geometry.h"
10358
10359 and Geometry::create will return a 'Point' or 'Circle' instance
10360 instead of the plain 'Geometry' type. For example, in python:
10361
10362 circle = Geometry.create(Geometry.CIRCLE)
10363 r = circle.radius()
10364
10365 where 'circle' now is a Circle proxy instance.
10366
10367
10368 02/17/2006: mkoeppe
10369 [MzScheme] Typemaps for all integral types now accept the full range of integral
10370 values, and they signal an error when a value outside the valid range is passed.
10371 [Guile] Typemaps for all integral types now signal an error when a value outside
10372 the valid range is passed.
10373
10374 02/13/2006: mgossage
10375 [Documents] updated the extending documents to give a skeleton swigging code
10376 with a few typemaps.
10377 [Lua] added an extra typemap for void* [in], so a function which requires a void*
10378 can take any kind of pointer
10379
10380 Version 1.3.28 (February 12, 2006)
10381 ==================================
10382
10383 02/11/2006: mmatus
10384 Fix many issues with line counting and error reports.
10385
10386 02/11/2006: mmatus
10387 [Python] Better static data member support, if you have
10388
10389 struct Foo {
10390 static int bar;
10391 };
10392
10393 then now is valid to access the static data member, ie:
10394
10395 f = Foo()
10396 f.bar = 3
10397
10398 just as in C++.
10399
10400
10401 02/11/2006: wsfulton
10402 [Perl]
10403 Fixed code generation to work again with old versions of Perl
10404 (5.004 and later tested)
10405
10406 02/04/2006: mmatus
10407 [Python] Add the %extend_smart_pointer() directive to extend
10408 SWIG smart pointer support in python.
10409
10410 For example, if you have a smart pointer as:
10411
10412 template <class Type> class RCPtr {
10413 public:
10414 ...
10415 RCPtr(Type *p);
10416 Type * operator->() const;
10417 ...
10418 };
10419
10420 you use the %extend_smart_pointer directive as:
10421
10422 %extend_smart_pointer(RCPtr<A>);
10423 %template(RCPtr_A) RCPtr<A>;
10424
10425 then, if you have something like:
10426
10427 RCPtr<A> make_ptr();
10428 int foo(A *);
10429
10430 you can do the following:
10431
10432 a = make_ptr();
10433 b = foo(a);
10434
10435 ie, swig will accept a RCPtr<A> object where a 'A *' is
10436 expected.
10437
10438 Also, when using vectors
10439
10440 %extend_smart_pointer(RCPtr<A>);
10441 %template(RCPtr_A) RCPtr<A>;
10442 %template(vector_A) std::vector<RCPtr<A> >;
10443
10444 you can type
10445
10446 a = A();
10447 v = vector_A(2)
10448 v[0] = a
10449
10450 ie, an 'A *' object is accepted, via implicit conversion,
10451 where a RCPtr<A> object is expected. Additionally
10452
10453 x = v[0]
10454
10455 returns (and sets 'x' as) a copy of v[0], making reference
10456 counting possible and consistent.
10457
10458 %extend_smart_pointer is just a collections of new/old
10459 tricks, including %typemaps and the new %implicitconv
10460 directive.
10461
10462 02/02/2006: mgossage
10463 bugfix #1356577, changed double=>lua_number in a few places.
10464 added the std::pair wrapping
10465
10466 01/30/2006: wsfulton
10467 std::string and std::wstring member variables and global variables now use
10468 %naturalvar by default, meaning they will now be wrapped as expected in all languages.
10469 Previously these were wrapped as a pointer rather than a target language string.
10470 It is no longer necessary to add the following workaround to wrap these as strings:
10471
10472 %apply const std::string & { std::string *}
10473
10474 *** POTENTIAL INCOMPATIBILITY ***
10475
10476 01/28/2006: mkoeppe
10477 [Guile -scm]
10478 Add typemaps for handling of member function pointers.
10479
10480 01/24/2006: mmatus
10481 - Better support for the %naturalvar directive, now it
10482 works with the scripting languages as well as
10483 Java/C#.
10484
10485 Now, it can also be applied to class types:
10486
10487 %naturalvar std::string;
10488 %include <std_string.i>
10489
10490 that will tell swig to use the 'natural' wrapping
10491 mechanism to all std::string global and member
10492 variables.
10493
10494 - Add support for the %allowexcept feature along the
10495 scripting languages, which allows the %exception feature
10496 to be applied to the variable access methods. Also, add
10497 the %exceptionvar directive to specify a distintic
10498 exception mechanism only for variables.
10499
10500
10501 - Add more docs for the %delobject directive to mark a method as a
10502 destructor, 'disowning' the first argument. For example:
10503
10504 %newobject create_foo;
10505 %delobject destroy_foo;
10506
10507 Foo *create_foo() { return new Foo(); }
10508 void destroy_foo(Foo *foo) { delete foo; }
10509
10510 or in a member method as:
10511
10512 %delobject Foo::destroy;
10513
10514 class Foo {
10515 public:
10516 void destroy() { delete this;}
10517
10518 private:
10519 ~Foo();
10520 };
10521
10522
10523 01/24/2006: mgossage
10524 [Lua]
10525 - Removed the type swig_lua_command_info & replace with luaL_reg
10526 (which then broke the code), fixed this
10527 - added an additional cast in the typemaps for enum's
10528 due to the issue that VC.Net will not allow casting of
10529 a double to an enum directly. Therefore cast to int then to enum
10530 (thanks to Jason Rego for this observation)
10531
10532 01/16/2006: mmatus (Change disabled... will be back in CVS soon)
10533 Add initial support for regexp via the external library
10534 RxSpencer. SWIG doesn't require this library to compile
10535 and/or run. But if you specify --with-rxspencer, and the
10536 library is found during installation, then swig will use
10537 it in three places:
10538
10539 - In %renames rules, via the new rxsmatch rules, for example:
10540
10541 %rename("%(lowercase)",rxsmatch$name="GSL_.*") "";
10542 %rename("%(lowercase)",rxsmatch$nodeType="enum GSL_.*") "";
10543
10544 rxsmatch is similar to the match rule, it just uses
10545 the RxSpencer regexp library to decide if there is a
10546 match with the provided regexp. As with the match
10547 rule, you can also use the negate rule notrxsmatch.
10548
10549 - In the %rename target name via the rxstarget option, for example:
10550
10551 %rename("%(lowercase)",rxstarget=1) "GSL_.*";
10552
10553 where the target name "GSL.*" is now understood as a
10554 regexp to be matched.
10555
10556 - In the new encoder "rxspencer", which looks like:
10557
10558 %(rxspencer:[regexp][replace])s
10559
10560 where "regexp" is the regular expression and "replace"
10561 is a string used as a replacement, where the @0,@1,...,@9
10562 pseudo arguments are used to represent the
10563 corresponding matching items in the reg expression.
10564
10565 For example:
10566
10567 %(rxspencer:[GSL.*][@0])s <- Hello ->
10568 %(rxspencer:[GSL.*][@0])s <- GSLHello -> GSLHello
10569 %(rxspencer:[GSL(.*)][@1])s <- GSLHello -> Hello
10570 %(rxspencer:[GSL(.*)][gsl@1])s <- GSLHello -> gslHello
10571
10572 Another example could be:
10573
10574 %rename("%(lowercase)s",sourcefmt="%(rxspencer:[GSL_(.*)][@1])s",%$isfunction) "";
10575
10576 which take out the prefix "GSL_" and returns all the
10577 function names in lower cases, as following:
10578
10579 void GSL_Hello(); -> hello();
10580 void GSL_Hi(); -> hi();
10581 const int GSL_MAX; -> GSL_MAX; // no change, is not a function
10582
10583 We use the RxSpencer as an initial test bed to
10584 implemention while we decide which library will be
10585 finally added to swig.
10586
10587 You can obtain the RxSpencer library from
10588
10589 http://arglist.com/regex (Unix)
10590
10591 or
10592
10593 http://gnuwin32.sourceforge.net/packages.html (Windows)
10594
10595 Once installed, use "man rxspencer" to get more info
10596 about the regexp format, or just google rxspencer.
10597
10598 Since now you can enable the rxsmatch rules (see above),
10599 the simple or '|' support for the match rules
10600 (01/12/2006: mmatus) is disabled. Still, if you have
10601 problems with the rxspencer library, you can re-enable
10602 the simple 'match or' support using
10603 -DSWIG_USE_SIMPLE_MATCHOR.
10604
10605
10606 01/16/2006: mmatus
10607 Change the %rename predicates to use the prefix '%$', as in:
10608
10609 %rename("%(utitle)s",%$isfunction,%$ismember) "";
10610
10611 to avoid clashes with other swig macros/directives.
10612
10613 01/14/2006: cfisavage
10614 [Ruby]
10615 Added support for Ruby bang! methods via a new %bang feature.
10616 Bang methods end in exclamation points and indicate that the
10617 object being processed will be modified in-place as
10618 opposed to being copied.
10619
10620 01/12/2006: cfisavage
10621 [Ruby]
10622 Updated the Ruby module to automatically convert
10623 method names to lower_case_with_underscores using the
10624 new %rename functionality.
10625
10626 01/12/2006: mmatus
10627 - Add aliases for 'case' encoders used with %rename/%namewarn
10628
10629 %(uppercase)s hello_world -> HELLO_WORLD
10630 %(lowercase)s HelloWorld -> helloworld
10631 %(camelcase)s hello_world -> HelloWorld
10632 %(undercase)s HelloWorld -> hello_world
10633
10634
10635 01/12/2006: mmatus
10636 - Add the -dump_parse_module and -dump_parse_top options,
10637 which are similar to -dump_module and -dump_top, but they
10638 dump the node trees just after parsing, showing only the
10639 attributes visible at the parsing stage, and not the added
10640 later in typemap.cxx, allocate.cxx, lang.cxx or elsewhere.
10641
10642 Besides debugging porpuses, these options are very useful
10643 if you plan to use %rename in an "advance way", since it
10644 shows only and all the node's attributes you can use
10645 inside the match rules.
10646
10647
10648 01/12/2006: mmatus
10649 - Add predicates to %rename, so, you don't need to
10650 remember, for example, how to match a member function.
10651
10652 Now it is easy, for example to use the 'utitle' encoder
10653 in all the member methods, you type:
10654
10655 %rename("%(utitle)s",%isfunction,%ismember) "";
10656
10657 or to ignore all the enumitems in a given class:
10658
10659 %rename("$ignore", %isenumitem, %classname="MyClass") "";
10660
10661 Available predicates are (see swig.swg):
10662
10663 %isenum
10664 %isenumitem
10665 %isaccess
10666 %isclass
10667 %isextend
10668 %isextend
10669 %isconstructor
10670 %isdestructor
10671 %isnamespace
10672 %istemplate
10673 %isconstant
10674
10675 %isunion
10676 %isfunction
10677 %isvariable
10678 %isimmutable
10679
10680 %isstatic
10681 %isfriend
10682 %istypedef
10683 %isvirtual
10684 %isexplicit
10685 %isextern
10686
10687 %ismember
10688 %isglobal
10689 %innamespace
10690
10691 %ispublic
10692 %isprotected
10693 %isprivate
10694
10695 %classname
10696
10697 These predicates correspond to specific 'match'
10698 declarations, which sometimes are not as evident as the
10699 predicates names.
10700
10701
10702 - Add the or '|' operation in %rename match, for
10703 example to capitalize all the constants (%constant or
10704 const cdecl):
10705
10706 %rename("%(upper)s",match="cdecl|constant",%isimmutable) "";
10707
10708
10709
10710 01/12/2006: mgossage
10711 - Partial fixed of errors under C89, bug #1356574
10712 (converted C++ style comments to C style)
10713 - Added patches from neomantra@users.sf.net #1379988 and #1388343
10714 missing a 'return' statement for error conditions
10715 also updated the %init block bug #1356586
10716
10717 01/10/2006: mmatus
10718 - Add the 'utitle' encoder, as an example of how to add
10719 your own encoder. I added the encoder method in misc.c
10720 but developers can add others, the same way, inside any
10721 target language.
10722
10723 Well, 'utitle' is the reverse of 'ctitle', ie:
10724
10725 %rename("%(ctitle)s") camel_case; -> CamelCase;
10726 %rename("%(utitle)s") CamelCase; -> camel_case;
10727
10728
10729 01/10/2006: cfisavage
10730 [Ruby]
10731 Updated Ruby Exception handling. Classes that are specified in throws clauses,
10732 or are marked as %exceptionclass, are now inherited from rb_eRuntimeError.
10733 This allows instances of these classes to be returned to Ruby as exceptions.
10734 Thus if a C++ method throws an instance of MyException, the calling Ruby
10735 method will get back a MyException object. To see an example,
10736 look at ruby/examples/exception_class.
10737
10738 01/10/2006: mmatus
10739
10740 - Add the %catches directive, which complements the %exception
10741 directive in a more automatic way. For example, if you have
10742
10743 int foo() throw(E1);
10744
10745 swig generates the proper try/catch code to dispatch E1.
10746
10747 But if you have:
10748
10749
10750 int barfoo(int i) {
10751 if (i == 1) {
10752 throw E1();
10753 } else {
10754 throw E2();
10755 }
10756 return 0;
10757 }
10758
10759 ie, where there is no explicit exception specification in the decl, you
10760 end up doing:
10761
10762 %exception barfoo {
10763 try {
10764 $action
10765 } catch(E1) { ... }
10766 } catch(E2) { ... }
10767 }
10768
10769 which is very tedious. Well, the %catches directive defines
10770 the list of exceptions to catch, and from swig:
10771
10772 %catches(E1,E2) barfoo(int i);
10773 int barfoo(int i);
10774
10775 is equivalent to
10776
10777 int barfoo(int i) throw(E1,E2);
10778
10779 Note, however, that the %catches list doesn't have to
10780 correspond to the C++ exception specification. For example, if you
10781 have:
10782
10783 struct E {};
10784 struct E1 : E {};
10785 struct E2 : E {};
10786
10787 int barfoo(int i) throw(E1,E2);
10788
10789 you can define
10790
10791 %catches(E) barfoo(int i);
10792
10793 and swig will generate an action code equivalent to
10794
10795 try {
10796 $action
10797 } catch(E &_e) {
10798 <raise _e>;
10799 }
10800
10801 Of course, you still have to satisfy the C++ restrictions,
10802 and the catches list must be compatible (not the same)
10803 as the original list of types in the exception specification.
10804
10805 Also, you can now specify that you want to catch the
10806 unknown exception '...', for example:
10807
10808 %catches(E1,E2,...) barfoo(int);
10809
10810 In any case, the %catches directive will emit the
10811 code to convert into the target language error/exception
10812 using the 'throws' typemap.
10813
10814 For the '...' case to work, you need to
10815 write the proper typemap in your target language. In the
10816 UTL, this looks like:
10817
10818 %typemap(throws) (...) {
10819 SWIG_exception(SWIG_RuntimeError,"unknown exception");
10820 }
10821
10822 01/09/2006: mutandiz
10823 [Allegrocl]
10824
10825 Fixes a number of SEGVs primarily in the handling of
10826 various anonymous types. Found in a pass through the
10827 swig test-suite. Still more to do here, but this is a
10828 good checkpoint.
10829
10830 Adds -cwrap and -nocwrap as an allegrocl specific
10831 command-line argument. Controls generating of a C
10832 wrapper file when wrapping C code. By default only a
10833 lisp file is created for C code wrapping.
10834
10835 Doc updates for the command-line arguments and fixes as
10836 pointed out on swig-devel
10837
10838 01/05/2006: wsfulton
10839 [Java] Fix unsigned long long and const unsigned long long & typemaps
10840 - Bug #1398394 with patch from Dries Decock
10841
10842 01/06/2006: mmatus
10843 Add 'named' warning codes, now in addition to:
10844
10845 %warnfilter(813);
10846
10847 you can use
10848
10849 %warnfilter(SWIGWARN_JAVA_MULTIPLE_INHERITANCE);
10850
10851 just use the same code name found in Source/Include/swigwarn.h
10852 plus the 'SWIG' prefix.
10853
10854 If a developer adds a new warning code, the Lib/swigwarn.swg file
10855 will be generated when running the top level make.
10856
10857 01/05/2006: cfisavage
10858 [Ruby]
10859 Reimplemented object tracking for Ruby. The new implementation works
10860 by expanding the swig_class structure for Ruby by adding a trackObjects
10861 field. This field can be set/unset via %trackobjects as explained
10862 in the Ruby documentation. The new implementation is more robust
10863 and takes less code to implement.
10864
10865 01/05/2006: wsfulton
10866 Fix for %extend and static const integral types, eg:
10867
10868 class Foo {
10869 public:
10870 %extend {
10871 static const int bar = 42;
10872 }
10873 };
10874
10875 12/30/2005: mmatus
10876
10877 - Add info for old and new debug options:
10878
10879 -dump_top - Print information of the entire node tree, including system nodes
10880 -dump_module - Print information of the module node tree, avoiding system nodes
10881 -dump_classes - Print information about the classes found in the interface
10882 -dump_typedef - Print information about the types and typedefs found in the interface
10883 -dump_tags - Print information about the tags found in the interface
10884 -debug_typemap - Print information for debugging typemaps
10885 -debug_template - Print information for debugging templates
10886
10887 - Add the fakeversion. If you have a project that uses
10888 configure/setup.py, or another automatic building system
10889 and requires a specific swig version, let say 1.3.22
10890 you can use:
10891
10892 SWIG_FEATURES="-fakeversion 1.3.22"
10893
10894 or
10895
10896 swig -fakeversion 1.3.22
10897
10898 and then swig -version will report 1.3.22 instead of the
10899 current version.
10900
10901 Typical use would be
10902
10903 SWIG_FEATURES="-fakeversion 1.3.22" ./configure
10904
10905 12/30/2005: mmatus
10906
10907 - Add option/format support to %rename and %namewarn.
10908 Now %namewarn can force renaming, for example:
10909
10910 %namewarn("314: import is a keyword",rename="_%s") "import";
10911
10912 and rename can also support format forms:
10913
10914 %rename("swig_%s") import;
10915
10916 Now, since the format is processed via swig Printf, you
10917 can use encoders as follows:
10918
10919 %rename("%(title)s") import; -> Import
10920 %rename("%(upper)s") import; -> IMPORT
10921 %rename("%(lower)s") Import; -> import
10922 %rename("%(ctitle)s") camel_case; -> CamelCase
10923
10924 This will allow us to add more encoders, as the
10925 expected one for regular expressions.
10926
10927 - Add the above 'ctitle' encoder, which does the camel case:
10928
10929 camel_case -> CamelCase
10930
10931 - Also, while we get the regexp support, add the 'command' encoder,
10932 you can use it as follows
10933
10934 %rename("%(command:sed -e 's/\([a-z]\)/\U\\1/' <<< )s") import;
10935
10936 then swig will popen the command
10937
10938 "sed -e 's/\([a-z]\)/\U\\1/' <<< import"
10939
10940 see below for anonymous renames for better examples.
10941
10942 - The rename directive now also allows:
10943
10944 - simple match: only apply the rename if a type match
10945 happen, for example
10946
10947 %rename(%(title)s,match="enumitem") hello;
10948
10949 enum Hello {
10950 hi, hello -> hi, Hello
10951 };
10952 int hello() -> hello;
10953
10954 - extended match: only apply the rename if the 'extended attribute' match
10955 occurred, for example:
10956
10957 // same as simple match
10958 %rename(%(title)s,match$nodeType="enumitem") hello;
10959
10960 enum Hello {
10961 hi, hello -> hi, Hello
10962 };
10963
10964 Note that the symbol '$' is used to define the attribute name in
10965 a 'recursive' way, for example:
10966
10967 // match only hello in 'enum Hello'
10968 %rename(%(title)s,match$parentNode$type="enum Hello") hello;
10969
10970 enum Hello {
10971 hi, hello -> hi, Hello // match
10972 };
10973
10974 enum Hi {
10975 hi, hello -> hi, hello // no match
10976 };
10977
10978 here, for Hello::hi, the "parentNode" is "Hello", and its "type"
10979 is "enum Hello".
10980
10981
10982 - Anonymous renames: you can use 'anonymous' rename directives, for example:
10983
10984 // rename all the enum items in Hello
10985 %rename(%(title)s,match$parentNode$type="enum Hello") "";
10986
10987 enum Hello {
10988 hi, hello -> Hi, Hello // match both
10989 };
10990
10991 enum Hi {
10992 hi, hello -> hi, hello // no match
10993 };
10994
10995 // rename all the enum items
10996 %rename(%(title)s,match$nodeType="enumitem") "";
10997
10998 // rename all the items in given command (sloooow, but...)
10999 %rename(%(command:<my external cmd>)s) "";
11000
11001
11002 Anonymous renames with commands can be very powerful, since you
11003 can 'outsource' all the renaming mechanism (or part of it) to an
11004 external program:
11005
11006 // Uppercase all (and only) the names that start with 'i'
11007 %rename("%(command:awk '/^i/{print toupper($1)}' <<<)s") "";
11008
11009 int imported() -> IMPORTED;
11010 int hello() -> hello
11011
11012 Note that if the 'command' encoder returns an empty string, swig
11013 understands that no rename is necessary.
11014
11015 Also note that %rename 'passes' the matched name. For example, in
11016 this case
11017
11018 namespace ns1 {
11019 int foo();
11020 }
11021
11022 namespace ns2 {
11023 int bar();
11024 }
11025
11026 the external program only receives "foo" and "bar". If needed,
11027 however, you can request the 'fullname'
11028
11029 %rename("%(command:awk 'awk '/ns1::/{l=split($1,a,"::"); print toupper(a[l])}'' <<<)s",fullname=1) "";
11030
11031 ns1::foo -> FOO
11032 ns2::bar -> bar
11033
11034 - Mixing encoders and matching: of course, you can do mix commands
11035 and match fields, for example:
11036
11037 %rename("%(<my encoder for fncs>)",match="cdecl") "";
11038 %rename("%(<my encoder for enums>)",match="enumitem") "";
11039 %rename("%(<my encoder for enums inside a class>)",match="enumitem",
11040 match$parentNode$parentNode$nodeType="class") "";
11041
11042 Use "swig -dump_parse_module" to see the attribute names you can use to
11043 match a specific case.
11044
11045 - 'sourcefmt' and 'targetfmt': sometimes you need to
11046 process the 'source' name before comparing, for example
11047
11048 %namewarn("314: empty is a keyword",sourcefmt="%(lower)s") "empty";
11049
11050 then if you have
11051
11052 int Empty(); // "Empty" is the source
11053
11054 you will get the keyword warning since 'Empty' will be
11055 lower cased, via the sourcefmt="%(lower)s" option,
11056 before been compared to the 'target' "empty".
11057
11058 There is an additional 'targetfmt' option to process the
11059 'target' before comparing.
11060
11061 - complementing 'match': you can use 'notmatch', for example
11062
11063 %namewarn("314: empty is a keyword",sourcefmt="%(lower)s",notmatch="namespace") "empty";
11064
11065 here, the name warning will be applied to all the symbols except namespaces.
11066
11067
11068 12/30/2005: mmatus
11069
11070 - Add initial support for gcj and Java -> <target language> mechanism.
11071
11072 See examples in:
11073
11074 Examples/python/java
11075 Examples/ruby/java
11076 Examples/tcl/java
11077
11078 to see how to use gcj+swig to export java classes into
11079 python/ruby/tcl.
11080
11081 The idea is to put all the common code for gcj inside
11082
11083 Lib/gcj
11084
11085 and localize specific types such as jstring, as can be found
11086 in
11087
11088 Lib/python/jstring.i
11089 Lib/ruby/jstring.i
11090 Lib/tcl/jstring.i
11091
11092 Using the UTL, this is very easy, and the perl version for
11093 jstring.i will be next.
11094
11095
11096 12/29/2005: mmatus
11097 - Add the copyctor feature/directive/option to enable the automatic
11098 generation of copy constructors. Use as in:
11099
11100 %copyctor A;
11101
11102 struct A {
11103
11104 };
11105
11106 then this will work
11107
11108 a1 = A();
11109 a2 = A(a1);
11110
11111 Also, since it is a feature, if you just type
11112
11113 %copyctor;
11114
11115 that will enable the automatic generation for all the
11116 classes. It is also equivalent to
11117
11118 swig -copyctor -c++ ...
11119
11120 Notes:
11121
11122 1.- The feature only works in C++ mode.
11123
11124 2.- The automatic creation of the copy constructor will
11125 usually produce overloading. Hence, if the target
11126 language doesn't support overloading, a special name
11127 will be used (A_copy).
11128
11129 3.- For the overloading reasons above, it is probably not
11130 a good idea to use the flag when, for example, you are
11131 using keywords in Python.
11132
11133 4.- The copyctor automatic mechanism follows more or less
11134 the same rules as the default constructor mechanism,
11135 i.e., a copy constructor will not be added if the
11136 class is abstract or if there is a pertinent non-public
11137 copy ctor in the class or its hierarchy.
11138
11139 Hence, it might be necessary for you to complete the
11140 class declaration with the proper non-public copy ctor
11141 to avoid a wrong constructor addition.
11142
11143 - Fix features/rename for templates ctor/dtor and other
11144 things around while adding the copyctor mechanism.
11145
11146
11147 12/27/2005: mmatus
11148 - Add the 'match' option to typemaps. Assume you have:
11149
11150 %typemap(in) SWIGTYPE * (int res) {..}
11151 %typemap(freearg) SWIGTYPE * { if (res$argnum) ...}
11152
11153 then if you do
11154
11155 %typemap(in) A * {...}
11156
11157 swig will 'overload the 'in' typemap, but the 'freearg'
11158 typemap will be also applied, even when this is wrong. The old
11159 solutions is to write:
11160
11161 %typemap(in) A * {...}
11162 %typemap(freeag) A * ""
11163
11164 overload 'freearg' with an empty definition.
11165
11166 The problem is, however, there is no way to know you need
11167 to do that until you start getting broken C++ code, or
11168 worse, broken runtime code.
11169
11170 The same applies to the infamous 'typecheck' typemap,
11171 which always confuses people, since the first thing you do
11172 is to just write the 'in' typemap.
11173
11174 The 'match' option solves the problem, and if instead you write:
11175
11176 %typemap(in) SWIGTYPE * (int res) {..}
11177 %typemap(freearg,match="in") SWIGTYPE * { if (res$argnum) ...}
11178 %typemap(typecheck,match="in",precedence...) SWIGTYPE * {...}
11179
11180 it will tell swig to apply the 'freearg/typecheck'
11181 typemaps only if they 'match' the type of the 'in'
11182 typemap. The same can be done with other typemaps as:
11183
11184 %typemap(directorout) SWIGTYPE * {...}
11185 %typemap(directorfree,match="directorout") SWIGTYPE * {...}
11186
11187
11188 12/27/2005: mmatus
11189 - Add the 'naturalvar' option/mode/feature to treat member
11190 variables in a more natural way, ie, similar to the global
11191 variable behavior.
11192
11193 You can use it in a global way via the command line
11194
11195 swig -naturalvar ...
11196
11197 or the module mode option
11198
11199 %module(naturalvar=1)
11200
11201 both forms make swig treat all the member variables in the
11202 same way it treats global variables.
11203
11204 Also, you can use it in a case by case approach for
11205 specific member variables using the directive form:
11206
11207 %naturalvar Bar::s;
11208
11209 Then, in the following case for example:
11210
11211 std::string s;
11212 struct Bar {
11213 std::string s;
11214 };
11215
11216 you can do:
11217
11218 b = Bar()
11219 b.s ="hello"
11220 cvar.s = "hello"
11221
11222 if (b.s != cvar.s):
11223 raise RuntimeError
11224
11225
11226 This is valid for all the languages, and the
11227 implementation is based on forcing the use of the
11228 const SWIGTYPE& (C++)/SWIGTYPE (C) typemaps for the
11229 get/set methods instead of the SWIGTYPE * typemaps.
11230 Hence, for 'naturalvar' to work, each target language
11231 must implement 'typemap(in/out) const Type&' properly.
11232
11233 The 'naturalvar' option replaces or makes workarounds such as:
11234
11235 %apply const std::string & { std::string *}
11236
11237 unnecessary.
11238
11239 Note1: If your interface has other kinds of workarounds to
11240 deal with the old 'unnatural' way to deal with member
11241 variables (returning/expecting pointers), the
11242 'naturalvar' option could break them.
11243
11244 Note2: the option has no effect on unnamed types, such
11245 as unnamed nested unions.
11246
11247
11248 12/27/2005: mmatus
11249 - Add more 'expressive' result states for the typemap
11250 libraries.
11251
11252 In the past, for scripting languages, you would do checking something like:
11253
11254 if (ConvertPtr(obj,&vptr,ty,flags) != -1) {
11255 // success
11256 } else {
11257 // error
11258 }
11259
11260 Now the result state can carry more information,
11261 including:
11262
11263 - Error state: like the old -1/0, but with error codes from swigerrors.swg.
11264
11265 int res = ConvertPtr(obj,&vptr,ty,flags);
11266 if (SWIG_IsOK(res)) {
11267 // success code
11268 } else {
11269 SWIG_Error(res); // res carries the error code
11270 }
11271
11272 - Cast rank: when returning a simple successful
11273 conversion, you just return SWIG_OK, but if you need
11274 to do a 'cast', you can add the casting rank, ie:
11275
11276 if (PyFloat_Check(obj)) {
11277 value = PyFloat_AsDouble(obj);
11278 return SWIG_OK;
11279 } else if (PyInt_Check(obj)) {
11280 value = (double) PyInt_AsLong(obj);
11281 return SWIG_AddCast(SWIG_OK);
11282 }
11283
11284 later, the casting rank is used to properly dispatch
11285 the overloaded function, for example. This of course
11286 requires your language to support and use the new
11287 dispatch cast/rank mechanism (Now mainly supported in
11288 perl and python, and easily expandable to ruby and tcl).
11289
11290 - [UTL] Add support for the new 'expressive' result states.
11291
11292 12/27/2005: mmatus
11293 - Add support for the C++ implicit conversion mechanism, which
11294 required some modifications in parser.y (to recognize
11295 'explicit') and overload.cxx (to replace $implicitconv as
11296 needed).
11297
11298 Still, real support in each target language requires each
11299 target language to be modified. Python provides an example,
11300 see below.
11301
11302
11303 - Add support for native C++ implicit conversions, ie, if you
11304 have
11305
11306 %implicitconv A;
11307
11308 struct A {
11309 int ii;
11310 A() {ii = 1;}
11311 A(int) {ii = 2;}
11312 A(double) {ii = 3;}
11313 explicit A(char *s) {ii = 4;}
11314 };
11315
11316 int get(const A& a) {return a.ii;}
11317
11318 you can call:
11319
11320 a = A()
11321 ai = A(1)
11322 ad = A(1.0)
11323 as = A("hello")
11324
11325 # old forms
11326 get(a) -> 1
11327 get(ai) -> 2
11328 get(ad) -> 3
11329 get(as) -> 4
11330
11331 #implicit conversions
11332 get(1) -> 2
11333 get(1.0) -> 3
11334 get("hello") -> Error, explicit constructor
11335
11336 Also, as in C++, now implicit conversions are supported in
11337 variable assigments, and if you have:
11338
11339 A ga;
11340 struct Bar {
11341 A a;
11342 };
11343
11344 you can do:
11345
11346 cvar.ga = A(1)
11347 cvar.ga = 1
11348 cvar.ga = 1.0
11349 cvar.ga = A("hello")
11350 cvar.ga = "hello" -> error, explicit constructor
11351
11352 b = Bar()
11353 b.a = A("hello")
11354 b.a = 1
11355 b.a = 1.0
11356 b.a = "hello" -> error, explicit constructor
11357
11358 Note that the last case, assigning a member var directly,
11359 also requires the 'naturalvar' option.
11360
11361 This support now makes the old '%implicit' macro, which
11362 was found in 'implicit.i' and it was fragile in many ways,
11363 obsolete, and you should use the new '%implicitconv'
11364 directive instead.
11365
11366 Note that we follow the C++ conventions, ie, in the
11367 following the implicit conversion is allowed:
11368
11369 int get(A a) {return a.ii;}
11370 int get(const A& a) {return a.ii;}
11371
11372 but not in these cases:
11373
11374 int get(A *a) {return a->ii;}
11375 int get(A& a) {return a.ii;}
11376
11377 Also, it works for director methods that return a by value
11378 result, ie, the following will work:
11379
11380 virtual A get_a() = 0;
11381
11382 def get_a(self):
11383 return 1
11384
11385 but not in this case:
11386
11387 virtual const A& get_a() = 0;
11388 virtual A& get_a() = 0;
11389 virtual A* get_a() = 0;
11390
11391 Notes:
11392
11393 - the implicitconv mechanism is implemented by directly
11394 calling/dispatching the python constructor, triggering a
11395 call to the __init__method. Hence, if you expanded the
11396 __init__ method, like in:
11397
11398 class A:
11399 def __init__(self,args):
11400 <swig code>
11401 <my code here>
11402
11403 then 'my code' will also be executed.
11404
11405 - Since the %implicitconv directive is a SWIG feature, if you type:
11406
11407 %implicitconv;
11408
11409 that will enable implicit conversion for all the classes in
11410 your module.
11411
11412 But if you are worried about performance, maybe that will be
11413 too much, especially if you have overloaded methods, since
11414 to resolve the dispatching problem, python will efectively
11415 try to call all the implicit constructors as needed.
11416
11417 - For the same reason, it is highly recommended that you use
11418 the new 'castmode' when mixing implicit conversion and
11419 overloading.
11420
11421 - [python] The %implicit directive is declared obsolete, and
11422 you should use %implicitconv instead. If you include
11423 the implicit.i file, a warning will remind you of this.
11424
11425 Note: Since %implicit is fragile, just replacing it by
11426 %implicitconv could lead to different behavior. Hence, we
11427 don't automatically switch from to the other, and the user
11428 must migrate to the new %implicitconv directive manually.
11429
11430
11431 12/26/2005: wsfulton
11432 [C#]
11433 Modify std::vector wrappers to use std::vector::value_type as this is
11434 closer to the real STL declarations for some methods, eg for push_back().
11435 Fixes some compilation errors for some compilers eg when the templated
11436 type is a pointer.
11437
11438 [Java]
11439 std::vector improvements - a few more methods are wrapped and specializations are
11440 no longer required. The specialize_std_vector macro is no longer needed (a
11441 warning is issued if an attempt is made to use it).
11442
11443 12/26/2005: wsfulton
11444 [Java, C#]
11445 Add in pointer reference typemaps. This also enables one to easily wrap
11446 std::vector<T> where T is a pointer.
11447
11448 12/24/2005: efuzzyone
11449 [CFFI] The cffi module for SWIG:
11450 - Fully supports C, but provides limited supports for C++, in
11451 particular C++ support for templates and overloading needs to
11452 be worked upon.
11453
11454 12/23/2005: mmatus
11455 [python] Add the castmode that allows the python
11456 type casting to occur.
11457
11458 For example, if you have 'int foo(int)', now
11459
11460 class Ai():
11461 def __init__(self,x):
11462 self.x = x
11463 def __int__(self):
11464 return self.x
11465
11466 foo(1) // Ok
11467 foo(1.0) // Ok
11468 foo(1.3) // Error
11469 a = Ai(4)
11470 foo(ai) // Ok
11471
11472 The castmode, which can be enabled either with the
11473 '-castmode' option or the %module("castmode") option, uses
11474 the new cast/rank dispatch mechanism. Hence, now if you
11475 have 'int foo(int); int foo(double);', the following works
11476 as expected:
11477
11478 foo(1) -> foo(int)
11479 foo(1.0) -> foo(double)
11480 ai = Ai(4)
11481 foo(ai) -> foo(int)
11482
11483 Note1: the 'castmode' could disrupt some specialized
11484 typemaps. In particular, the "implicit.i" library seems to
11485 have problem with the castmode. But besides that one, the
11486 entire test-suite compiles fine with and without the
11487 castmode.
11488
11489 Note2: the cast mode can't be combined with the fast
11490 dispatch mode, ie, the -fastdispatch option has no effect
11491 when the cast mode is selected. The penalties, however,
11492 are minimum since the cast dispatch code is already based
11493 on the same fast dispatch mechanism.
11494
11495 See the file overload_dispatch_cast_runme.py file for
11496 new cases and examples.
11497
11498 12/22/2005: mmatus
11499 Add the cast and rank mechanism to dispatch overloading
11500 functions. The UTF supports it now, but for each language
11501 it must be decided how to implement and/or when to use it.
11502
11503 [perl] Now perl uses the new cast and rank dispatch
11504 mechanism, which solves all the past problems known
11505 in perl, such as the old '+ 1' problem:
11506
11507 int foo(int);
11508
11509 $n = 1
11510 $n = $n + 1
11511 $r = foo(n)
11512
11513 also works:
11514
11515 foo(1);
11516 foo("1");
11517 foo(1.0);
11518 foo("1.0");
11519
11520 but fails
11521
11522 foo("l");
11523
11524 and when overloading foo(int) and foo(double);
11525
11526 foo(1) -> foo(int)
11527 foo(1.0) -> foo(double)
11528 foo("1") -> foo(int)
11529 foo("1.0") -> foo(double)
11530 foo("l") -> error
11531 foo($n) -> foo(int) for good perl versions
11532 foo($n) -> foo(double) for old bad perl versions
11533
11534 when overloading foo(int), foo(char*) and foo(double):
11535
11536 foo(1) -> foo(int)
11537 foo(1.0) -> foo(double)
11538 foo("1") -> foo(char*)
11539 foo("1.0") -> foo(char*)
11540 foo("l") -> foo(char*)
11541
11542 Note: In perl the old dispatch mechanism was broken,
11543 so, we don't provide an option to enable the old one
11544 since, again, it was really really broken.
11545
11546 See 'overload_simple_runme.pl' for more cases and tests.
11547
11548 PS: all the old known issues are declared resolved, any
11549 new "problem" that could be discovered is declared,
11550 a priori, as "features" of the new dispatch mechanism
11551 (until we find another solution at least).
11552
11553
11554 *** POTENTIAL INCOMPATIBILITY ***
11555
11556 As with the introduction of the UTF, some things could
11557 now start to work as expected, and people used to deal or
11558 workaround previous bugs related to the dispatch
11559 mechanism, could see now a difference in perl behavior.
11560
11561 12/21/2005: mmatus
11562 - The '-nodefault' flag (pragma and feature) now generates
11563 a warning, and recommends to use the explicit
11564 -nodefaultctor and -nodefaultdtor options.
11565
11566 The reason to split the 'nodefault' behavior is that, in
11567 general, ignoring the default destructor generates memory
11568 leaks in the target language. Hence, is too risky just to
11569 disable both the default constructor and destructor
11570 at the same time.
11571
11572 If you need to disable the default destructor, it is
11573 also recommended you use the directive form:
11574
11575 %nodefaultdtor MyVerySpecialClass;
11576
11577 for specific classes, and always avoid using the global
11578 -nodefault and -nodefaultdtor options.
11579
11580 12/21/2005: wsfulton
11581 [Java, C#]
11582 Fix incorrect code generation when the intermediary classname is changed
11583 in the module directive from its default. For example:
11584
11585 %module(jniclassname="myimclassnewname") "mymodule" // Java
11586 %module(imclassname="myimclassnewname") "mymodule" // C#
11587
11588 Add in new special variable $imclassname. See docs.
11589
11590 12/17/2005: mmatus
11591 [Python]
11592 - Add the -aliasobj0/-noaliasobj0 options to use with
11593 -fastunpack and/or -O and old typemaps that use 'obj0'
11594 directly.
11595
11596 So, if you compile your code using -O and get errors about
11597 the undeclared 'obj0' variable, run again using
11598
11599 swig -O -aliasobj0 -python ....
11600
11601 For new typemaps, never use 'obj0' directly, if needed,
11602 use the '$self' name that will be properly expanded to
11603 'obj0' (nofastunpack) or 'swig_obj[0]' (fastunpack).
11604
11605 If you have no idea what I am talking about, better, that
11606 means you have no typemap with this problem.
11607
11608
11609 12/14/2005: mmatus
11610 [Python]
11611 - Add the -fastunpack/-nofastunpack options to enable/disable
11612 the use of the internal UnpackTuple method, instead of
11613 calling the one from the python C API.
11614
11615 The option -O now also implies -fastunpack.
11616
11617
11618 12/11/2005: mmatus
11619 [Python]
11620 - Add the -proxydel/-noproxydel options to enable/disable
11621 the generation of proxy/shadow __del__ methods, even
11622 when now they are redundant, since they are empty.
11623 However, old interfaces could rely on calling them.
11624
11625 The default behavior is to generate the __del__ methods
11626 as in 1.3.27 or older swig versions.
11627
11628 The option -O now also implies -noproxydel.
11629
11630 12/10/2005: mmatus
11631 [UTF]
11632 - Fix unnecessary calls to SWIG_TypeQuery for 'char *'
11633 and 'wchar_t *', problem found by Clay Culver while
11634 profiling the PyOgre project.
11635
11636
11637 [Python]
11638 - Add the -dirvtable/-nodirvtable to enable/disable
11639 a pseudo virtual table used for directors, avoiding
11640 the need to resolve the python method at each call.
11641
11642 - Add the -safecstrings/-nosafecstrings options to
11643 enable/disable the use of safe conversions from PyString
11644 to char *. Python requires you to never change the internal
11645 buffer directly, and hence 'safectrings' warranties that
11646 but returning a copy of the internal python string buffer.
11647
11648 The default, as in previous releases, is to return a
11649 pointer to the buffer (nosafecstrings), so, it is the user's
11650 responsibility to avoid its modification.
11651
11652 - Add the -O option to enable all the optimization options
11653 at once, initially equivalent to
11654
11655 -modern -fastdispatch -dirvtable -nosafecstrings -fvirtual
11656
11657 12/08/2005: mmatus
11658
11659 - Add the -fastdispatch option (fastdispatch feature). This
11660 enables the "fast dispatch" mechanism for overloaded
11661 methods provided by Salvador Fandi~no Garc'ia (#930586).
11662
11663 The resulting code is smaller and faster since less type
11664 checking is performed. However, the error messages you
11665 get when the overloading is not resolved could be
11666 different from what the traditional method returns.
11667
11668 With the old method you always get an error such as
11669
11670 "No matching function for overloaded ..."
11671
11672 with the new method you can also get errors such as
11673
11674 "Type error in argument 1 of type ..."
11675
11676 See bug report #930586 for more details.
11677
11678 So, this optimization must be explicitly enabled by users.
11679
11680 The new mechanism can be used as:
11681
11682 swig -fastdispatch
11683
11684 or using the feature form
11685
11686 %feature("fastdispatch") method;
11687 or
11688 %fastdispatch method;
11689
11690
11691 12/06/2005: mmatus
11692
11693 - Several memory and speed improvements, specially for
11694 templates. Now swig is up to 20 faster than before for
11695 large template interfaces, such as the std_containers.i
11696 and template_matrix.i files in the python test-suite.
11697
11698 Memory footprint is also reduced in consideration of small
11699 pcs/architectures.
11700
11701 - add commandline options -cpperraswarn and -nocpperraswarn" to force
11702 the swig preprocessor to treat the #error directive as a #warning.
11703
11704 the pragmas
11705
11706 #pragma SWIG cpperraswarn=1
11707 #pragma SWIG cpperraswarn=0
11708
11709 are equivalent to the command line options, respectively.
11710
11711
11712 12/06/2005: mmatus
11713 [Python] The generated code is now more portable, especially
11714 for Windows. Following
11715
11716 http://www.python.org/doc/faq/windows.html
11717
11718 Py_None is never accessed as a structure, plus other
11719 tricks mentioned there.
11720
11721 12/06/2005: mmatus
11722 [Python] Added initial support for threads based in the
11723 proposal by Joseph Winston.
11724
11725 The user interface is as follows:
11726
11727 1.- the module thread support is enable via the "threads" module
11728 option, i.e.
11729
11730 %module("threads"=1)
11731
11732 2.- Equivalent to that, is the new '-threads' swig option
11733
11734 swig -threads -python ...
11735
11736 3.- You can partially disable thread support for a given
11737 method using:
11738
11739 %feature("nothread") method;
11740 or
11741 %nothread method;
11742
11743 also, you can disable sections of the thread support,
11744 for example
11745
11746 %feature("nothreadblock") method;
11747 or
11748 %nothreadblock method;
11749
11750 %feature("nothreadallow") method;
11751 or
11752 %nothreadallow method;
11753
11754 the first disables the C++/python thread protection, and the
11755 second disables the python/C++ thread protection.
11756
11757 4.- The current thread support is based in the PyGIL
11758 extension present in python version 2.3 or later, but
11759 you can provide the thread code for older versions by
11760 defining the macros in pythreads.swg.
11761
11762 If you get a working implementation for older versions,
11763 please send us a patch.
11764
11765 For the curious about performance, here are some numbers
11766 for the profiletest.i test, which is used to check the speed
11767 of the wrapped code:
11768
11769 nothread 9.6s (no thread code)
11770 nothreadblock 12.2s (only 'allow' code)
11771 nothreadallow 13.6s (only 'block' code)
11772 full thread 15.5s ('allow' + 'block' code)
11773
11774 i.e., full thread code decreases the wrapping performance by
11775 around 60%. If that is important to your application, you
11776 can tune each method using the different 'nothread',
11777 'nothreadblock' or 'nothreadallow' features as
11778 needed. Note that for some methods deactivating the
11779 'thread block' or 'thread allow' code is not an option,
11780 so, be careful.
11781
11782
11783 11/26/2005: wsfulton
11784 SWIG library files use system angle brackets everywhere for %include, eg
11785 %include "std_common.i"
11786 becomes
11787 %include <std_common.i>
11788
11789 11/26/2005: wsfulton
11790 [Java, C#]
11791 Typesafe enums and proper enums have an extra constructor so that enum item values that
11792 are initialised by another enum item value can be wrapped without having to use %javaconstvalue/
11793 %csconstvalue for when using %javaconst(1)/%csconst(1). Suggestion by
11794 Bob Marinier/Douglas Pearson.
11795 For example:
11796
11797 typedef enum
11798 {
11799 xyz,
11800 last = xyz
11801 } repeat;
11802
11803 11/21/2005: mmatus
11804 [ruby + python]
11805
11806 Fixes for directors + pointers. This is an ugly problem without an easy
11807 solution. Before we identified this case as problematic:
11808
11809 virtual const MyClass& my_method();
11810
11811 but it turns out that all the cases where a pointer, array or
11812 reference is returned, are problematic, even for
11813 primitive types (as int, double, char*, etc).
11814
11815 To try to fix the issue, a new typemap was added,
11816 'directorfree', which is used to 'free' the resources
11817 allocated during the 'directorout' phase. At the same
11818 time, a primitive garbage collector engine was added to
11819 deal with orphaned addresses, when needed.
11820
11821 The situation is much better now, but still it is possible to have
11822 memory exhaustation if recursion is used.
11823
11824 So, still you need to avoid returning pointers, arrays or
11825 references when using director methods.
11826
11827 - Added stdint.i - typemaps for latest C99 integral types found in stdint.h.
11828
11829 11/14/2005: wsfulton
11830 More types added to windows.i, eg UINT8, WORD, BYTE etc.
11831 Including windows.i will also enable SWIG to parse the __declspec Microsoft
11832 extension, eg __declspec(dllimport). Also other Windows calling conventions
11833 such as __stdcall.
11834
11835 11/10/2005: wsfulton
11836 New library file for Windows - windows.i. This file will contain useful type
11837 information for users who include windows.h. Initial support is for the
11838 non ISO integral types: __int8, __int16, __int32, __int64 and unsigned versions.
11839 The unsigned versions previously could not be parsed by SWIG. SF #872013.
11840
11841 11/09/2005: wsfulton
11842 [Java, C#] Portability warning for files which will overwrite each other on case
11843 insensitive file systems such as FAT32/NTFS. This will occur, for example, when two
11844 class names are the same barring case. The warning is issued on all platforms and
11845 can be suppressed with the usual warning suppression techniques. SF bug #1084507.
11846
11847 11/09/2005: wsfulton
11848 ./configure --with-python --with-ruby --with-perl5 etc enable these languages,
11849 ie the --with-xxxx options, where no path is specified, work the same as if
11850 the option was not specified at all. Based on patches #1335042 #1329048 #1329047.
11851
11852 11/09/2005: dancy
11853
11854 [Allegrocl]
11855 Add C++ support to the Allegrocl module. Further
11856 enhances the C support as well. Some of the
11857 features:
11858
11859 - MUCH better generation of foreign types based on
11860 the C/C++ types for use in defining the FFI on
11861 the lisp side. We don't pass everything as a (* :void)
11862 any longer.
11863
11864 - Uses typemaps for better control of type conversions
11865 and code generation in the generated lisp and c++ wrapper
11866 code.
11867
11868 - CLOS wrapping of pointers returned from foreign space
11869 makes it easier to differentiate pointers in user code.
11870 The wrapping objects can be passed directly to FF calls.
11871
11872 - Defun wrapping of FF calls, allowing for more lispy
11873 interface. Conversion, GCing, of lisp objects to
11874 foreign objects can be done in the wrapping defun via
11875 the use of typemaps.
11876
11877 - overload dispatching implemented on the lisp side
11878 using generic functions.
11879
11880 - Templates and synonymous types supported.
11881
11882 11/07/2005: mmatus
11883
11884 [Python] Adding proper support fo