This repository has been archived by the owner on Aug 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGES
20309 lines (15275 loc) · 776 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 CHANGES.current for current version.
Version 1.3.39 (21 March 2009)
==============================
2009-03-19: bhy
[Python] Fix the memory leak related to Python 3 unicode and C char* conversion,
which can be shown in the following example before this fix:
from li_cstring import *
i=0
while True:
i += 1
n = str(i)*10
test3(n)
This fix affected SWIG_AsCharPtrAndSize() so you cannot call this function with
a null alloc and non-null cptr argument in Python 3, otherwise a runtime error
will be raised.
2009-03-18: wsfulton
[C#] std::vector<T> wrapper improvements for .NET 2 and also providing the
necessary machinery to use the std::vector<T> wrappers with more advanced features such
as LINQ - the C# proxy class now derives from IEnumerable<>. The default is now to
generate code requiring .NET 2 as a minimum, although the C# code can be compiled
for .NET 1 by defining the SWIG_DOTNET_1 C# preprocessor constant. See the
std_vector.i file for more details.
*** POTENTIAL INCOMPATIBILITY ***
2009-03-12: wsfulton
[Ruby] Fix #2676738 SWIG generated symbol name clashes.
2009-03-01: bhy
[Python] Some fixes for Python 3.0.1 and higher support. In 3.0.1, the C API function
PyObject_Compare is removed, so PyObject_RichCompareBool is used for replacement.
Struct initilization of SwigPyObject and SwigPyObject_as_number changed to reflect
the drop of tp_compare and nb_long.
2009-03-01: bhy
[Python] Fix SF#2583160. Now the importer in Python shadow wrapper take care of the
case that module already imported at other place.
2009-02-28: bhy
[Python] Fix SF#2637352. Move struct declaration of SWIG_module in pyinit.swg before
the method calls, since some C compiler don't allow declaration in middle of function
body.
2009-02-21: wsfulton
[Allegrocl] Fix seg fault wrapping some constant variable (%constant) types.
2009-02-20: wsfulton
[CFFI] Fix seg faults when for %extend and using statements.
2009-02-20: wsfulton
Fix SF #2605955: -co option which broke in 1.3.37.
2009-02-20: wsfulton
New %insert("begin") section added. Also can be used as %begin. This is a new
code section reserved entirely for users and the code within the section is generated
at the top of the C/C++ wrapper file and so provides a means to put custom code
into the wrapper file before anything else that SWIG generates.
2009-02-17: wsfulton
'make clean-test-suite' will now run clean on ALL languages. Previously it only
ran the correctly configured languages. This way it is now possible to clean up
properly after running 'make partialcheck-test-suite'.
2009-02-14: wsfulton
Extend attribute library support for structs/classes and the accessor functions use
pass/return by value semantics. Two new macros are available and usage is identical
to %attribute. These are %attributeval for structs/classes and %attributestring for
string classes, like std::string. See attribute.swg for more details.
2009-02-13: wsfulton
Add support for %extend and memberin typemaps. Previously the memberin typemaps were
ignored for member variables within a %extend block.
2009-02-12: wsfulton
Remove unnecessary temporary variable when wrapping return values that are references.
Example of generated code for wrapping:
struct XYZ {
std::string& refReturn();
};
used to be:
std::string *result = 0 ;
...
{
std::string &_result_ref = (arg1)->refReturn();
result = (std::string *) &_result_ref;
}
Now it is:
std::string *result = 0 ;
...
result = (std::string *) &(arg1)->refReturn();
2009-02-08: bhy
Change the SIZE mapped by %pybuffer_mutable_binary and %pybuffer_binary in pybuffer.i from
the length of the buffer to the number of items in the buffer.
2009-02-08: wsfulton
Fix %feature not working for conversion operators, reported by Matt Sprague, for example:
%feature("cs:methodmodifiers") operator bool "protected";
2009-02-07: wsfulton
[MzScheme] Apply #2081967 configure changes for examples to build with recent PLT versions.
Also fixes Makefile errors building SWIG executable when mzscheme package is installed
(version 3.72 approx and later).
2009-02-04: talby
[Perl] Fix SF#2564192 reported by David Kolovratnk.
SWIG_AsCharPtrAndSize() now handles "get" magic.
Version 1.3.38 (31 January 2009)
================================
2009-01-31: bhy
[Python] Fix SF#2552488 reported by Gaetan Lehmann. Now %pythonprepend
and %pythonappend have correct indentation.
2009-01-31: bhy
[Python] Fix SF#2552048 reported by Gaetan Lehmann. The parameter list
of static member function in generated proxy code should not have the
'self' parameter.
2009-01-29: wsfulton
Fix regression introduced in 1.3.37 where the default output directory
for target language specific files (in the absence of -outdir) was no
longer the same directory as the generated c/c++ file.
2009-01-28: wsfulton
[Java, C#] Fix proxy class not being used when the global scope operator
was used for parameters passed by value. Reported by David Piepgrass.
2009-01-15: wsfulton
[Perl] Fix seg fault when running with -v option, reported by John Ky.
Version 1.3.37 (13 January 2009)
================================
2009-01-13: mgossage
[Lua] Added contract support for requiring that unsigned numbers are >=0
Rewrote much of Examples/Lua/embed3.
Added a lot to the Lua documentation.
2009-01-13: wsfulton
Fix compilation error when using directors on protected virtual overloaded
methods reported by Sam Hendley.
2009-01-12: drjoe
[R] Fixed handling of integer arrays
2009-01-10: drjoe
[R] Fix integer handling in r to deal correctly with signed
and unsigned issues
2009-01-10: wsfulton
Patch #1992756 from Colin McDonald - %contract not working for classes
in namespace
2009-01-05: olly
Mark SWIGPERL5, SWIGPHP5, and SWIGTCL8 as deprecated in the source
code and remove documentation of them.
2008-12-30: wsfulton
Bug #2430756. All the languages now define a macro in the generated C/C++
wrapper file indicating which language is being wrapped. The macro name is the
same as those defined when SWIG is run, eg SWIGJAVA, SWIGOCTAVE, SWIGCSHARP etc
and are listed in the "Conditional Compilation" section in the documentation.
2008-12-23: wsfulton
[Java] Fix #2153773 - %nojavaexception was clearing the exception feature
instead of disabling it. Clearing checked Java exceptions also didn't work.
The new %clearjavaexception can be used for clearing the exception feature.
2008-12-22: wsfulton
Fix #2432801 - Make SwigValueWrapper exception safe for when copy constructors
throw exceptions.
2008-12-21: wsfulton
Apply patch #2440046 which fixes possible seg faults for member and global
variable char arrays when the strings are larger than the string array size.
2008-12-20: wsfulton
The ccache compiler cache has been adapted to work with SWIG and
named ccache-swig. It now works with C/C++ compilers as well as SWIG
and can result in impressive speedups when used to recompile unchanged
code with either a C/C++ compiler or SWIG. Documentation is in CCache.html
or the installed ccache-swig man page.
2008-12-12: wsfulton
Apply patch from Kalyanov Dmitry which fixes parsing of nested structs
containing comments.
2008-12-12: wsfulton
Fix error message in some nested struct and %inline parsing error situations
such as unterminated strings and comments.
2008-12-07: olly
[PHP] Fix warnings when compiling generated wrapper with GCC 4.3.
2008-12-06: wsfulton
[PHP] Deprecate %pragma(php4). Please use %pragma(php) instead.
The following two warnings have been renamed:
WARN_PHP4_MULTIPLE_INHERITANCE -> WARN_PHP_MULTIPLE_INHERITANCE
WARN_PHP4_UNKNOWN_PRAGMA -> WARN_PHP_UNKNOWN_PRAGMA
*** POTENTIAL INCOMPATIBILITY ***
2008-12-04: bhy
[Python] Applied patch SF#2158938: all the SWIG symbol names started with Py
are changed, since they are inappropriate and discouraged in Python
documentation (from http://www.python.org/doc/2.5.2/api/includes.html):
"All user visible names defined by Python.h (except those defined by
the included standard headers) have one of the prefixes "Py" or "_Py".
Names beginning with "_Py" are for internal use by the Python implementation
and should not be used by extension writers. Structure member names do
not have a reserved prefix.
Important: user code should never define names that begin with "Py" or "_Py".
This confuses the reader, and jeopardizes the portability of the user
code to future Python versions, which may define additional names beginning
with one of these prefixes."
Here is a brief list of what changed:
PySwig* -> SwigPy*
PyObject_ptr -> SwigPtr_PyObject
PyObject_var -> SwigVar_PyObject
PySequence_Base, PySequence_Cont, PySequence_Ref ->
SwigPySequence_Base, SwigPySequence_Cont, SwigPySequence_Ref
PyMap* -> SwigPyMap*
We provided a pyname_compat.i for backward compatibility. Users whose code having
these symbols and do not want to change it could simply include this file
at front of your code. A better solution is to run the converting tool on
your code, which has been put in SWIG's SVN trunk (Tools/pyname_patch.py) and
you can download it here:
https://swig.svn.sourceforge.net/svnroot/swig/trunk/Tools/pyname_patch.py
*** POTENTIAL INCOMPATIBILITY ***
2008-12-02: wsfulton
[Python] Apply patch #2143727 from Serge Monkewitz to fix importing base classes
when the package option is specified in %module and that module is %import'ed.
2008-11-28: wsfulton
[UTL] Fix #2080497. Some incorrect acceptance of types in the STL, eg a double * element
passed into a vector<int *> constructor would be accepted, but the ensuing behaviour
was undefined. Now the type conversion correctly raises an exception.
2008-11-24: wsfulton
Add -outcurrentdir option. This sets the default output directory to the current
directory instead of the path specified by the input file. This option enables
behaviour similar to c/c++ compilers. Note that this controls the output directory,
but only in the absence of the -o and/or -outdir options.
2008-11-23: wsfulton
[ruby] Apply patch #2263850 to fix ruby/file.i ... rubyio.h filename change in
ruby 1.9.
2008-11-23: wsfulton
Apply patch #2319790 from Johan Hake to fix shared_ptr usage in std::tr1 namespace.
2008-11-21: wsfulton
The use of the include path to find the input file is now deprecated.
This makes the behaviour of SWIG the same as C/C++ compilers in preparation
for use with ccache.
2008-11-16: wsfulton
Fix -nopreprocess option to:
- correctly report file names in warning and error messages.
- use the original input filename that created the preprocessed output when
determining the C++ wrapper file name (in the absence of -o). Previously
the name of the input file containing the preprocessed output was used.
2008-11-11: wsfulton
[Java] Add patch #2152691 from MATSUURA Takanori which fixes compiles using the
Intel compiler
2008-11-01: wsfulton
Add patch #2128249 from Anatoly Techtonik which corrects the C/C++ proxy
class being reported for Python docstrings when %rename is used.
2008-11-01: wsfulton
Add the strip encoder patch from Anatoly Techtonik #2130016. This enables an
easy way to rename symbols by stripping a commonly used prefix in all the
function/struct names. It works in the same way as the other encoders, such as
title, lower, command etc outlined in CHANGES file dated 12/30/2005. Example
below will rename wxAnotherWidget to AnotherWidget and wxDoSomething to
DoSomething:
%rename("%(strip:[wx])s") "";
struct wxAnotherWidget {
void wxDoSomething();
};
2008-09-26: mutandiz
[allegrocl]
Lots of test-suite work.
- Fix ordering of wrapper output and %{ %} header output.
- Fix declarations of local vars in C wrappers.
- Fix declaration of defined constants in C wrappers.
- Fix declaration of EnumValues in C wrappers.
- add some const typemaps to allegrocl.swg
- add rename for operator bool() overloads.
2008-09-25: olly
[PHP5] Fill in typemaps for SWIGTYPE and void * (SF#2095186).
2008-09-22: mutandiz (Mikel Bancroft)
[allegrocl]
- Support wrapping of types whose definitions are not seen by
SWIG. They are treated as forward-referenced classes and if a
definition is not seen are treated as (* :void).
- Don't wrap the contents of unnamed namespaces.
- More code cleanup. Removed some extraneous warnings.
- start work on having the allegrocl mod pass the cpp test-suite.
2008-09-19: olly
[PHP5] Add typemaps for long long and unsigned long long.
2008-09-18: wsfulton
[C#] Added C# array typemaps provided by Antti Karanta.
The arrays provide a way to use MarshalAs(UnmanagedType.LPArray)
and pinning the array using 'fixed'. See arrays_csharp.i library file
for details.
2008-09-18: wsfulton
Document the optional module attribute in the %import directive,
see Modules.html. Add a warning for Python wrappers when the
module name for an imported base class is missing, requiring the
module attribute to be added to %import, eg
%import(module="FooModule") foo.h
2008-09-18: olly
[PHP5] Change the default input typemap for char * to turn PHP
Null into C NULL (previously it was converted to an empty string).
The new behaviour is consistent with how the corresponding output
typemap works (SF#2025719).
If you want to keep the old behaviour, add the following typemap
to your interface file (PHP's convert_to_string_ex() function does
the converting from PHP Null to an empty string):
%typemap(in) char * {
convert_to_string_ex($input);
$1 = Z_STRVAL_PP($input);
}
2008-09-18: olly
[PHP5] Fix extra code added to proxy class constructors in the case
where the only constructor takes no arguments.
2008-09-18: olly
[PHP5] Fix wrapping of a renamed enumerated value of an enum class
member (SF#2095273).
2008-09-17: mutandiz (Mikel Bancroft)
[allegrocl]
- Fix how forward reference typedefs are handled, so as not to conflict
with other legit typedefs.
- Don't (for now) perform an ffitype typemap lookup when trying to
when calling compose_foreign_type(). This is actually a useful thing
to do in certain cases, the test cases for which I can't currently
locate :/. It's breaking some wrapping behavior that is more commonly
seen, however. I'll readd in a more appropriate way when I can
recreate the needed test case, or a user complains (which means
they probably have a test case).
- document the -isolate command-line arg in the 'swig -help' output.
It was in the html docs, but not there.
- small amount of code cleanup, removed some unused code.
- some minor aesthetic changes.
2008-09-12: bhy
[Python] Python 3.0 support branch merged into SWIG trunk. Thanks to
Google Summer of Code 2008 for supporting this project! By default
SWIG will generate interface files compatible with both Python 2.x
and 3.0. And there's also some Python 3 new features that can be
enabled by passing a "-py3" command line option to SWIG. These
features are:
- Function annotation support
Also, the parameter list of proxy function will be generated,
even without the "-py3" option. However, the parameter list
will fallback to *args if the function (or method) is overloaded.
- Buffer interface support
- Abstract base class support
For details of Python 3 support and these features, please see the
"Python 3 Support" section in the "SWIG and Python" chapter of the SWIG
documentation.
The "-apply" command line option and support of generating codes
using apply() is removed. Since this is only required by very old
Python.
This merge also patched SWIG's parser to solve a bug. By this patch,
SWIG features able to be correctly applied on C++ conversion operator,
such like this:
%feature("shadow") *::operator bool %{ ... %}
2008-09-02: richardb
[Python] Commit patch #2089149: Director exception handling mangles
returned exception. Exceptions raised by Python code in directors
are now passed through to the caller without change. Also, remove
the ": " prefix which used to be added to other director exceptions
(eg, those due to incorrect return types).
2008-09-02: wsfulton
[Python] Commit patch #1988296 GCItem multiple module linking issue when using
directors.
2008-09-02: wsfulton
[C#] Support for 'using' and 'fixed' blocks in the 'csin' typemap is now
possible through the use of the pre attribute and the new terminator attribute, eg
%typemap(csin,
pre=" using (CDate temp$csinput = new CDate($csinput)) {",
terminator=" } // terminate temp$csinput using block",
) const CDate &
"$csclassname.getCPtr(temp$csinput)"
See CSharp.html for more info.
2008-09-01: wsfulton
[CFFI] Commit patch #2079381 submitted by Boris Smilga - constant exprs put into
no-eval context in DEFCENUM
2008-08-02: wuzzeb
[Chicken,Allegro] Commit Patch 2019314
Fixes a build error in chicken, and several build errors and other errors
in Allegro CL
2008-07-19: wsfulton
Fix building of Tcl examples/test-suite on Mac OSX reported by Gideon Simpson.
2008-07-17: wsfulton
Fix SF #2019156 Configuring with --without-octave or --without-alllang
did not disable octave.
2008-07-14: wsfulton
[Java, C#] Fix director typemaps for pointers so that NULL pointers are correctly
marshalled to C#/Java null in director methods.
2008-07-04: olly
[PHP] For std_vector.i and std_map.i, rename empty() to is_empty()
since "empty" is a PHP reserved word. Based on patch from Mark Klein
in SF#1943417.
2008-07-04: olly
[PHP] The deprecated command line option "-make" has been removed.
Searches on Google codesearch suggest that nobody is using it now
anyway.
2008-07-04: olly
[PHP] The SWIG cdata.i library module is now supported.
2008-07-03: olly
[PHP] The deprecated command line option "-phpfull" has been
removed. We recommend building your extension as a dynamically
loadable module.
2008-07-02: olly
[PHP4] Support for PHP4 has been removed. The PHP developers are
no longer making new PHP4 releases, and won't even be providing
patches for critical security issues after 2008-08-08.
2008-07-02: olly
[Python] Import the C extension differently for Python 2.6 and
later so that an implicit relative import doesn't produce a
deprecation warning for 2.6 and a failure for 2.7 and later.
Patch from Richard Boulton in SF#2008229, plus follow-up patches
from Richard and Haoyu Bai.
Version 1.3.36 (24 June 2008)
=============================
06/24/2008: wsfulton
Remove deprecated -c commandline option (runtime library generation).
06/24/2008: olly
[PHP] Fix assertion failure when handling %typemap(in,numinputs=0)
(testcase ignore_parameter).
06/24/2008: olly
[PHP] Fix segfault when wrapping a non-class function marked with
%newobject (testcase char_strings).
06/22/2008: wsfulton
[Java] Add a way to use AttachCurrentThreadAsDaemon instead of AttachCurrentThread
in director code. Define the SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON macro, see
Lib/java/director.swg.
06/21/2008: wsfulton
[Ruby] Fix crashing in the STL wrappers (reject! and delete_if methods)
06/19/2008: wsfulton
[Java, C#] C# and Java keywords will be renamed instead of just issuing a warning
and then generating uncompileable code. Warning 314 gives the new name when a
keyword is found.
06/19/2008: wsfulton
[R] Keyword handling added. R Keywords will be renamed as necessary.
Warning 314 gives the new name when a keyword is found.
06/17/2008: mgossage
[Lua] Added missing support for bool& and bool*. Added runtest for li_typemaps testcase.
(Bug #1938142)
06/07/2008: bhy
Added test case keyword_rename, then made the keyword renaming works properly
by fixing Swig_name_make() for a incomplete condition checking.
06/02/2008: wsfulton
[Java, C#] Fix enum wrappers when using -noproxy.
05/30/2008: bhy
Added std::wstring into Lib/typemaps/primtypes.swg, since it is also a primitive
type in SWIG - fixed SF #1976978.
05/29/2008: wsfulton
[Java, C#] Fix variable wrappers when using -noproxy.
05/29/2008: bhy
[Python] Fixed a typo of %#ifdef in Lib/python/pycontainer.swg, which is related
to -extranative SWIG option - SF #1971977.
05/20/2008: wsfulton
New partialcheck makefile targets for partial testing of the test-suite. These
just invoke SWIG, ie no compilation and no runtime testing. It can be faster
when developing by just doing a directory diff of the files SWIG generates
against those from a previous run. Example usage from the top level directory:
make partialcheck-test-suite
make partialcheck-java-test-suite
This change also encompasses more flexibility in running the test-suite, eg
it is possible to prefix the command line which runs any target language test
with a tool. See the RUNTOOL, COMPILETOOL and SWIGTOOL targets in the common.mk
file and makefiles in the test-suite directory. For example it is possible to
run the runtime tests through valgrind using:
make check RUNTOOL="valgrind --leak-check=full"
or invoke SWIG under valgrind using:
make check SWIGTOOL="valgrind --tool=memcheck"
05/19/2008: drjoe
[R] Fixed define that was breaking pre-2.7. Checked in
patch from Soren Sonnenburg that creates strings in
version independent way
05/15/2008: wsfulton
[Java] Fix variable name clash in directors - SF #1963316 reported by Tristan.
05/14/2008: wsfulton
Add an optimisation for functions that return objects by value, reducing
the number of copies of the object that are made. Implemented using an
optional attribute in the "out" typemap called "optimal". Details in
Typemaps.html.
05/11/2008: olly
[PHP] Check for %feature("notabstract") when generating PHP5 class
wrapper.
05/11/2008: wsfulton
Fix SF #1943608 - $self substitution in %contract, patch submitted by
Toon Verstraelen.
05/09/2008: olly
[PHP] Fix char * typemaps to work when applied to signed char * and
unsigned char * (uncovered by testcase apply_strings).
05/09/2008: wsfulton
Fix wrapping of char * member variables when using allprotected mode.
Bug reported by Warren Wang.
05/09/2008: olly
[PHP] Fix bad PHP code generated when wrapping an enum in a
namespace (uncovered by testcase arrays_scope).
05/09/2008: olly
[PHP] SWIG now runs the PHP testsuite using PHP5, not PHP4. PHP4
is essentially obsolete now, so we care much more about solid PHP5
support.
05/07/2008: wsfulton
STL fixes when using %import rather than %include and the Solaris Workshop
compiler and the Roguewave STL.
05/07/2008: wsfulton
Fix wrapping of overloaded protected methods when using allprotected mode.
Bug reported by Warren Wang.
05/03/2008: wsfulton
Commit patch #1956607 to add -MT support from Richard Boulton.
This patch mirrors the gcc -MT option which allows one to change the default
Makefile target being generated when generating makefiles with the -M family
of options. For example:
$ swig -java -MM -MT overiddenname -c++ example.i
overiddenname: \
example.i \
example.h
04/30/2008: mgossage
[Lua] Removed generation of _wrap_delete_XXXXX (wrappered destructor)
which was unused and causing warning with g++ -Wall.
Removed other unused warning in typemaps.i and other places.
Added Examples/lua/embed3, and run tests a few test cases.
04/24/2008: olly
[Python] Fix generated code for IBM's C++ compiler on AIX (patch
from Goeran Uddeborg in SF#1928048).
04/24/2008: olly
Rename BSIZE in Examples/test-suite/arrays_scope.i to BBSIZE to
avoid a clash with BSIZE defined by headers on AIX with Perl
(reported in SF#1928048).
04/20/2008: wsfulton
Add the ability to wrap all protected members when using directors.
Previously only the virtual methods were available to the target language.
Now all protected members, (static and non-static variables, non-virtual methods
and static methods) are wrapped when using the allprotected mode. The allprotected
mode is turned on in the module declaration:
%module(directors="1", allprotected="1") modulename
Version 1.3.35 (7 April 2008)
=============================
04/07/2008: wsfulton
[Lua] Add missing pointer reference typemaps
04/06/2008: wsfulton
Fix stack overflow when using typemap warning suppression, eg
%warnfilter(SWIGWARN_TYPEMAP_CHARLEAK_MSG)
04/05/2008: wsfulton
[Python] Fix shared_ptr typemaps so that %pythonnondynamic can be used. Also corrects
display of the proxy class type. Reported by Robert Lupton.
04/04/2008: olly
[Python] Add %newobject reference to python memory management subsection of manual
(patch from mdbeachy in SF#1894610).
03/27/2008: wsfulton
[Python] Fix shared_ptr typemaps where the pointer type is a templated type with
with more than one parameter. Reported by Robert Lupton.
03/27/2008: mgossage
[Lua] Added a typemap DISOWN for SWIGTYPE* and SWIGTYPE[], and support for %delobject feature.
Added Examples/lua/owner which demonstrates the use of the memory management.
03/26/2008: wsfulton
[Java] Apply patch #1844301 from Monty Taylor to suppress enum constructor
unused warnings.
03/26/2008: wsfulton
[Python] Apply patch #1924524 from Casey Raymondson which ensures the
"No constructor defined" message is displayed when attempting to call a
constructor on a class that doesn't have a constructor wrapper, eg if
the C++ class is abstract.
03/26/2008: wsfulton
[Python] Apply patch #1925702 from Casey Raymondson which removes warning 512
for std::vector wrappers.
03/26/2008: olly
[Python] Apply GCC 4.3 warnings patch from Philipp Thomas
(SF#1925122).
03/21/2008: wsfulton
[Python] Thread safety patch for STL iterators from Abhinandan Jain.
03/17/2008: mgossage
[Lua] Added %luacode feature to add source code into wrappers.
Updated documentation to document this.
Added Examples/lua/arrays to show its use (and typemaps)
03/17/2008: olly
Fix nonportable sed usage which failed on Mac OS X (and probably
other platforms). Fixes SF#1903612.
03/17/2008: olly
Fix memory leak in SWIG's parser (based on patch from Russell
Bryant in SF#1914023).`
03/12/2008: wsfulton
Fix bug #1878285 - unnecessary cast for C struct creation wrappers.
03/12/2008: wsfulton
[Python] Remove debugging info when using shared_ptr support
03/06/2008: mgossage
[Lua] Updated documentation for Lua exceptions.
Added Examples/lua/exception and Examples/lua/embed2.
Small updates to the typemaps.
03/04/2008: wsfulton
[Java, C#] Add char *& typemaps.
03/04/2008: wsfulton
Fix occasional seg fault when attempting to report overloaded methods as being ignored.
02/29/2008: wsfulton
[Perl] Fix #1904537 Swig causes a Perl warning "x used only once" in Perl 5.10
reported by Ari Jolma
02/29/2008: wsfulton
[Python] Add shared_ptr varin/varout typemaps for wrapping global variables.
02/25/2008: wsfulton
Fix $wrapname to work in %exception (fixes some wrap:name assertions)
Version 1.3.34 (27 February 2008)
=================================
02/13/2008: wsfulton
[R] Fix wrapping of global function pointer variables.
02/13/2008: wsfulton
Add new special variables for use within %exception:
$wrapname - language specific wrapper name
$overname - if a method is overloaded this contains the extra mangling used on
the overloaded method
$decl - the fully qualified C/C++ declaration of the method being wrapped
without the return type
$fulldecl - the fully qualified C/C++ declaration of the method being wrapped
including the return type
02/12/2008: drjoe
[R] Now setting S4 flag in SWIG created objects. This
fixes R-SWIG for 2.6 and warning for 2.6 failure has been removed.
02/11/2008: mgossage
[Lua] Added a patch by Torsten Landschoff to fix the unary minus issue
Ran 'astyle --style=kr -2' across lua.cxx to neaten it up
02/10/2008: wsfulton
Bump SWIG_RUNTIME_VERSION to 4. This is because of the recently introduced API
change in the conversion functions, ie change in definition of swig_converter_func.
Anyone calling SWIG_TypeCast must pass in a valid value for the new additional
(third) parameter and then handle the newly created memory if the returned value
is set to SWIG_CAST_NEW_MEMORY else a memory leak will ensue.
02/09/2008: wsfulton
[Python] Experimental shared_ptr typemaps added. Usage is the same as the recently
added Java and C# shared_ptr typemaps. Two macros are available, although these
may well change in a future version:
For base classes or classes not in an inheritance chain:
SWIG_SHARED_PTR(PROXYCLASS, TYPE)
For derived classes:
SWIG_SHARED_PTR_DERIVED(PROXYCLASS, BASECLASSTYPE, TYPE)
The PROXYCLASS is the name of the proxy class, but is only required for Java/C#.
Example usage:
%include "boost_shared_ptr.i"
SWIG_SHARED_PTR(Klass, Space::Klass)
SWIG_SHARED_PTR_DERIVED(KlassDerived, Space::Klass, Space::KlassDerived)
namespace Space {
struct Klass { ... };
struct KlassDerived : Klass { ... };
}
Further details to follow in future documentation, but the following features
should be noted:
- Not restricted to boost::shared_ptr, eg std::tr1::shared_ptr can also be used.
- Available typemap groups:
(a) Typemaps for shared_ptr passed by value, reference, pointer and pointer
reference.
- (b) Typemaps for passing by raw value, raw pointer, raw reference, raw pointer
reference.
- The code being wrapped does not even have to use shared_ptr, SWIG can use
shared_ptr as the underlying storage mechanism instead of a raw pointer due to
the typemaps in group (b) above.
- No array support as shared_ptr does not support arrays.
- This works quite differently to the usual SWIG smart pointer support when
operator-> is parsed by SWIG:
- An additional smart pointer class is not generated reducing code bloat in
the wrappers.
- Using smart pointers and raw pointers can be mixed seamlessly.
- Missing constructors for the smart pointers is no longer a problem and so
separate factory type functions do not have to be written and wrapped.
- The implicit C++ shared_ptr< derived class > to shared_ptr< base class >
cast also works in the target language. This negates the necessity to write
an explicit helper cast function providing the upcast which would need
calling prior to passing a derived class to a method taking a shared_ptr to
a base class.
02/09/2008: wsfulton
[Python] Add support for overriding the class registration function via a new
"smartptr" feature. This is a very low level of customisation most users
would never need to know. The feature will typically be used for intrusive
smart pointers along with additional typemaps. Example usage of the feature:
%feature("smartptr", noblock=1) Foo { boost::shared_ptr< Foo > }
class Foo {};
The generated Foo_swigregister function will then register boost::shared < Foo >
(SWIGTYPE_p_boost__shared_ptrTFoo_t instead of SWIGTYPE_p_Foo) as the underlying
type for instantiations of Foo.
02/09/2008: wsfulton
Features now supports the optional 'noblock' attribute for all usage of %feature.
When specified, the { } braces are removed from the feature code. This is identical
in behaviour to usage of 'noblock' in typemaps and is used when the preprocessor
is required to operate on the code in the feature and the enclosing { } braces
are not required. Example:
#define FOO foo
%feature("smartptr", noblock="1") { FOO::bar }
The preprocessor then reduces this as if this had been used instead:
%feature("smartptr") "foo::bar"
02/01/2008: olly
[Python] Fix format string bug (SF#1882220).
01/31/2008: wsfulton
Additions to the %types directive. Now the conversion / casting code can be
overridden to some custom code in the %types directive, like so:
%types(fromtype = totype) %{
... code to convert fromtype to totype and return ...
%}
The special variable $from will be replaced by the name of the parameter of the
type being converted from. The code must return the totype cast to void *. Example:
class Time;
class Date;
Date &Time::dateFromTime();
%types(Time = Date) %{
Time *t = (Time *)$from;
Date &d = t->dateFromTime();
return (void *) &d;
%}
resulting in the conversion / casting code looking something like:
static void *_p_TimeTo_p_Date(void *x) {
Time *t = (Time *)x;
Date &d = t->dateFromTime();
return (void *) &d;
}
This is advanced usage, please use only if you understand the runtime type system.
01/30/2008: mgossage
Small update to documentation in Typemaps.html, to warn about use of local
variables in typemaps for multiple types.
01/25/2008: wsfulton
[Java] Fix bug reported by Kevin Mills in ARRAYSOFCLASSES typemaps where any
changes made to an array element passed from Java to C are not reflected back
into Java.
01/24/2008: mgossage
More updates to the configure script for detecting lua.
Also looks in /usr/include/lua*
Also changed typemaps.i not to check for NULL before freeing a pointer
01/21/2008: wsfulton
[Python] For STL containers, SWIG no longer attempts to convert from one
STL container to another, eg from std::vector<int> to std::vector<double>
or std::list<int> to std::vector<int> or even std::vector<Foo> to
std::vector<Bar> as it previously did. In fact SWIG no longer attempts to
convert any SWIG wrapped C++ proxy class that is also a Python sequence,
whereas previously it would. Any non-SWIG Python sequence will still be
accepted wherever an STL container is accepted. Overloaded methods using
containers should be faster.
01/18/2008: wsfulton
[C#] Add 'directorinattributes' and 'directoroutattributes' typemap attributes
for the imtype typemap. These should contain C# attributes which will
be generated into the C# director delegate methods.
01/18/2008: olly
Fix handling of byte value 255 in input files on platforms where
char is signed (it was getting mapped to EOF). Fixes SF#1518219.
01/16/2008: wsfulton
Fix template member variables wrapped by a smart pointer. Bug reported
by Robert Lupton.
01/14/2008: mgossage
Substantial changes to configure script for detecting lua.
Code can now link to liblua.a, liblua50.a or liblua51.a
It's also a lot neater now.
12/16/2007: wsfulton
[Perl] Backed out #1798728 - numbers can be passed to functions taking char *
12/16/2007: wsfulton
Fix #1832613 - Templates and some typedefs involving pointers or function pointers
12/12/2007: wsfulton
[Java] Fix #1632625 - Compilation errors on Visual C++ 6 when using directors.
12/12/2007: wsfulton
[Perl] Fix #1798728 - numbers can be passed to functions taking char *.
12/12/2007: wsfulton
Fix #1819847 %template with just one default template parameter
template<typename T = int> class Foo {...};
%template(FooDefault) Foo<>;
12/12/2007: mgossage
[Lua] Small correction on Lua.html
12/09/2007: wsfulton
Apply patch #1838248 from Monty Taylor for vpath builds of SWIG.
12/08/2007: wsfulton
[Lua] Fixes to remove gcc-4.2 warnings
12/06/2007: wsfulton
Fix #1734415 - template template parameters with default arguments such as:
template<typename t_item, template<typename> class t_alloc = pfc::alloc_fast >
class list_t : public list_impl_t<t_item,pfc::array_t<t_item,t_alloc> > { ... };
12/04/2007: mgossage
[lua] Fix a bug in the class hierachy code, where the methods were not propagated,
if the name ordering was in a certain order.
Added new example programs (dual, embed) and runtime tests for test-suite.
11/30/2007: wsfulton
Fix using statements using a base class method where the methods were overloaded.
Depending on the order of the using statements and method declarations, these
were previously generating uncompileable wrappers, eg:
struct Derived : Base {
virtual void funk();
using Base::funk;
};
Version 1.3.33 (November 23, 2007)
==================================
11/21/2007: mikel
[allegrocl] omit private slot type info in the classes/types
defined on the lisp side. Fix bug in mapping of C/++ types
to lisp types. Fix typo in modules generated defpackage form.
Have std::string *'s automatically marshalled between foreign
and lisp strings.
11/20/2007: olly
[Python] Fill in Python Dictionary functions list (patch from
Jelmer Vernooij posted to swig-devel).
11/20/2007: beazley
Fixed a bug in the C scanner related to backslash characters.
11/19/2007: wsfulton
[Perl] Fix broken compilation of C++ wrappers on some compilers.
11/16/2007: olly
[Python] Don't pass Py_ssize_t for a %d printf-like format as
that's undefined behaviour when sizeof(Py_ssize_t) != sizeof(int).
Version 1.3.32 (November 15, 2007)
==================================
11/14/2007: wsfulton
[R] Package name and dll name is now the same as the SWIG module
name. It used to be the module name with _wrap as a suffix. The package
and dll names can be modified using the -package and -dll commandline
options.
*** POTENTIAL INCOMPATIBILITY ***
11/11/2007: wsfulton
[R] Add support for Windows (Visual C++ 8 tested)
11/10/2007: olly
[php] Fix makefile generated by -make (SF#1633679). Update