CHANGES.current 5.53 KB
Newer Older
1 2 3 4
Below are the changes for the current release.
See the CHANGES file for changes in older releases.
See the RELEASENOTES file for a summary of changes in each release.

5
Version 3.0.7 (3 Aug 2015)
6
==========================
7

8 9 10 11 12 13
2015-08-02: wsfulton
            [Java] Fix potential security exploit in generated Java classes.
            The swigCPtr and swigCMemOwn member variables in the generated Java
            classes are now declared 'transient' by default. Further details of the exploit
            in Android is being published in an academic paper as part of USENIX WOOT '15:
            https://www.usenix.org/conference/woot15/workshop-program/presentation/peles.
14

15 16 17 18 19
            In the unlikely event that you are relying on these members being serializable,
            then you will need to override the default javabody and javabody_derived typemaps
            to generate the old generated code. The relevant typemaps are in the Lib directory
            in the java.swg, boost_shared_ptr.i and boost_intrusive_ptr.i files. Copy the
            relevant default typemaps into your interface file and remove the 'transient' keyword.
20

21
            *** POTENTIAL INCOMPATIBILITY ***
22

23 24 25
2015-08-01: vadz
            Make configure --without-alllang option more useful: it can now be overridden by the following
            --with-xxx options, allowing to easily enable just one or two languages.
26

27 28 29
2015-07-30: wsfulton
            Fix #440 - Initialise all newly created arrays when using %array_functions and %array_class
            in the carrays.i library - bug is only relevant when using C++.
30

31 32
2015-07-29: wsfulton
            [Python] Improve indentation warning and error messages for code in the following directives:
33

34 35 36 37 38
              %pythonprepend
              %pythonappend
              %pythoncode
              %pythonbegin
              %feature("shadow")
39

40 41
            Old error example:
              Error: Line indented less than expected (line 3 of pythoncode)
42

43 44 45
            New error example:
              Error: Line indented less than expected (line 3 of %pythoncode or %insert("python") block)
              as no line should be indented less than the indentation in line 1
46

47 48
            Old warning example:
              Warning 740: Whitespace prefix doesn't match (line 2 of %pythoncode or %insert("python") block)
49

50 51 52
            New warning example:
              Warning 740: Whitespace indentation is inconsistent compared to earlier lines (line 3 of
              %pythoncode or %insert("python") block)
53

54 55 56 57 58 59 60 61 62 63 64
            
2015-07-28: wsfulton
            [Python] Fix #475. Improve docstring indentation handling.
            
            SWIG-3.0.5 and earlier sometimes truncated text provided in the docstring feature.
            This occurred when the indentation (whitespace) in the docstring was less in the
            second or later lines when compared to the first line.
            SWIG-3.0.6 gave a 'Line indented less than expected' error instead of truncating
            the docstring text.
            Now the indentation for the 'docstring' feature is smarter and is appropriately
            adjusted so that no truncation occurs.
65

66 67 68
2015-07-22: wsfulton
            Support for special variable expansion in typemap attributes. Example usage expansion
            in the 'out' attribute (C# specific):
69

70
              %typemap(ctype, out="$*1_ltype") unsigned int& "$*1_ltype"
71

72
            is equivalent to the following as $*1_ltype expands to 'unsigned int':
73

74
              %typemap(ctype, out="unsigned int") unsigned int& "unsigned int"
75

76
            Special variables can be used within special variable macros too. Example usage expansion:
77

78 79
              %typemap(cstype) unsigned int "uint"
              %typemap(cstype, out="$typemap(cstype, $*1_ltype)") unsigned int& "$typemap(cstype, $*1_ltype)"
80

81
            Special variables are expanded first and hence the above is equivalent to:
82

83
              %typemap(cstype, out="$typemap(cstype, unsigned int)") unsigned int& "$typemap(cstype, unsigned int)"
84

85
            which then expands to:
86

87
              %typemap(cstype, out="uint") unsigned int& "uint"
88

89 90 91 92
2015-07-22: lindleyf
	    Apply patch #439 - support for $typemap() (aka embedded typemaps or special variable
            macros) in typemap attributes. A simple example where $typemap() is expanded in the
            'out' attribute (C# specific):
93

94 95
              %typemap(cstype) unsigned int "uint"
              %typemap(cstype, out="$typemap(cstype, unsigned int)") unsigned int& "$typemap(cstype, unsigned int)"
96

97
            is equivalent to:
98

99
              %typemap(cstype, out="uint") unsigned int& "uint"
100

101 102 103 104 105
2015-07-18: m7thon
	    [Python] Docstrings provided via %feature("docstring") are now quoted and added to
            the tp_doc slot when using python builtin classes (-builtin). When no docstring is
            provided, the tp_doc slot is set to the fully qualified C/C++ class name.
            Github issues #445 and #461.
106

107 108
2015-07-17: kwwette
            [octave] Support Octave version 4.0.0 (thanks to patches from Orion Poplawski).
109

110 111 112 113 114
2015-07-07: wsfulton
	    SWIG no longer generates a wrapper for a class' constructor if that class has
            any base class with a private destructor. This is because your compiler should
            not allow a class to be instantiated if a base has a private destructor. Some
            compilers do, so if you need the old behaviour, use the "notabstract" feature, eg:
115

116 117 118
              %feature("notabstract") Derived;
              class Base {
                ~Base() {}
119
              };
120
              struct Derived : Base {};
121