-
Notifications
You must be signed in to change notification settings - Fork 9
/
CHANGES
22863 lines (17208 loc) · 880 KB
/
CHANGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
SWIG (Simplified Wrapper and Interface Generator)
See the CHANGES.current file for changes in the current version.
See the RELEASENOTES file for a summary of changes in each release.
Version 2.0.10 (27 May 2013)
============================
2013-05-25: wsfulton
[Python] Fix Python 3 inconsistency when negative numbers are passed
where a parameter expects an unsigned C type. An OverFlow error is
now consistently thrown instead of a TypeError.
2013-05-25: Artem Serebriyskiy
SVN Patch ticket #338 - fixes to %attribute macros for template usage
with %arg.
2013-05-19: wsfulton
Fix ccache-swig internal error bug due to premature file cleanup.
Fixes SF bug 1319 which shows up as a failure in the ccache tests on
Debian 64 bit Wheezy, possibly because ENABLE_ZLIB is defined.
This is a corner case which will be hit when the maximum number of files
in the cache is set to be quite low (-F option), resulting in a cache miss.
2013-05-09: kwwette
[Octave] Fix bugs in Octave module loading:
- fix a memory leak in setting of global variables
- install functions only once, to speed up module loads
2013-04-28: gjanssens
[Guile] Updates in guile module:
- Add support for guile 2.0
- Drop support for guile 1.6
- Drop support for generating wrappers using guile's gh interface.
All generated wrappers will use the scm interface from now on.
- Deprecate -gh and -scm options. They are no longer needed.
A warning will be issued when these options are still used.
- Fix all tests and examples to have a successful travis test
2013-04-18: wsfulton
Apply Patch #36 from Jesus Lopez to add support for $descriptor() special variable macro expansion
in fragments. For example:
%fragment("nameDescriptor", "header")
%{
static const char *nameDescriptor = "$descriptor(Name)";
%}
which will generate into the wrapper if the fragment is used:
static const char *nameDescriptor = "SWIGTYPE_Name";
2013-04-18: wsfulton
Fix SF Bug #428 - Syntax error when preprocessor macros are defined inside of enum lists, such as:
typedef enum {
eZero = 0
#define ONE 1
} EFoo;
The macros are silently ignored.
2013-04-17: wsfulton
[C#] Pull patch #34 from BrantKyser to fix smart pointers in conjuction with directors.
2013-04-15: kwwette
[Octave] Fix bugs in output of cleanup code.
- Cleanup code is now written also after the "fail:" label, so it will be called if
a SWIG_exception is raised by the wrapping function, consistent with other modules.
- Octave module now also recognises the "$cleanup" special variable, if needed.
2013-04-08: kwwette
Add -MP option to SWIG for generating phony targets for all dependencies.
- Prevents make from complaining if header files have been deleted before
the dependency file has been updated.
- Modelled on similar option in GCC.
2013-04-09: olly
[PHP] Add missing directorin typemap for char* and char[] which
fixes director_string testcase failure.
2013-04-05: wsfulton
[Ruby] SF Bug #1292 - Runtime fixes for Proc changes in ruby-1.9 when using STL
wrappers that override the default predicate, such as:
%template(Map) std::map<swig::LANGUAGE_OBJ, swig::LANGUAGE_OBJ, swig::BinaryPredicate<> >;
2013-04-05: wsfulton
[Ruby] SF Bug #1159 - Correctly check rb_respond_to call return values to fix some
further 1.9 problems with functors and use of Complex wrappers.
2013-04-02: wsfulton
[Ruby] Runtime fixes for std::complex wrappers for ruby-1.9 - new native Ruby complex numbers are used.
2013-03-30: wsfulton
[Ruby] Fix seg fault when using STL containers of generic Ruby types, GC_VALUE or LANGUAGE_OBJECT,
on exit of the Ruby interpreter. More frequently observed in ruby-1.9.
2013-03-29: wsfulton
[Ruby] Fix delete_if (reject!) for the STL container wrappers which previously would
sometimes seg fault or not work.
2013-03-25: wsfulton
[Python] Fix some undefined behaviour deleting slices in the STL containers.
2013-03-19: wsfulton
[C#, Java, D] Fix seg fault in SWIG using directors when class and virtual method names are
the same except being in different namespaces when the %nspace feature is not being used.
2013-02-19: kwwette
Fix bug in SWIG's handling of qualified (e.g. const) variables of array type. Given the typedef
a(7).q(volatile).double myarray // typedef volatile double[7] myarray;
the type
q(const).myarray // const myarray
becomes
a(7).q(const volatile).double // const volatile double[7]
Previously, SwigType_typedef_resolve() produces the type
q(const).a(7).q(volatile).double // non-sensical type
which would never match %typemap declarations, whose types were parsed correctly.
Add typemap_array_qualifiers.i to the test suite which checks for the correct behaviour.
2013-02-18: wsfulton
Deprecate typedef names used as constructor and destructor names in %extend. The real
class/struct name should be used.
typedef struct tagEStruct {
int ivar;
} EStruct;
%extend tagEStruct {
EStruct() // illegal name, should be tagEStruct()
{
EStruct *s = new EStruct();
s->ivar = ivar0;
return s;
}
~EStruct() // illegal name, should be ~tagEStruct()
{
delete $self;
}
}
For now these trigger a warning:
extend_constructor_destructor.i:107: Warning 522: Use of an illegal constructor name 'EStruct' in
%extend is deprecated, the constructor name should be 'tagEStruct'.
extend_constructor_destructor.i:111: Warning 523: Use of an illegal destructor name 'EStruct' in
%extend is deprecated, the destructor name should be 'tagEStruct'.
These %extend destructor and constructor names were valid up to swig-2.0.4, however swig-2.0.5 ignored
them altogether for C code as reported in SF bug #1306. The old behaviour of using them has been
restored for now, but is officially deprecated. This does not apply to anonymously defined typedef
classes/structs such as:
typedef struct {...} X;
2013-02-17: kwwette
When generating functions provided by %extend, use "(void)" for no-argument functions
instead of "()". This prevents warnings when compiling with "gcc -Wstrict-prototypes".
2013-02-17: kwwette
[Octave] Minor fix to autodoc generation: get the right type for functions returning structs.
2013-02-15: wsfulton
Deprecate typedef names used in %extend that are not the real class/struct name. For example:
typedef struct StructBName {
int myint;
} StructB;
%extend StructB {
void method() {}
}
will now trigger a warning:
swig_extend.i:19: Warning 326: Deprecated %extend name used - the struct name StructBName
should be used instead of the typedef name StructB.
This is only partially working anyway (the %extend only worked if placed after the class
definition).
2013-02-09: wsfulton
[CFFI] Apply patch #22 - Fix missing package before &body
2013-01-29: wsfulton
[Java] Ensure 'javapackage' typemap is used as it stopped working from version 2.0.5.
2013-01-28: wsfulton
[Python] Apply patch SF #334 - Fix default value conversions "TRUE"->True, "FALSE"->False.
2013-01-28: wsfulton
[Java] Apply patch SF #335 - Truly ignore constructors in directors with %ignore.
2013-01-18: Brant Kyser
[Java] Patch #15 - Allow the use of the nspace feature without the -package commandline option.
This works as long and the new jniclasspackage pragma is used to place the JNI intermediate class
into a package and the nspace feature is used to place all exposed types into a package.
2013-01-15: wsfulton
Fix Visual Studio examples to work when SWIG is unzipped into a directory containing spaces.
2013-01-15: wsfulton
[C#] Fix cstype typemap lookup for member variables so that a fully qualified variable name
matches. For example:
%typemap(cstype) bool MVar::mvar "MyBool"
struct MVar {
bool mvar;
};
2013-01-11: Brant Kyser
[Java, C#, D] SF Bug #1299 - Fix generated names for when %nspace is used on
classes with the same name in two different namespaces.
2013-01-11: Vladimir Kalinin
[C#] Add support for csdirectorin 'pre', 'post' and 'terminator' attributes.
2013-01-08: olly
[PHP] Fix to work with a ZTS build of PHP (broken in 2.0.7).
2013-01-07: olly
Fix bashism in configure, introduced in 2.0.9.
2013-01-06: wsfulton
Pull patch #4 from ptomulik to fix SF Bug #1296 - Fix incorrect warning for virtual destructors
in templates, such as:
Warning 521: Illegal destructor name B< A >::~B(). Ignored.
2013-01-05: wsfulton
[Python] Pull patch #3 from ptomulik to fix SF Bug #1295 - standard exceptions as
classes using the SWIG_STD_EXCEPTIONS_AS_CLASSES macro.
2013-01-04: wsfulton
[Java] Pull patch #2 from BrantKyser to fix SF Bug #1283 - fix smart pointers in conjuction
with directors.
2013-01-03: wsfulton
[Java] Pull patch #1 from BrantKyser to fix SF Bug #1278 - fix directors and nspace feature when
multilevel namespaces are used.
Version 2.0.9 (16 December 2012)
================================
2012-12-16: wsfulton
Fix garbage line number / empty file name reporting for some missing
'}' or ')' error messages.
2012-12-15: kkaempf
[Ruby] Apply patch 3530444, Class#methods and Class#constants returns array of
symbols in Ruby 1.9+
2012-12-14: kkaempf
[Ruby] Apply patch 3530439 and finally replace all occurrences of the STR2CSTR() macro
with StringValuePtr(). STR2CSTR was deprecated since years and got removed in Ruby 1.9
2012-12-14: kkaempf
[Ruby] Applied patches #3530442 and 3530443 to adapt compile and runtime include
paths to match Ruby 1.9+
2012-12-14: wsfulton
[CFFI] Fix #3161614 - Some string constants are incorrect
2012-12-13: wsfulton
[CFFI] Fix #3529690 - Fix incorrect constant names.
2012-12-12: drjoe
[R] add fix to finalizer that was missed earlier
2012-12-11: wsfulton
[Python] Apply patch #3590522 - fully qualified package paths for Python 3 even if a module is in the
same package.
2012-12-08: wsfulton
[Python] Bug #3563647 - PyInt_FromSize_t unavailable prior to Python 2.5 for unsigned int types.
2012-12-08: wsfulton
[Perl] Fix bug #3571361 - C++ comment in C wrappers.
2012-12-07: wsfulton
[C#] Apply patch #3571029 which adds missing director support for const unsigned long long &.
2012-11-28: kwwette
[Octave] Simplified module loading: now just the syntax
$ example;
is accepted, which loads functions globally but constants and variables relative to the current scope.
This make module loading behaviour reliably consistent, and reduces problems when loading modules which
depend on other modules which may not have been previously loaded.
2012-11-27: wsfulton
[cffi] Fix junk output when wrapping single character literal constants.
2012-11-17: wsfulton
[Tcl, Modula3] Add missing support for -outdir.
2012-11-17: wsfulton
Fix segfaults when using filename paths greater than 1024 characters in length.
2012-11-14: wsfulton
[ccache-swig] Apply patch #3586392 from Frederik Deweerdt to fix some error cases - incorrectly using
memory after it has been deleted.
2012-11-09: vzeitlin
[Python] Fix overflow when passing values greater than LONG_MAX from Python 3 for parameters with unsigned long C type.
2012-11-09: wsfulton
Fix some feature matching issues for implicit destructors and implicit constructors and implicit
copy constructors added with %copyctor. Previously a feature for these had to be fully qualified
in order to match. Now the following will also match:
%feature("xyz") ~XXX();
struct XXX {};
2012-11-09: wsfulton
Further consistency in named output typemap lookups for implicit constructors and destructors and
implicit copy constructors added with %copyctor. Previously only the fully qualified name was being
used, now the unqualified name will also be used. For example, previously:
example.i:38: Searching for a suitable 'out' typemap for: void Space::More::~More
Looking for: void Space::More::~More
Looking for: void
Now the unqualified name is also used:
example.i:38: Searching for a suitable 'out' typemap for: void Space::More::~More
Looking for: void Space::More::~More
Looking for: void ~More
Looking for: void
2012-11-02: wsfulton
Fix some subtle named output typemap lookup misses, the fully qualified name was not always being
used for variables, for example:
struct Glob {
int MyVar;
};
Previously the search rules (as shown by -debug-tmsearch) for the getter wrapper were:
example.i:44: Searching for a suitable 'out' typemap for: int MyVar
Looking for: int MyVar
Looking for: int
Now the scope is named correctly:
example.i:44: Searching for a suitable 'out' typemap for: int Glob::MyVar
Looking for: int Glob::MyVar
Looking for: int MyVar
Looking for: int
2012-10-26: wsfulton
Fix director typemap searching so that a typemap specified with a name will be correctly matched. Previously
the name was ignored during the typemap search. Applies to the following list of typemaps:
directorout, csdirectorout, cstype, imtype, ctype, ddirectorout, dtype, gotype, jtype, jni, javadirectorout.
2012-10-11: wsfulton
Most of the special variables available for use in %exception are now also available for expansion in
%extend blocks. These are: $name $symname $overname $decl $fulldecl $parentname $parentsymname, see docs
on "Class extension" in SWIGPlus.html. Patch based on submission from Kris Thielemans.
2012-10-10: wsfulton
Additional new special variables in %exception are expanded as follows:
$parentname - The parent class name (if any) for a method.
$parentsymname - The target language parent class name (if any) for a method.
2012-10-08: iant
[Go] Generating Go code now requires using the -intgosize option to
indicate the size of the 'int' type in Go. This is because the
size of the type is changing from Go 1.0 to Go 1.1 for x86_64.
2012-09-14: wsfulton
Add new warning if the empty template instantiation is used as a base class, for example:
template <typename T> class Base {};
%template() Base<int>;
class Derived : public Base<int> {};
gives the following warning instead of silently ignoring the base:
cpp_inherit.i:52: Warning 401: Base class 'Base< int >' has no name as it is an empty template instantiated with '%template()'. Ignored.
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.
2012-09-11: wsfulton
[Java] Fix #3535304 - Direct use of a weak global reference in directors
sometimes causing seg faults especially on Android.
2012-09-06: wsfulton
[Java] Fix (char *STRING, size_t LENGTH) typemaps to accept NULL string.
2012-08-26: drjoe
[R] make ExternalReference slot ref to contain reference
2012-08-26: drjoe
[R] fix Examples/Makefile to use C in $(CC) rather than $(CXX)
Version 2.0.8 (20 August 2012)
==============================
2012-08-15: wsfulton
[Perl] Add size_type, value_type, const_reference to the STL containers.
2012-08-15: wsfulton
[Python] Add discard and add methods to std::set wrappers so that pyabc.i can be used ensuring
MutableSet is a valid abstract base class for std::set. As reported by Alexey Sokolov.
Similarly for std::multiset.
2012-08-15: wsfulton
[Python] Fix #3541744 - Missing PyInt_FromSize_t calls for Python 3.
2012-08-13: wsfulton
[Java] Patch from David Baum to add the assumeoverride feature for Java directors to
improve performance when all overridden methods can be assumed to be overridden.
2012-08-05: wsfulton
[Python] #3530021 Fix unused variable warning.
2012-08-05: wsfulton
[C#] Fix #3536360 - Invalid code sometimes being generated for director methods
with many arguments.
2012-08-05: wsfulton
[Perl] #3545877 - Don't undefine bool if defined by C99 stdbool.h - problem using
Perl 5.16 and later.
2012-08-04: wsfulton
Remove incorrect warning (314) about target language keywords which were triggered
by using declarations and using directives. For example 'string' is a keyword in C#:
namespace std { class string; }
using std::string;
2012-07-21: wsfulton
Fix display of pointers in various places on 64 bit systems - only 32 bits were being shown.
2012-07-21: wsfulton
Fix gdb debugger functions 'swigprint' and 'locswigprint' to display to the gdb output window
rather than stdout. This fixes display problems in gdbtui and the ensures the output
appears where expected in other gdb based debuggers such as Eclipse CDT.
2012-07-20: kwwette
[Octave] segfault-on-exit prevention hack now preserves exit status, and uses C99 _Exit().
2012-07-02: wsfulton
Fix Debian bug http://bugs.debian.org/672035, typemap copy failure - regression introduced
in swig-2.0.5:
%include<stl.i>
using std::pair;
%template(StrPair) pair<std::string, std::string>;
2012-07-02: wsfulton
Fix using declarations combined with using directives with forward class declarations so that
types are correctly found in scope for templates. Example:
namespace Outer2 {
namespace Space2 {
template<typename T> class Thing2;
}
}
using namespace Outer2;
using Space2::Thing2;
template<typename T> class Thing2 {};
// STILL BROKEN void useit2(Thing2<int> t) {}
void useit2a(Outer2::Space2::Thing2<int> t) {}
void useit2b(::Outer2::Space2::Thing2<int> t) {}
void useit2c(Space2::Thing2<int> t) {}
namespace Outer2 {
void useit2d(Space2::Thing2<int> t) {}
}
%template(Thing2Int) Thing2<int>;
2012-06-30: wsfulton
Fix template namespace problems for symbols declared with a forward class declarations, such as:
namespace Space1 {
namespace Space2 {
template<typename T> struct YYY;
}
template<typename T> struct Space2::YYY {
T yyy(T h) {
return h;
}
};
void testYYY1(Space1::Space2::YYY<int> yy) {}
void testYYY2(Space2::YYY<int> yy) {}
void testYYY3(::Space1::Space2::YYY<int> yy) {}
}
%template(YYYInt) Space1::Space2::YYY<int>;
2012-06-30: wsfulton
Fix namespace problems for symbols declared with a forward class declarations, such as:
namespace Space1 {
namespace Space2 {
struct XXX;
struct YYY;
}
struct Space2::YYY {};
struct Space1::Space2::XXX {};
void testXXX2(Space2::XXX xx) {}
void testYYY2(Space2::YYY yy) {}
}
where xx and yy were not recognised as the proxy classes XXX and YYY.
2012-06-30: wsfulton
Fix using declarations combined with using directives with forward class declarations so that
types are correctly found in scope.
namespace Outer2 {
namespace Space2 {
class Thing2;
}
}
using namespace Outer2;
using Space2::Thing2;
class Thing2 {};
// None of the methods below correctly used the Thing2 proxy class
void useit2(Thing2 t) {}
void useit2a(Outer2::Space2::Thing2 t) {}
void useit2b(::Outer2::Space2::Thing2 t) {}
void useit2c(Space2::Thing2 t) {}
namespace Outer2 {
void useit2d(Space2::Thing2 t) {}
}
2012-06-25: wsfulton
Fix using declarations combined with using directives so that types are correctly found in scope.
Example:
namespace Outer2 {
namespace Space2 {
class Thing2 {};
}
}
using namespace Outer2; // using directive
using Space2::Thing2; // using declaration
void useit2(Thing2 t) {}
Similarly for templated classes.
2012-05-29: wsfulton
Fix #3529601 - seg fault when a protected method has the "director"
feature but the parent class does not. Also fix similar problems with
the allprotected feature.
2012-05-28: wsfulton
Fix seg fault when attempting to warn about an illegal destructor - #3530055, 3530078 and #3530118.
Version 2.0.7 (26 May 2012)
===========================
2012-05-26: wsfulton
std::string typemap modifications so they can be used with %apply for other string
classes.
2012-05-25: wsfulton
[Lua] Fixes for -external-runtime to work again.
2012-05-22: szager
[python] Disambiguate SWIG_From_unsigned_SS_int and SWIG_From_unsigned_SS_long.
2012-05-18: olly
[PHP] Fix getters for template members. (SF#3428833, SF#3528035)
2012-05-14: wsfulton
Fix some language's std::map wrappers to recognise difference_type, size_type, key_type
and mapped_type.
2012-05-14: kwwette (signed off by xavier98)
[Octave] Prevent Octave from seg-faulting at exit when SWIG
modules are loaded, due to bugs in Octave's cleanup code:
* Wrapping functions now declared with Octave DEFUN_DLD macro,
and loaded through Octave's dynamic module loader
* Global variables of swigref type are now assigned a new()
copy of the swigref class, to prevent double-free errors
* SWIG module at-exit cleanup function now created in Octave
through eval(), so not dependent on loaded .oct library
* For Octave versions 3.1.* to 3.3.*, register C-level at-exit
function which terminates Octave immediately (with correct
status code) without performing memory cleanup. This function
can be controlled with macros in Lib/octave/octruntime.swg
[Octave] New syntax for determing whether SWIG module should be
loaded globally or non-globally. To load module "example" globally,
type the module name
$ example;
as before; to load module non-globally, assign it to a variable:
$ example = example;
or
$ ex = example;
for a shorter (local) module name. -global/-noglobal command-line
options and module command line are deprecated. Added usage info
to module, so typing
$ help example
or incorrect usage should display proper usage, with examples.
*** POTENTIAL INCOMPATIBILITY ***
2012-05-12: olly
[PHP] Fix memory leak in code generated for a callback. Patch from
SF bug #3510806.
2012-05-12: olly
[PHP] Avoid using zend_error_noreturn() as it doesn't work with all
builds of PHP (SF bug #3166423). Instead we now wrap it in a
SWIG_FAIL() function which we annotate as "noreturn" for GCC to
avoids warnings. This also reduces the size of the compiled
wrapper (e.g. the stripped size is reduced by 6% for Xapian's PHP
bindings).
2012-05-11: wsfulton
[Java] SF patch #3522855 Fix unintended uninitialised memory access in OUTPUT typemaps.
2012-05-11: wsfulton
[Java] SF patch #3522674 Fix possible uninitialised memory access in char **STRING_OUT
typemap.
2012-05-11: wsfulton
[Java] SF patch #3522611 Fix uninitialised size regression in char **STRING_ARRAY
introduced in swig-2.0.6.
2012-05-11: wsfulton
SF bug #3525050 - Fix regression introduced in swig-2.0.5 whereby defining one typemap
method such as an 'out' typemap may hide another typemap method such as an 'in' typemap -
only occurs when the type is a template type where the template parameters are the same
via a typedef.
2012-05-10: olly
[PHP] Fix the constant typemaps for SWIGTYPE, etc - previously
these used the wrong name for renamed constants. Add
autodoc_runme.php to the testsuite as a regression test for this.
2012-05-02: ianlancetaylor
[Go] Remove compatibility support for gccgo 4.6. Using
SWIG with gccgo will now require gccgo 4.7. Using SWIG
with the more commonly used gc compiler is unaffected.
2012-05-01: wsfulton
Fix generated code for C forward enum declarations in some languages.
Version 2.0.6 (30 April 2012)
=============================
2012-04-25: wsfulton
[Lua] Fix uninitialised variable in SWIGTYPE **OUTPUT typemaps as reported by Jim Anderson.
2012-04-28: wsfulton
[Python] Fix compilation errors when wrapping STL containers on Mac OSX and possibly other systems.
2012-04-28: wsfulton
[Java] Patch 3521811 from Leo Davis - char **STRING_ARRAY typemaps fixed to handle
null pointers.
Version 2.0.5 (19 April 2012)
=============================
2012-04-14: wsfulton
[Lua] Apply patch #3517435 from Miles Bader - prefer to use Lua_pushglobaltable
2012-04-14: wsfulton
[Ruby] Apply patch #3517769 from Robin Stocker to fix compile error on MacRuby using RSTRING_PTR.
2012-04-13: wsfulton
Apply patch #3511009 from Leif Middelschulte for slightly optimised char * variable wrappers.
2012-04-13: wsfulton
[Lua] Apply #3219676 from Shane Liesegang which adds:
- support for %factory
- a __tostring method
- a __disown method
2012-04-13: wsfulton
[Xml] Apply #3513569 which adds a catchlist to the xml output.
2012-04-05: olly
[Lua] Add support for Lua 5.2 (patch SF#3514593 from Miles Bader)
2012-03-26: xavier98
[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)
[octave] Apply patch #3424833 from jgillis: make is_object return true for swig types
2012-03-24: wsfulton
[D] Apply #3502431 to fix duplicate symbols in multiple modules.
2012-03-21: wsfulton
Fix #3494791 - %$isglobal for %rename matching.
2012-03-20: wsfulton
Fix #3487706 and #3391906 - missing stddef.h include for ptrdiff_t when using %import
for STL containers and compiling with g++-4.6. An include of stddef.h is now only
generated when SWIG generates STL helper templates which require ptrdiff_t. If you
were previously relying on "#include <stddef.h>" always being generated when using a
%include of an STL header, you may now need to add this in manually.
2012-03-16: wsfulton
Apply patch #3392264 from Sebastien Bine to parse (unsigned) long long types in enum value assignment.
2012-03-16: wsfulton
Apply patch #3505530 from Karl Wette to allow custom allocators in STL string classes for the UTL languages.
2012-03-13: wsfulton
Apply patch #3468362 from Karl Wette to fix %include inside %define.
2012-03-13: wsfulton
[Python, Ruby, Octave, R] Fix #3475492 - iterating through std::vector wrappers of enumerations.
2012-02-27: xavier98 (patches from Karl Wette)
[Octave] Use -globals . to load global variables in module namespace
[Octave] Comment declaration of unimplemented function swig_register_director
[Octave] Fix OCTAVE_PATH in octave Makefiles
[Octave] Add support for std::list - fix li_std_containers_int test
[Octave] Fix imports test
2012-02-16: wsfulton
[Java] Make generated support functions in arrays_java.i static so that generated code
from multiple instances of SWIG can be compiled and linked together - problem reported by
Evan Krause.
2012-01-24: wsfulton
Fix crash with bad regex - bug #3474250.
2012-01-24: wsfulton
[Python] Add Python stepped slicing support to the STL wrappers (std::vector, std::list).
Assigning to a slice, reading a slice and deleting a slice with steps now work.
For example:
%template(vector_i) std::vector<int>
vi = vector_i(range(10))
print list(vi)
vi[1:4:2] = [111, 333]
print list(vi)
del vi[3:10:3]
print list(vi)
print list(vi[::-1])
gives (same behaviour as native Python sequences such as list):
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
[0, 111, 2, 333, 4, 5, 6, 7, 8, 9]
[0, 111, 2, 4, 5, 7, 8]
[8, 7, 5, 4, 2, 111, 0]
2012-01-23: klickverbot
[D] Correctly annotate function pointers with C linkage.
[D] Exception and Error have become blessed names; removed d_exception_name test case.
2012-01-20: wsfulton
[Python] Fix some indexing bugs in Python STL wrappers when the index is negative, eg:
%template(vector_i) std::vector<int>
iv=vector_i([0,1,2,3,4,5])
iv[-7:]
now returns [0, 1, 2, 3, 4, 5] instead of [5].
vv[7:9] = [22,33]
now returns [0, 1, 2, 3, 4, 5, 22, 33] instead of "index out range" error.
Also fix some segfaults when replacing ranges, eg when il is a std::list wrapper:
il[0:2] = [11]
2012-01-17: wsfulton
[Go] Fix forward class declaration within a class when used as a base.
2012-01-07: wsfulton
[C#] Add support for %nspace when using directors.
2012-01-06: wsfulton
[Java] Patch #3452560 from Brant Kyser - add support for %nspace when using directors.
2011-12-21: wsfulton
The 'directorin' typemap now accepts $1, $2 etc expansions instead of having to use workarounds -
$1_name, $2_name etc.
2011-12-20: wsfulton
[Java] Add (char *STRING, size_t LENGTH) director typemaps.
2011-12-20: wsfulton
[C#, Go, Java, D] Add support for the 'directorargout' typemap.
2011-12-20: wsfulton
[Ocaml, Octave, PHP, Python, Ruby] Correct special variables in 'directorargout' typemap.
This change will break any 'directorargout' typemaps you may have written. Please change:
$result to $1
$input to $result
Also fix the named 'directorargout' DIRECTOROUT typemaps for these languages which didn't
previously compile and add in $1, $2 etc expansion.
*** POTENTIAL INCOMPATIBILITY ***
2011-12-10: talby
[perl5] SWIG_error() now gets decorated with perl source file/line number.
[perl5] error handling now conforms to public XS api (fixes perl v5.14 issue).
2011-12-10: wsfulton
[Android/Java] Fix directors to compile on Android.
Added documentation and examples for Android.
2011-12-08: vadz
Bug fix: Handle methods renamed or ignored in the base class correctly in the derived classes
(they could be sometimes mysteriously not renamed or ignored there before).
2011-12-03: klickverbot
[D] Fix exception glue code for newer DMD 2 versions.
[D] Do not default to 32 bit glue code for DMD anymore.
[D] Use stdc.config.c_long/c_ulong to represent C long types.
2011-12-01: szager
[python] Fixed bug 3447426: memory leak in vector.__getitem__.
2011-11-30: wsfulton
[R] Remove C++ comments from generated C code.
2011-11-27: olly
[Python] Fix some warnings when compiling generated wrappers with
certain GCC warning options (Debian bug #650246).
2011-11-28: wsfulton
Fix #3433541 %typemap(in, numinputs=0) with 10+ arguments.
2011-11-28: olly
[Perl] Fix warnings when compiling generated wrappers with certain
GCC warning options (Debian bug #436711).
2011-11-28: olly
[PHP] Update keyword list to include keywords added in PHP releases up to 5.3.
2011-11-25: wsfulton
[C#] Provide an easy way to override the default visibility for the proxy class pointer
constructors and getCPtr() method. The visibility is 'internal' by default and if multiple
SWIG modules are being used and compiled into different assemblies, then they need to be
'public' in order to use the constructor or getCPtr() method from a different assembly.
Use the following macros to change the visibilities in the proxy and type wrapper class:
SWIG_CSBODY_PROXY(public, public, SWIGTYPE)
SWIG_CSBODY_TYPEWRAPPER(public, public, public, SWIGTYPE)
[Java] Provide an easy way to override the default visibility for the proxy class pointer
constructors and getCPtr() method. The visibility is 'protected' by default and if multiple
SWIG modules are being used and compiled into different packages, then they need to be
'public' in order to use the constructor or getCPtr() method from a different package.
Use the following macros to change the visibilities in the proxy and type wrapper class:
SWIG_JAVABODY_PROXY(public, public, SWIGTYPE)
SWIG_JAVABODY_TYPEWRAPPER(public, public, public, SWIGTYPE)
The default for Java has changed from public to protected for the proxy classes. Use the
SWIG_JAVABODY_PROXY macro above to restore to the previous visibilities.
*** POTENTIAL INCOMPATIBILITY ***
2011-11-22: szager
[python] Bug 3440044: #ifdef out SWIG_Python_NonDynamicSetAttr if -builtin
isn't being used, to avoid unnecessary binary incompatibilities between
python installations.
2011-11-17: wsfulton
Bug fix: Remove root directory from directory search list in Windows.
2011-11-13: wsfulton
[Ruby] Apply patch #3421876 from Robin Stocker to fix #3416818 - same class name in
different namespaces confusion when using multiple modules.
2011-11-11: wsfulton
Fix pcre-build.sh to work with non-compressed tarballs - problem reported by Adrian Blakely.
2011-11-03: wsfulton
Expand special variables in typemap warnings, eg:
%typemap(in, warning="1000:Test warning for 'in' typemap for $1_type $1_name") int "..."
2011-11-01: wsfulton
Fix named output typemaps not being used when the symbol uses a qualifier and contains
a number, eg:
%typemap(out) double ABC::m1 "..."
2011-10-24: talby
[perl5] SF bug #3423119 - overload dispatch stack corruption fix. Better, but more research
is needed on a stable path for tail calls in XS.
Also, fix for large long longs in 32 bit perl.
2011-10-13: xavier98
[octave] Allow Octave modules to be re-loaded after a "clear all".
2011-09-19: wsfulton
Fix regression introduced in swig-2.0.1 reported by Teemu Ikonone leading to uncompilable code
when using typedef and function pointer references, for example:
typedef int FN(const int &a, int b);
void *typedef_call1(FN *& precallback, FN * postcallback);
2011-09-14: wsfulton
[Lua] Patch #3408012 from Raman Gopalan - add support for embedded Lua (eLua)
including options for targeting Lua Tiny RAM (LTR).
2011-09-14: wsfulton
[C#] Add boost_intrusive_ptr.i library contribution from patch #3401571.
2011-09-13: wsfulton
Add warnings for badly named destructors, eg:
struct KStruct {
~NOT_KStruct() {}
};
cpp_extend_destructors.i:92: Warning 521: Illegal destructor name ~NOT_KStruct. Ignored.
2011-09-13: wsfulton
Fix %extend and destructors for templates. The destructor in %extend was not always wrapped,
for example:
%extend FooT {
~FooT() { delete $self; } // was not wrapped as expected
};
template<class T> class FooT {};
%template(FooTi) FooT<int>;
2011-09-13: wsfulton
Fix special variables such as "$decl" and "$fulldecl" in destructors to include the ~ character.
2011-09-10: talby
[perl5] SF bug #1481958 - Improve range checking for integer types.
Enhance li_typemaps_runme.pl
2011-09-08: wsfulton
Fix %extend on typedef classes in a namespace using the typedef name, for example:
namespace Space {
%extend CStruct {
...
}
typedef struct tagCStruct { ... } CStruct;
}
2011-08-31: xavier98
[octave] patches from Karl Wette: improvements to module loading behavior;
added example of friend operator to operator example; fixed octave panic/crash in 3.0.5;
documentation improvements
2011-08-30: szager
[python] Bug 3400486, fix error signalling for built-in constructors.
2011-08-26: wsfulton
[Go] Fix file/line number display for "gotype" when using typemap debugging options
-tmsearch and -tmused.
2011-08-26: wsfulton
[C#, D] Fix %callback which was generating uncompileable code.
2011-08-25: wsfulton
Fix constructors in named typedef class declarations as reported by Gregory Bronner:
typedef struct A {
A(){} // Constructor which was not accepted by SWIG
B(){} // NOT a constructor --illegal, but was accepted by SWIG
} B;
For C code, the fix now results in the use of 'struct A *' instead of just 'B *' in
the generated code when wrapping members in A, but ultimately this does not matter, as
they are the same thing.
2011-08-23: wsfulton
Fix %newobject when used in conjunction with %feature("ref") as reported by Jan Becker. The
code from the "ref" feature was not always being generated for the function specified by %newobject.
Documentation for "ref" and "unref" moved from Python to the C++ chapter.
2011-08-22: szager
[python] Fixed memory leak with --builtin option (bug 3385089).
2011-08-22: wsfulton
[Lua] SF patch #3394339 from Torsten Landschoff - new option -nomoduleglobal to disable installing
the module table into the global namespace. Require call also returns the module table instead
of a string.
2011-08-09: xavier98
Fix bug 3387394; Octave patches for 3.4.0 compatibility, etc. (from Karl Wette)
2011-08-04: wsfulton
Add in $symname expansion for director methods.
2011-07-29: olly
[PHP] Don't generate "return $r;" in cases where $r hasn't been set.
This was basically harmless, except it generated a PHP E_NOTICE if
the calling code had enabled them.
2011-07-26: wsfulton
Fix scoping of forward class declarations nested within a class (for C++). Previously the symbol
was incorrectly put into the outer namespace, eg