/tags/rel-2.0.2/CHANGES
#! | 1547 lines | 1191 code | 356 blank | 0 comment | 0 complexity | 7ef4582ade7cd9ea6895c4b53c9c51b6 MD5 | raw file
Large files files are truncated, but you can click here to view the full file
1SWIG (Simplified Wrapper and Interface Generator) 2 3See the CHANGES.current file for changes in the current version. 4See the RELEASENOTES file for a summary of changes in each release. 5 6Version 2.0.1 (4 October 2010) 7============================== 8 92010-10-03: wsfulton 10 Apply patch #3066958 from Mikael Johansson to fix default smart pointer 11 handling when the smart pointer contains both a const and non-const operator->. 12 132010-10-01: wsfulton 14 Add -pcreversion option to display PCRE version information. 15 162010-10-01: olly 17 [Ruby] Avoid segfault when a method node has no parentNode 18 (SF#3034054). 19 202010-10-01: olly 21 [Python] Allow reinitialisation to work with an embedded Python 22 interpreter (patch from Jim Carroll in SF#3075178). 23 242010-09-28: wsfulton 25 [C#] Apply patch from Tomas Dirvanauskas for std::map wrappers to avoid 26 throwing exceptions with normal usage of iterators. 27 282010-09-27: olly 29 [Python] Improve error message given when a parameter of the wrong 30 type is passed to an overloaded method (SF#3027355). 31 322010-09-25: wsfulton 33 Apply SF patch #3075150 - Java directors using static variables in 34 named namespace. 35 362010-09-24: wsfulton 37 More file and line error/warning reporting fixes where SWIG macros 38 are used within {} braces (where the preprocessor expands macros), 39 for example macros within %inline {...} and %fragment(...) {...} 40 and nested structs. 41 422010-09-18: wsfulton 43 More file and line error/warning reporting fixes for various inherited 44 class problems. 45 462010-09-15: wsfulton 47 A much improved debugging of SWIG source experience is now available and 48 documented in the "Debugging SWIG" section in the Doc/Devel/internals.html 49 file, including a swig.dbg support file for the gdb debugger. 50 512010-09-11: wsfulton 52 Fix incorrect line number reporting in errors/warnings when a macro 53 definition ends with '/' and it is not the end of a C comment. 54 552010-09-11: wsfulton 56 Fix incorrect line number reporting in errors/warnings after parsing 57 macro invocations with parameters given over more than one line. 58 592010-09-10: wsfulton 60 Remove extraneous extra line in preprocessed output after including files 61 which would sometimes lead to error/warning messages two lines after the 62 end of the file. 63 642010-09-10: wsfulton 65 Fix #2149523 - Incorrect line number reporting in errors after parsing macros 66 containing C++ comments. 67 682010-09-08: olly 69 [PHP] Fix handling of OUTPUT typemaps (Patch from Ryan in SF#3058394). 70 712010-09-03: wsfulton 72 Fix erroneous line numbers in error messages for macro expansions, for example, 73 the error message now points to instantiation of the macro, ie the last line here: 74 75 #define MACRO2(a, b) 76 77 #define MACRO1(NAME) MACRO2(NAME,2,3) 78 79 MACRO1(abc) 80 812010-09-02: wsfulton 82 Fix line numbers in error and warning messages for preprocessor messages within 83 %inline, for example: 84 85 %inline %{ 86 #define FOOBAR 1 87 #define FOOBAR "hi" 88 %} 89 902010-09-02: wsfulton 91 Fix line numbers in error and warning messages which were cumulatively one 92 less than they should have been after parsing each %include/%import - bug 93 introduced in swig-1.3.32. Also fix line numbers in error and warning messages 94 when new line characters appear between the %include / %import statement and 95 the filename. 96 972010-08-30: wsfulton 98 Fix line number and file name reporting for some macro preprocessor warnings. 99 The line number of the macro argument has been corrected and the line number 100 of the start of the macro instead of one past the end of the macro is used. 101 Some examples: 102 file.h:11: Error: Illegal macro argument name '..' 103 file.h:19: Error: Macro 'DUPLICATE' redefined, 104 file.h:15: Error: previous definition of 'DUPLICATE'. 105 file.h:25: Error: Variable-length macro argument must be last parameter 106 file.h:32: Error: Illegal character in macro argument name 107 file.i:37: Error: Macro 'SIT' expects 2 arguments 108 1092010-08-26: wsfulton 110 Fix __LINE__ and __FILE__ expansion reported by Camille Gillot. Mostly this 111 did not work at all. Also fixes SF #2822822. 112 1132010-08-17: wsfulton 114 [Perl] Fix corner case marshalling of doubles - errno was not being correctly 115 set before calling strtod - patch from Justin Vallon - SF Bug #3038936. 116 1172010-08-17: wsfulton 118 Fix make distclean when some of the more obscure languages are detected by 119 configure - fixes from Torsten Landschoff. 120 1212010-07-28: wsfulton 122 Restore configuring out of source for the test-suite since it broke in 1.3.37. 123 As previously, if running 'make check-test-suite' out of source, it needs to be 124 done by invoking configure with a relative path. Invoking configure with an 125 absolute path will not work. Running the full 'make check' still needs to be 126 done in the source tree. 127 1282010-07-16: wsfulton 129 Fix wrapping of function pointers and member function pointers when the function 130 returns by reference. 131 1322010-07-13: vadz 133 Removed support for the old experimental "rxspencer" encoder and 134 "[not]rxsmatch" in %rename (see the 01/16/2006 entry). The new and 135 officially supported "regex" encoder and "[not]regexmatch" checks 136 should be used instead (see the two previous entries). Please 137 replace "%(rxspencer:[pat][subst])s" with "%(regex:/pat/subst/)s" 138 when upgrading. Notice that you will also need to replace the back- 139 references of form "@1" with the more standard "\\1" and may need to 140 adjust your regular expressions syntax as the new regex encoder uses 141 Perl-compatible syntax and not (extended) POSIX syntax as the old one. 142 143 *** POTENTIAL INCOMPATIBILITY *** 144 1452010-07-13: vadz 146 Add "regexmatch", "regextarget" and "notregexmatch" which can be 147 used to apply %rename directives to the declarations matching the 148 specified regular expression only. The first two can be used 149 interchangeably, both of the %renames below do the same thing: 150 151 %rename("$ignore", regexmatch$name="Old$") ""; 152 %rename("$ignore", regextarget=1) "Old$"; 153 154 (namely ignore the declarations having "Old" suffix). 155 156 "notregexmatch" restricts the match to only the declarations which 157 do not match the regular expression, e.g. here is how to rename to 158 lower case versions all declarations except those consisting from 159 capital letters only: 160 161 %rename("$(lowercase)s", notregexmatch$name="^[A-Z]+$") ""; 162 1632010-07-13: vadz 164 Add the new "regex" encoder that can be used in %rename, e.g. 165 166 %rename("regex:/(\\w+)_(.*)/\\2/") ""; 167 168 to remove any alphabetical prefix from all identifiers. The syntax 169 of the regular expressions is Perl-like and PCRE library 170 (http://www.pcre.org/) is used to implement this feature but notice 171 that backslashes need to be escaped as usual inside C strings. 172 173 Original patch from Torsten Landschoff. 174 1752010-07-08: wsfulton 176 Fix #3024875 - shared_ptr of classes with non-public destructors. This also fixes 177 the "unref" feature when used on classes with non-public destructors. 178 1792010-06-17: ianlancetaylor 180 [Go] Add the Go language module. 181 1822010-06-10: wsfulton 183 [Lua] Fix SWIG_lua_isnilstring multiply defined when using multiple 184 modules and wrapping strings. Patch from 'Number Cruncher'. 185 1862010-06-10: olly 187 [PHP] Fix directors to correctly call a method with has a 188 different name in PHP to C++ (we were always using the C++ name 189 in this case). 190 1912010-06-03: wsfulton 192 Fix uncompileable code when %rename results in two enum items 193 with the same name. Reported by Vadim Zeitlin. 194 195Version 2.0.0 (2 June 2010) 196=========================== 197 1982010-06-02: wsfulton 199 [C#] Fix SWIG_STD_VECTOR_ENHANCED macro used in std::vector to work with 200 types containing commas, for example: 201 202 SWIG_STD_VECTOR_ENHANCED(std::pair< double, std::string >) 203 2042010-06-01: wsfulton 205 Add in std_shared_ptr.i for wrapping std::shared_ptr. Requires the %shared_ptr 206 macro like in the boost_shared_ptr.i library. std::tr1::shared_ptr can also be 207 wrapped if the following macro is defined: 208 209 #define SWIG_SHARED_PTR_SUBNAMESPACE tr1 210 %include <std_shared_ptr.i> 211 212 shared_ptr is also documented in Library.html now. 213 2142010-05-27: wsfulton 215 Add the ability for $typemap special variable macros to call other $typemap 216 special variable macros, for example: 217 218 %typemap(cstype) CC "CC" 219 %typemap(cstype) BB "$typemap(cstype, CC)" 220 %typemap(cstype) AA "$typemap(cstype, BB)" 221 void hah(AA aa); 222 223 This also fixes C# std::vector containers of shared_ptr and %shared_ptr. 224 225 Also added diagnostics for $typemap with -debug-tmsearch, for example, the 226 above displays additional diagnostic lines starting "Containing: ": 227 228 example.i:34: Searching for a suitable 'cstype' typemap for: AA aa 229 Looking for: AA aa 230 Looking for: AA 231 Using: %typemap(cstype) AA 232 Containing: $typemap(cstype, BB) 233 example.i:31: Searching for a suitable 'cstype' typemap for: BB 234 Looking for: BB 235 Using: %typemap(cstype) BB 236 Containing: $typemap(cstype, CC) 237 example.i:29: Searching for a suitable 'cstype' typemap for: CC 238 Looking for: CC 239 Using: %typemap(cstype) CC 240 2412010-05-26: olly 242 Fix %attribute2ref not to produce a syntax error if the last 243 argument (AccessorMethod) is omitted. Patch from David Piepgras 244 in SF#2235756. 245 2462010-05-26: olly 247 [PHP] When using %throws or %catches, SWIG-generated PHP5 wrappers 248 now throw PHP Exception objects instead of giving a PHP error of 249 type E_ERROR. 250 251 This change shouldn't cause incompatibility issues, since you can't 252 set an error handler for E_ERROR, so previously PHP would just exit 253 which also happens for unhandled exceptions. The benefit is you can 254 now catch them if you want to. 255 256 Fixes SF#2545578 and SF#2955522. 257 2582010-05-25: olly 259 [PHP] Add missing directorin typemap for const std::string &. 260 Fixes SF#3006404 reported by t-Legiaw. 261 2622010-05-23: wsfulton 263 [C#] Fix #2957375 - SWIGStringHelper and SWIGExceptionHelper not always being 264 initialized before use in .NET 4 as the classes were not marked beforefieldinit. 265 A static constructor has been added to the intermediary class like this: 266 267 %pragma(csharp) imclasscode=%{ 268 static $imclassname() { 269 } 270 %} 271 272 If you had added your own custom static constructor to the intermediary class in 273 the same way as above, you will have to modify your approach to use static variable 274 initialization or define SWIG_CSHARP_NO_IMCLASS_STATIC_CONSTRUCTOR - See csharphead.swg. 275 276 *** POTENTIAL INCOMPATIBILITY *** 277 2782010-05-23: wsfulton 279 Fix #2408232. Improve shared_ptr and intrusive_ptr wrappers for classes in an 280 inheritance hierarchy. No special treatment is needed for derived classes. 281 The proxy class also no longer needs to be specified, it is automatically 282 deduced. The following macros are deprecated: 283 SWIG_SHARED_PTR(PROXYCLASS, TYPE) 284 SWIG_SHARED_PTR_DERIVED(PROXYCLASS, BASECLASSTYPE, TYPE) 285 and have been replaced by 286 %shared_ptr(TYPE) 287 Similarly for intrusive_ptr wrappers, the following macro is deprecated: 288 SWIG_INTRUSIVE_PTR(PROXYCLASS, TYPE) 289 SWIG_INTRUSIVE_PTR_DERIVED(PROXYCLASS, BASECLASSTYPE, TYPE) 290 and have been replaced by 291 %intrusive_ptr(TYPE) 292 2932010-05-21: olly 294 [PHP] Stop generating a bogus line of code in certain constructors. 295 This was mostly harmless, but caused a PHP notice to be issued, if 296 enabled (SF#2985684). 297 2982010-05-18: wsfulton 299 [Java] Fix member pointers on 64 bit platforms. 300 3012010-05-14: wsfulton 302 Fix wrapping of C++ enum boolean values reported by Torsten Landschoff: 303 typedef enum { PLAY = true, STOP = false } play_state; 304 3052010-05-14: olly 306 [PHP] Fix wrapping of global variables which was producing 307 uncompilable code in some cases. 308 3092010-05-12: drjoe 310 [R] Add two more changes from Wil Nolan. Get garbage 311 collection to work. Implement newfree 312 3132010-05-09: drjoe 314 Fix bug reported by Wil Nolan change creation of string so 315 that R 2.7.0+ can use char hashes 316 3172010-05-07: wsfulton 318 Apply patch #2955146 from Sergey Satskiy to fix expressions containing divide by 319 operator in constructor initialization lists. 320 3212010-05-05: wsfulton 322 [R] Memory leak fix handling const std::string & inputs, reported by Will Nolan. 323 3242010-05-01: wsfulton 325 Typemap matching enhancement for non-default typemaps. Previously all 326 qualifiers were stripped in one step, now they are stripped one at a time 327 starting with the left most qualifier. For example, int const*const 328 is first stripped to int *const then int *. 329 330 *** POTENTIAL INCOMPATIBILITY *** 331 3322010-04-25: bhy 333 [Python] Fix #2985655 - broken constructor renaming. 334 3352010-04-14: wsfulton 336 Typemap fragments are now official and documented in Typemaps.html. 337 3382010-04-09: wsfulton 339 [Ruby] Fix #2048064 and #2408020. 340 Apply Ubuntu patch to fix Ruby and std::vector wrappers with -minherit. 341 https://bugs.launchpad.net/ubuntu/+source/swig1.3/+bug/522874 342 3432010-04-09: wsfulton 344 [Mzscheme] Apply Ubuntu patch to fix std::map wrappers: 345 https://bugs.launchpad.net/ubuntu/+source/swig1.3/+bug/203876 346 3472010-04-09: wsfulton 348 [Python] Apply patch #2952374 - fix directors and the -nortti option. 349 3502010-04-09: wsfulton 351 [Lua] Fix #2887254 and #2946032 - SWIG_Lua_typename using wrong stack index. 352 3532010-04-03: wsfulton 354 [Python] Fix exceptions being thrown with the -threads option based on patch from Arto Vuori. 355 Fixes bug #2818499. 356 3572010-04-03: wsfulton 358 Fix Makefile targets: distclean and maintainer-clean 359 3602010-04-02: wsfulton 361 [Lua] Fix char pointers, wchar_t pointers and char arrays so that nil can be passed as a 362 valid value. Bug reported by Gedalia Pasternak. 363 3642010-04-01: wsfulton 365 Numerous subtle typemap matching rule fixes when using the default type. The typemap 366 matching rules are to take a type and find the best default typemap (SWIGTYPE, SWIGTYPE* etc), 367 then look for the next best match by reducing the chosen default type. The type deduction 368 now follows C++ class template partial specialization matching rules. 369 370 Below are the set of changes made showing the default type deduction 371 along with the old reduced type and the new version of the reduced type: 372 373 SWIGTYPE const &[ANY] 374 new: SWIGTYPE const &[] 375 old: SWIGTYPE (&)[ANY] 376 377 SWIGTYPE *const [ANY] 378 new: SWIGTYPE const [ANY] 379 old: SWIGTYPE *[ANY] 380 381 SWIGTYPE const *const [ANY] 382 new: SWIGTYPE *const [ANY] 383 old: SWIGTYPE const *[ANY] 384 385 SWIGTYPE const *const & 386 new: SWIGTYPE *const & 387 old: SWIGTYPE const *& 388 389 SWIGTYPE *const * 390 new: SWIGTYPE const * 391 old: SWIGTYPE ** 392 393 SWIGTYPE *const & 394 new: SWIGTYPE const & 395 old: SWIGTYPE *& 396 397 Additionally, a const SWIGTYPE lookup is used now for any constant type. Some examples, where 398 T is some reduced type, eg int, struct Foo: 399 400 T const 401 new: SWIGTYPE const 402 old: SWIGTYPE 403 404 T *const 405 new: SWIGTYPE *const 406 old: SWIGTYPE * 407 408 T const[] 409 new: SWIGTYPE const[] 410 old: SWIGTYPE[] 411 412 enum T const 413 new: enum SWIGTYPE const 414 old: enum SWIGTYPE 415 416 T (*const )[] 417 new: SWIGTYPE (*const )[] 418 old: SWIGTYPE (*)[] 419 420 Reminder: the typemap matching rules can now be seen for any types being wrapped by using 421 either the -debug-tmsearch or -debug-tmused options. 422 423 In practice this leads to some subtle matching rule changes and the majority of users 424 won't notice any changes, except in the prime area of motivation for this change: Improve 425 STL containers of const pointers and passing const pointers by reference. This is fixed 426 because many of the STL containers use a type 'T const&' as parameters and when T is 427 a const pointer, for example, 'K const*', then the full type is 'K const*const&'. This 428 means that the 'SWIGTYPE *const&' typemaps now match when T is either a non-const or 429 const pointer. Furthermore, some target languages incorrectly had 'SWIGTYPE *&' typemaps 430 when these should have been 'SWIGTYPE *const&'. These have been corrected (Java, C#, Lua, PHP). 431 432 *** POTENTIAL INCOMPATIBILITY *** 433 4342010-03-13: wsfulton 435 [Java] Some very old deprecated pragma warnings are now errors. 436 4372010-03-13: wsfulton 438 Improve handling of file names and directories containing double/multiple path separators. 439 4402010-03-10: mutandiz (Mikel Bancroft) 441 [allegrocl] Use fully qualified symbol name of cl::identity in emit_defun(). 442 4432010-03-06: wsfulton 444 [Java] The intermediary JNI class modifiers are now public by default meaning these 445 intermediary low level functions are now accessible by default from outside any package 446 used. The proxy class pointer constructor and getCPtr() methods are also now public. 447 These are needed in order for the nspace option to work without any other mods. 448 The previous default of protected access can be restored using: 449 450 SWIG_JAVABODY_METHODS(protected, protected, SWIGTYPE) 451 %pragma(java) jniclassclassmodifiers = "class" 452 4532010-03-06: wsfulton 454 [C#] Added the nspace feature for C#. Documentation for the nspace feature is now available. 455 4562010-03-04: wsfulton 457 Added the nspace feature. This adds some improved namespace support. Currently only Java 458 is supported for target languages, where C++ namespaces are automatically translated into 459 Java packages. The feature only applies to classes,struct,unions and enums declared within 460 a namespace. Methods and variables declared in namespaces still effectively have their 461 namespaces flattened. Example usage: 462 463 %feature(nspace) Outer::Inner1::Color; 464 %feature(nspace) Outer::Inner2::Color; 465 466 namespace Outer { 467 namespace Inner1 { 468 struct Color { 469 ... 470 }; 471 } 472 namespace Inner2 { 473 struct Color { 474 ... 475 }; 476 } 477 } 478 479 For Java, the -package option is also required when using the nspace feature. Say 480 we use -package com.myco, the two classes can then be accessed as follows from Java: 481 482 com.myco.Outer.Inner1.Color and com.myco.Outer.Inner2.Color. 483 4842010-02-27: wsfulton 485 [Python] Remove -dirvtable from the optimizations included by -O as it this option 486 currently leads to memory leaks as reported by Johan Blake. 487 4882010-02-27: wsfulton 489 License code changes: SWIG Source is GPL-v3 and library code license is now clearer 490 and is provided under a very permissive license. See http://www.swig.org/legal.html. 491 4922010-02-13: wsfulton 493 [Ruby] A few fixes for compiling under ruby-1.9.x including patch from 'Nibble'. 494 4952010-02-13: wsfulton 496 [Ruby] Apply patch from Patrick Bennett to fix RARRAY_LEN and RARRAY_PTR usage for Ruby 1.9.x 497 used in various STL wrappers. 498 4992010-02-13: wsfulton 500 [C#, Java] Fix incorrect multiply defined symbol name error when an enum item 501 and class name have the same name, as reported by Nathan Krieger. Example: 502 503 class Vector {}; 504 namespace Text { 505 enum Preference { Vector }; 506 } 507 508 This also fixes other incorrect corner case target language symbol name clashes. 509 5102010-02-11: wsfulton 511 Add the -debug-lsymbols option for displaying the target language layer symbols. 512 5132010-02-09: wsfulton 514 Fix -MM and -MMD options on Windows. They were not omitting files in the SWIG library as 515 they should be. 516 5172010-02-08: wsfulton 518 Fix #1807329 - When Makefile dependencies are being generated using the -M family of options 519 on Windows, the file paths have been corrected to use single backslashes rather than double 520 backslashes as path separators. 521 5222010-02-06: wsfulton 523 Fix #2918902 - language specific files not being generated in correct directory on 524 Windows when using forward slashes for -o, for example: 525 swig -python -c++ -o subdirectory/theinterface_wrap.cpp subdirectory/theinterface.i 526 5272010-02-05: wsfulton 528 Fix #2894405 - assertion when using -xmlout. 529 5302010-01-28: wsfulton 531 Fix typemap matching bug when a templated type has a typemap both specialized and not 532 specialized. For example: 533 534 template<typename T> struct XX { ... }; 535 %typemap(in) const XX & "..." 536 %typemap(in) const XX< int > & "..." 537 538 resulted in the 2nd typemap being applied for all T in XX< T >. 539 5402010-01-22: wsfulton 541 Fix #2933129 - typemaps not being found when the unary scope operator (::) is used to denote 542 global scope, the typemap is now used in situations like this: 543 544 struct X {}; 545 %typemap(in) const X & "..." 546 void m(const ::X &); 547 548 and this: 549 550 struct X {}; 551 %typemap(in) const ::X & "..." 552 void m(const X &); 553 5542010-01-20: wsfulton 555 Fix some unary scope operator (::) denoting global scope problems in the types generated 556 into the C++ layer. Previously the unary scope operator was dropped in the generated code 557 if the type had any sort of qualifier, for example when using pointers, references, like 558 ::foo*, ::foo&, bar< ::foo* >. 559 5602010-01-13: olly 561 [PHP] Add datetime to the list of PHP predefined classes (patch 562 from David Fletcher in SF#2931042). 563 5642010-01-11: wsfulton 565 Slight change to warning, error and diagnostic reporting. The warning number is no 566 longer shown within brackets. This is to help default parsing of warning messages by 567 other tools, vim on Unix in particular. 568 569 Example original display using -Fstandard: 570 example.i:20: Warning(401): Nothing known about base class 'B'. Ignored. 571 New display: 572 example.i:20: Warning 401: Nothing known about base class 'B'. Ignored. 573 574 Also subtle fix to -Fmicrosoft format adding in missing space. Example original display: 575 example.i(20): Warning(401): Nothing known about base class 'Base'. Ignored. 576 New display: 577 example.i(20) : Warning 401: Nothing known about base class 'Base'. Ignored. 578 5792010-01-10: wsfulton 580 Fix a few inconsistencies in reporting of file/line numberings including modifying 581 the overload warnings 509, 512, 516, 474, 475 to now be two line warnings. 582 5832010-01-10: wsfulton 584 Modify -debug-tags output to use standard file name/line reporting so that editors 585 can easily navigate to the appropriate lines. 586 Was typically: 587 . top . include . include (/usr/share/swig/temp/trunk/Lib/swig.swg:312) 588 . top . include . include . include (/usr/share/swig/temp/trunk/Lib/swigwarnings.swg:39) 589 now: 590 /usr/share/swig/temp/trunk/Lib/swig.swg:312: . top . include . include 591 /usr/share/swig/temp/trunk/Lib/swigwarnings.swg:39: . top . include . include . include 592 5932010-01-03: wsfulton 594 Fix missing file/line numbers for typemap warnings and in output from the 595 -debug-tmsearch/-debug-tmused options. 596 5972010-01-03: wsfulton 598 Add typemaps used debugging option (-debug-tmused). When used each line displays 599 the typemap used for each type for which code is being generated including the file 600 and line number related to the type. This is effectively a condensed form of the 601 -debug-tmsearch option. Documented in Typemaps.html. 602 6032009-12-23: wsfulton 604 Fix for %javaexception and directors so that all the appropriate throws clauses 605 are generated. Problem reported by Peter Greenwood. 606 6072009-12-20: wsfulton 608 Add -debug-tmsearch option for debugging the typemap pattern matching rules. 609 Documented in Typemaps.html. 610 6112009-12-12: wsfulton 612 [Octave] Remove the -api option and use the new OCTAVE_API_VERSION_NUMBER 613 macro provided in the octave headers for determining the api version instead. 614 6152009-12-04: olly 616 [Ruby] Improve support for Ruby 1.9 under GCC. Addresses part of 617 SF#2859614. 618 6192009-12-04: olly 620 Fix handling of modulo operator (%) in constant expressions 621 (SF#2818562). 622 6232009-12-04: olly 624 [PHP] "empty" is a reserved word in PHP, so rename empty() method 625 on STL classes to "is_empty()" (previously this was automatically 626 renamed to "c_empty()"). 627 *** POTENTIAL INCOMPATIBILITY *** 628 6292009-12-03: olly 630 [PHP] Add typemaps for long long and unsigned long long, and for 631 pointer to method. 632 6332009-12-02: olly 634 [PHP] Fix warning and rename of reserved class name to be case 635 insensitive. 636 6372009-12-01: wsfulton 638 Revert support for %extend and memberin typemaps added in swig-1.3.39. The 639 memberin typemaps are ignored again for member variables within a %extend block. 640 Documentation inconsistency reported by Torsten Landschoff. 641 6422009-11-29: wsfulton 643 [Java, C#] Fix generated quoting when using %javaconst(1)/%csconst(1) for 644 static const char member variables. 645 646 %javaconst(1) A; 647 %csconst(1) A; 648 struct X { 649 static const char A = 'A'; 650 }; 651 6522009-11-26: wsfulton 653 [Java, C#] Fix %javaconst(1)/%csconst(1) for static const member variables to 654 use the actual constant value if it is specified, rather than the C++ code to 655 access the member. 656 657 %javaconst(1) EN; 658 %csconst(1) EN; 659 struct X { 660 static const int EN = 2; 661 }; 662 6632009-11-23: wsfulton 664 C++ nested typedef classes can now be handled too, for example: 665 struct Outer { 666 typedef Foo { } FooTypedef1, FooTypedef2; 667 }; 668 6692009-11-18: wsfulton 670 The wrappers for C nested structs are now generated in the same order as declared 671 in the parsed code. 672 6732009-11-18: wsfulton 674 Fix #491476 - multiple declarations of nested structs, for example: 675 struct Outer { 676 struct { 677 int val; 678 } inner1, inner2, *inner3, inner4[1]; 679 } outer; 680 6812009-11-17: wsfulton 682 Fix parsing of enum declaration and initialization, for example: 683 684 enum ABC { 685 a, 686 b, 687 c 688 } A = a, *pC = &C, array[3] = {a, b, c}; 689 6902009-11-17: wsfulton 691 Fix parsing of struct declaration and initialization, for example: 692 693 struct S { 694 int x; 695 } instance = { 10 }; 696 6972009-11-15: wsfulton 698 Fix #1960977 - Syntax error parsing derived nested class declaration and member 699 variable instance. 700 7012009-11-14: wsfulton 702 Fix #2310483 - function pointer typedef within extern "C" block. 703 7042009-11-13: wsfulton 705 Fix usage of nested template classes within templated classes so that compileable code 706 is generated. 707 7082009-11-13: olly 709 [php] Fix place where class prefix (as specified with -prefix) 710 wasn't being used. Patch from gverbruggen in SF#2892647. 711 7122009-11-12: wsfulton 713 Fix usage of nested template classes so that compileable code is generated - the nested 714 template class is now treated like a normal nested classes, that is, as an opaque type 715 unless the nestedworkaround feature is used. 716 7172009-11-12: wsfulton 718 Replace SWIGWARN_PARSE_NESTED_CLASS with SWIGWARN_PARSE_NAMED_NESTED_CLASS and 719 SWIGWARN_PARSE_UNNAMED_NESTED_CLASS for named and unnamed nested classes respectively. 720 721 Named nested class ignored warnings can now be suppressed by name using %warnfilter, eg: 722 723 %warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::Inner; 724 725 but clearly unnamed nested classes cannot and the global suppression is still required, eg: 726 727 #pragma SWIG nowarn=SWIGWARN_PARSE_UNNAMED_NESTED_CLASS 728 7292009-11-11: wsfulton 730 Added the nestedworkaround feature as a way to use the full functionality of a nested class 731 (C++ mode only). It removes the nested class from SWIG's type information so it is as if SWIG 732 had never parsed the nested class. The documented nested class workarounds using a global 733 fake class stopped working when SWIG treated the nested class as an opaque pointer, and 734 this feature reverts this behaviour. The documentation has been updated with details of how 735 to use and implement it, see the "Nested classes" section in SWIGPlus.html. 736 7372009-11-11: wsfulton 738 There were a number of C++ cases where nested classes/structs/unions were being handled 739 as if C code was being parsed which would oftentimes lead to uncompileable code as an 740 attempt was made to wrap the nested structs like it is documented for C code. Now all 741 nested structs/classes/unions are ignored in C++ mode, as was always documented. However, 742 there is an improvement as usage of nested structs/classes/unions is now always treated 743 as an opaque type by default, resulting in generated code that should always compile. 744 745 *** POTENTIAL INCOMPATIBILITY *** 746 7472009-11-09: drjoe 748 Fix R for -fcompact and add std_map.i 749 7502009-11-08: wsfulton 751 Fix inconsistency for nested structs/unions/classes. Uncompileable code was being 752 generated when inner struct and union declarations were used as types within the 753 inner struct. The inner struct/union is now treated as a forward declaration making the 754 behaviour the same as an inner class. (C++ code), eg: 755 756 struct Outer { 757 struct InnerStruct { int x; }; 758 InnerStruct* getInnerStruct(); 759 }; 760 7612009-11-08: wsfulton 762 Ignored nested class/struct warnings now display the name of the ignored class/struct. 763 7642009-11-07: wsfulton 765 Bug #1514681 - Fix nested template classes within a namespace generated uncompileable 766 code and introduced strange side effects to other wrapper code especially code 767 after the nested template class. Note that nested template classes are still ignored. 768 7692009-11-07: wsfulton 770 Add new debug options: 771 -debug-symtabs - Display symbol tables information 772 -debug-symbols - Display target language symbols in the symbol tables 773 -debug-csymbols - Display C symbols in the symbol tables 774 7752009-11-03: wsfulton 776 Fix some usage of unary scope operator (::) denoting global scope, for example: 777 778 namespace AA { /* ... */ } 779 using namespace ::AA; 780 781 and bug #1816802 - SwigValueWrapper should be used: 782 783 struct CC { 784 CC(int); // no default constructor 785 }; 786 ::CC x(); 787 788 and in template parameter specializations: 789 790 struct S {}; 791 template <typename T> struct X { void a() {}; }; 792 template <> struct X<S> { void b() {}; }; 793 %template(MyTConcrete) X< ::S >; 794 795 plus probably some other corner case usage of ::. 796 7972009-11-02: olly 798 [Python] Fix potential memory leak in initialisation code for the 799 generated module. 800 8012009-10-23: wsfulton 802 Fix seg fault when using a named nested template instantiation using %template(name) 803 within a class. A warning that these are not supported is now issued plus processing 804 continues as if no name was given. 805 8062009-10-20: wsfulton 807 [Python] Fix std::vector<const T*>. This would previously compile, but not run correctly. 808 8092009-10-20: wsfulton 810 Fixed previously fairly poor template partial specialization and explicit 811 specialization support. Numerous bugs in this area have been fixed including: 812 813 - Template argument deduction implemented for template type arguments, eg this now 814 works: 815 template<typename T> class X {}; 816 template<typename T> class X<T *> {}; 817 %template(X1) X<const int *>; // Chooses T * specialization 818 819 and more complex cases with multiple parameters and a mix of template argument 820 deduction and explicitly specialised parameters, eg: 821 template <typename T1, typename T2> struct TwoParm { void a() {} }; 822 template <typename T1> struct TwoParm<T1 *, int *> { void e() {} }; 823 %template(E) TwoParm<int **, int *>; 824 825 Note that the primary template must now be in scope, like in C++, when 826 an explicit or partial specialization is instantiated with %template. 827 828 *** POTENTIAL INCOMPATIBILITY *** 829 8302009-09-14: wsfulton 831 [C#] Add %csattributes for adding C# attributes to enum values, see docs for example. 832 8332009-09-11: wsfulton 834 Fix memmove regression in cdata.i as reported by Adriaan Renting. 835 8362009-09-07: wsfulton 837 Fix constant expressions containing <= or >=. 838 8392009-09-02: wsfulton 840 The following operators in constant expressions now result in type bool for C++ 841 wrappers and remain as type int for C wrappers, as per each standard: 842 843 && || == != < > <= >= (Actually the last 4 are still broken). For example: 844 845 #define A 10 846 #define B 10 847 #define A_EQ_B A == B // now wrapped as type bool for C++ 848 #define A_AND_B A && B // now wrapped as type bool for C++ 849 8502009-09-02: wsfulton 851 Fix #2845746. true and false are now recognised keywords (only when wrapping C++). 852 Constants such as the following are now wrapped (as type bool): 853 #define FOO true 854 #define BAR FOO && false 855 856Version 1.3.40 (18 August 2009) 857=============================== 858 8592009-08-17: olly 860 [Perl] Add "#undef do_exec" to our clean up of Perl global 861 namespace pollution. 862 8632009-08-17: olly 864 [PHP] Fix to wrap a resource returned by __get() in a PHP object (SF#2549217). 865 8662009-08-17: wsfulton 867 Fix #2797485 After doing a 'make clean', install fails if yodl2man or yodl2html 868 is not available. 869 8702009-08-16: wsfulton 871 [Octave] Caught exceptions display the type of the C++ exception instead of the 872 generic "c++-side threw an exception" message. 873 8742009-08-16: wsfulton 875 [Java] When %catches is used, fix so that any classes specified in the "throws" 876 attribute of the "throws" typemap are generated into the Java method's throws clause. 877 8782009-08-16: wsfulton 879 [C#] Fix exception handling when %catches is used, reported by Juan Manuel Alvarez. 880 8812009-08-15: wsfulton 882 Fix %template seg fault on some cases of overloading the templated method. 883 Bug reported by Jan Kupec. 884 8852009-08-15: wsfulton 886 [Ruby] Add numerous missing wrapped methods for std::vector<bool> specialization 887 as reported by Youssef Jones. 888 8892009-08-14: wsfulton 890 [Perl] Add SWIG_ConvertPtrAndOwn() method into the runtime for smart pointer 891 memory ownership control. shared_ptr support still to be added. Patch from 892 David Fletcher. 893 8942009-08-14: olly 895 [PHP] PHP5 now wraps static member variables as documented. 896 8972009-08-14: olly 898 [PHP] Update the PHP "class" example to work with PHP5 and use 899 modern wrapping features. 900 9012009-08-13: wsfulton 902 [PHP] std::vector wrappers overhaul. They no longer require the 903 specialize_std_vector() macro. Added wrappers for capacity() and reserve(). 904 9052009-08-13: wsfulton 906 [PHP] Add const reference typemaps. const reference primitive types are 907 now passed by value rather than pointer like the other target languages. 908 Fixes SF#2524029. 909 9102009-08-08: wsfulton 911 [Python] More user friendly AttributeError is raised when there are 912 no constructors generated for the proxy class in the event that the 913 class is abstract - the error message is now 914 "No constructor defined - class is abstract" whereas if there are no 915 public constructors for any other reason and the class is not abstract, 916 the message remains 917 "No constructor defined". 918 [tcl] Similarly for tcl when using -itcl. 919 9202009-08-04: olly 921 [PHP] Fix generated code to work with PHP 5.3. 922 9232009-08-04: vmiklos 924 [PHP] Various mathematical functions (which would conflict 925 with the built-in PHP ones) are now automatically handled by 926 adding a 'c_' prefix. 927 9282009-08-03: wsfulton 929 [C#] The std::vector<T> implementation is improved and now uses $typemap such 930 that the proxy class for T no longer has to be specified in some macros 931 for correct C# compilation; the following macros are deprecated, where 932 CSTYPE was the C# type for the C++ class CTYPE: 933 934 SWIG_STD_VECTOR_SPECIALIZE_MINIMUM(CSTYPE, CTYPE) 935 usage should be removed altogether 936 937 SWIG_STD_VECTOR_SPECIALIZE(CSTYPE, CTYPE) 938 should be replaced with: 939 SWIG_STD_VECTOR_ENHANCED(CTYPE) 940 941 Some more details in csharp/std_vector.i 942 943 *** POTENTIAL INCOMPATIBILITY *** 944 9452009-07-31: olly 946 [Python] Fix indentation so that we give a useful error if the 947 module can't be loaded. Patch from Gaetan Lehmann in SF#2829853. 948 9492009-07-29: wsfulton 950 Add $typemap(method, typelist) special variable macro. This allows 951 the contents of a typemap to be inserted within another typemap. 952 Fully documented in Typemaps.html. 953 9542009-07-29: vmiklos 955 [PHP] Static member variables are now prefixed with the 956 class name. This allows static member variables with the 957 same name in different classes. 958 9592009-07-29: olly 960 [Python] Add missing locks to std::map wrappers. Patch from 961 Paul Hampson in SF#2813836. 962 9632009-07-29: olly 964 [PHP] Fix memory leak in PHP OUTPUT typemaps. Reported by Hitoshi 965 Amano in SF#2826322. 966 9672009-07-29: olly 968 [PHP] Fix memory leak in PHP resource destructor for classes 969 without a destructor and non-class types. Patch from Hitoshi Amano 970 in SF#2825303. 971 9722009-07-28: olly 973 [PHP] Update warnings about clashes between identifiers and PHP 974 keywords and automatic renaming to work with the PHP5 class 975 wrappers. Fixes SF#1613679. 976 9772009-07-28: vmiklos 978 [PHP] If a member function is not public but it has a base 979 which is public, then now a warning is issued and the member 980 function will be public, as PHP requires this. 981 9822009-07-21: vmiklos 983 [PHP] Director support added. 984 9852009-07-15: olly 986 [Perl] Don't specify Perl prototype "()" for a constructor with a 987 different name to the class, as such constructors can still take 988 parameters. 989 9902009-07-12: xavier98 991 [Octave] Add support for Octave 3.2 API 992 9932009-07-05: olly 994 [PHP] Update the list of PHP keywords - "cfunction" is no longer a 995 keyword in PHP5 and PHP 5.3 added "goto", "namespace", "__DIR__", 996 and "__NAMESPACE__". 997 9982009-07-03: olly 999 [Tcl] To complement USE_TCL_STUBS, add support for USE_TK_STUBS 1000 and SWIG_TCL_STUBS_VERSION. Document all three in the Tcl chapter 1001 of the manual. Based on patch from SF#2810380 by Christian 1002 Gollwitzer. 1003 10042009-07-02: vmiklos 1005 [PHP] Added factory.i for PHP, see the li_factory testcase 1006 for more info on how to use it. 1007 10082009-07-02: wsfulton 1009 Fix -Wallkw option as reported by Solomon Gibbs. 1010 10112009-07-02: wsfulton 1012 Fix syntax error when a nested struct contains a comment containing a * followed 1013 eventually by a /. Regression from 1.3.37, reported by Solomon Gibbs. 1014 10152009-07-01: vmiklos 1016 [PHP] Unknown properties are no longer ignored in proxy 1017 classes. 1018 10192009-07-01: vmiklos 1020 [PHP] Fixed %newobject behaviour, previously any method 1021 marked with %newobject was handled as a constructor. 1022 10232009-06-30: olly 1024 [Ruby] Undefine close and connect macros defined by Ruby API 1025 headers as we don't need them and they can clash with C++ methods 1026 being wrapped. Patch from Vit Ondruch in SF#2814430. 1027 10282009-06-26: olly 1029 [Ruby] Fix to handle FIXNUM values greater than MAXINT passed for a 1030 double parameter. 1031 10322009-06-24: wsfulton 1033 Fix wrapping methods with default arguments and the compactdefaultargs feature 1034 where a class is passed by value and is assigned a default value. The SwigValueWrapper 1035 template workaround for a missing default constructor is no longer used as the code 1036 generated does not call the default constructor. 1037 10382009-06-16: wsfulton 1039 [Java,C#] Fix enum marshalling when %ignore is used on one of the enum items. 1040 Incorrect enum values were being passed to the C++ layer or compilation errors resulted. 1041 10422009-06-02: talby 1043 [Perl] Resolved reference.i overload support problem 1044 identified by John Potowsky. 1045 10462009-05-26: wsfulton 1047 [C#] Improved std::map wrappers based on patch from Yuval Baror. The C# proxy 1048 now implements System.Collections.Generic.IDictionary<>. 1049 1050 These std:map wrappers have a non-backwards compatible overhaul to make them 1051 like a .NET IDictionary. Some method names have changed as following: 1052 set -> setitem (use this[] property now) 1053 get -> getitem (use this[] property now) 1054 has_key -> ContainsKey 1055 del -> Remove 1056 clear -> Clear 1057 1058 The following macros used for std::map wrappers are deprecated and will no longer work: 1059 specialize_std_map_on_key 1060 specialize_std_map_on_value 1061 specialize_std_map_on_both 1062 1063 *** POTENTIAL INCOMPATIBILITY *** 1064 10652009-05-20: vmiklos 1066 [PHP] Add the 'thisown' member to classes. The usage of it 1067 is the same as the Python thisown one: it's 1 by default and 1068 you can set it to 0 if you want to prevent freeing it. (For 1069 example to prevent a double free.) 1070 10712009-05-14: bhy 1072 [Python] Fix the wrong pointer value returned by SwigPyObject_repr(). 1073 10742009-05-13: mutandiz (Mikel Bancroft) 1075 [allegrocl] Minor tweak when wrapping in -nocwrap mode. 1076 10772009-05-11: wsfulton 1078 [C#] Improved std::vector wrappers on the C# proxy side from Yuval Baror. These 1079 implement IList<> instead of IEnumerable<> where possible. 1080 10812009-04-29: wsfulton 1082 [Java, C#] Add the 'notderived' attribute to the javabase and csbase typemaps. 1083 When this attribute is set, the typemap will not apply to classes that are derived 1084 from a C++ base class, eg 1085 %typemap(csbase, notderived="1") SWIGTYPE "CommonBase" 1086 10872009-04-29: olly 1088 [Python] Don't attempt to acquire the GIL in situations where we 1089 know that it will already be locked. This avoids some dead-locks 1090 with mod_python (due to mod_python bugs which are apparently 1091 unlikely to ever be fixed), and results in smaller wrappers which 1092 run a little faster (in tests with Xapian on x86-64 Ubuntu 9.04, 1093 the stripped wrapper library was 11% smaller and ran 2.7% faster). 1094 10952009-04-21: wsfulton 1096 [C#] Fix #2753469 - bool &OUTPUT and bool *OUTPUT typemaps initialisation. 1097 10982009-04-09: wsfulton 1099 Fix #2746858 - C macro expression using floating point numbers 1100 11012009-03-30: olly 1102 [PHP] The default out typemap for char[ANY] now returns the string up to a 1103 zero byte, or the end of the array if there is no zero byte. This 1104 is the same as Python does, and seems more generally useful than 1105 the previous behaviour of returning the whole contents of the array 1106 including any zero bytes. If you want the old behaviour, you can provide 1107 your own typemap to do this: 1108 1109 %typemap(out) char [ANY] 1110 %{ 1111 RETVAL_STRINGL($1, $1_dim0, 1); 1112 %} 1113 1114Version 1.3.39 (21 March 2009) 1115============================== 1116 11172009-03-19: bhy 1118 [Python] Fix the memory leak related to Python 3 unicode and C char* conversion, 1119 which can be shown in the following example before this fix: 1120 1121 from li_cstring import * 1122 i=0 1123 while True: 1124 i += 1 1125 n = str(i)*10 1126 test3(n) 1127 1128 This fix affected SWIG_AsCharPtrAndSize() so you cannot call this function with 1129 a null alloc and non-null cptr argument in Python 3, otherwise a runtime error 1130 will be raised. 1131 11322009-03-18: wsfulton 1133 [C#] std::vector<T> wrapper improvements for .NET 2 and also providing the 1134 necessary machinery to use the std::vector<T> wrappers with more advanced features such 1135 as LINQ - the C# proxy class now derives from IEnumerable<>. The default is now to 1136 generate code requiring .NET 2 as a minimum, although the C# code can be compiled 1137 for .NET 1 by defining the SWIG_DOTNET_1 C# preprocessor constant. See the 1138 std_vector.i file for more details. 1139 1140 *** POTENTIAL INCOMPATIBILITY *** 1141 11422009-03-12: wsfulton 1143 [Ruby] Fix #2676738 SWIG generated symbol name clashes. 1144 11452009-03-01: bhy 1146 [Python] Some fixes for Python 3.0.1 and higher support. In 3.0.1, the C API function 1147 PyObject_Compare is removed, so PyObject_RichCompareBool is used for replacement. 1148 Struct initilization of SwigPyObject and SwigPyObject_as_number changed to reflect 1149 the drop of tp_compare and nb_long. 1150 11512009-03-01: bhy 1152 [Python] Fix SF#2583160. Now the importer in Python shadow wrapper take care of the 1153 case that module already imported at other place. 1154 11552009-02-28: bhy 1156 [Python] Fix SF#2637352. Move struct declaration of SWIG_module in pyinit.swg before 1157 the method calls, since some C compiler don't allow declaration in middle of function 1158 body. 1159 11602009-02-21: wsfulton 1161 [Allegrocl] Fix seg fault wrapping some constant variable (%constant) types. 1162 11632009-02-20: wsfulton 1164 [CFFI] Fix seg faults when for %extend and using statements. 1165 11662009-02-20: wsfulton 1167 Fix SF #2605955: -co option which broke in 1.3.37. 1168 11692009-02-20: wsfulton 1170 New %insert("begin") section added. Also can be used as %begin. This is a new 1171 code section reserved entirely for users and the code within the section is generated 1172 at the top of the C/C++ wrapper file and so provides a means to put custom code 1173 into the wrapper file before anything else that SWIG generates. 1174 11752009-02-17: wsfulton 1176 'make clean-test-suite' will now run clean on ALL languages. Previously it only 1177 ran the correctly configured languages. This way it is now possible to clean up 1178 properly after running 'make partialcheck-test-suite'. 1179 11802009-02-14: wsfulton 1181 Extend attribute library support for structs/classes and the accessor functions use 1182 pass/return by value semantics. Two new macros are available and usage is identical 1183 to %attribute. These are %attributeval for structs/classes and %attributestring for 1184 string classes, like std::string. See attribute.swg for more de…
Large files files are truncated, but you can click here to view the full file