summaryrefslogtreecommitdiff
path: root/CHANGES.current
blob: 19989e1ef3be5c888ce1a09e21c7763325cfb5c6 (plain)
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
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.
Issue # numbers mentioned below can be found on Github. For more details, add
the issue number to the end of the URL: https://github.com/swig/swig/issues/

Version 3.0.11 (29 Dec 2016)
============================

2016-12-30: olly
	    [PHP7] Register internal 'swig_runtime_data_type_pointer' constant
	    as "CONST_PERSISTENT" to avoid segmentation fault on module unload.
	    Fixes https://github.com/swig/swig/issues/859 reported by Timotheus
	    Pokorra - thanks also to Javier Torres for a minimal reproducer.

2016-12-24: wsfulton
            [C#] Add %feature("csdirectordelegatemodifiers") to enable customization
            of the delegate access modifiers generated in director classes.
            Fixes issue #748.

2016-12-23: wsfulton
            [Python] Fix builtin "python:slot" feature failing for tp_hash when using
            hashfunc closure with a "Wrong type for hash function" for Python 2.
            Issue #843.

2016-12-21: joequamt
            Changed generation of functions so that only functions
            that end in _set generate accessor functions rather than
	    looking for "set".
	    Change generation of operators to not have underscores
	    to start in R. Users need to provide custom names for these operator overloads.

2016-12-21: olly
	    Fix isfinite() checks to work with all C++11 compilers.
	    Fixes issues #615, #788 and #849.

2016-12-20: wsfulton
            %namewarn unnecessarily caused keyword warnings for non-instantiated template classes
            and duplicate warnings for instantiated template classes when keywords were used.
            Issue #845.

2016-12-18: ezralanglois 
            [Python, Ruby, Octave] Memory leak fix on error in std::pair wrappers.
            Issue #851.

2016-12-18: wsfulton
            Zero initialize arrays when using %array_class and %array_functions.

2016-12-18: t-ikegami
            [Python] Fix #446
            Python %array_class of carrays.i failed with -builtin option.

2016-12-16: bcaine
            [Guile] Patch #744 Added support for Guile's native pointer functionality

2016-12-01: wsfulton
            [Python] Issue #769.
            Add optional moduleimport attribute to %module so that the
            default module import code can be overridden. See the "Searching for the wrapper module"
            documentation in Python.html. Example:

              %module(moduleimport="import _foo") foo

            $module also expands to the low-level C/C++ module name, so the following is the
            same as above

              %module(moduleimport="import $module") foo

2016-11-30: olly
	    [PHP] Add support for PHP7.  PHP5's C extension API has changed
	    substantially so you need to use -php7 to specify you want PHP7
	    compatible wrappers.  The default extension for generated wrappers
	    is now .cxx (to match SWIG's default for every other language - to
	    generate foo_wrap.cpp you can run SWIG with -cppext cpp).  Fixes
	    issue #571.

	    As part of this change, the language subdirectory for PHP5 has
	    changed from "php" to "php5" - if you are making use of the search
	    path feature where the language subdirectory of each directory
	    is also searched, you'll need to update your bindings.  A simple
	    fix which works for older and newer SWIG is to add a symlink:
	    ln -s php php5

	    *** POTENTIAL INCOMPATIBILITY ***

2016-11-30: olly
	    [PHP] Only emit one copy of each distinct arginfo.  Previously we
	    emitted a separate one for every wrapped function, but typically
	    many functions have the same number of parameters and combinations
	    of parameters passed by reference or not.

	    This change significantly reduces both the size of the generated
	    wrapper, and of the compiled PHP extension module (e.g. by ~6% for
	    the stripped extension module for Xapian's PHP7 bindings).

2016-11-28: wsfulton
            Fix %rename override of wildcard %rename for templates. For example:

              %rename(GlobalIntOperator) *::operator bool; // wildcard %rename

              %rename(XIntOperator) X::operator bool; // fix now overrides first %rename above
              OR
              %rename(XIntOperator) X<int>::operator bool; // fix now overrides first %rename above

              template<typename T> struct X {
                operator bool();
                ...
              };
              %template(Xint) X<int>;

            This also fixes %rename override of global %rename for templates. For example:

              // Global rename to make all functions start with a lower case letter
              %rename("%(firstlowercase)s", %$isfunction ) "";
              %rename(woohoo) W::Woo; // fix now overrides above %rename

              template<typename T> struct W {
                W Woo();
                ...
              };
              %template(Wint) W<int>;

            The above also introduces a possibly unexpected change. Many of the STL containers
            provided by SWIG use %rename to rename some methods, eg in std::vector, push_back
            is renamed to add in Java. Previously this intended rename did not happen when using
            using global %rename rules and the method would remain as push_back, but is now
            renamed to add. Some more info in issue #856.

	    *** POTENTIAL INCOMPATIBILITY ***

2016-11-26: m7thon
            [Python] Issue #709 - improved wrapping of division operators
            'from __future__ import division' now works in Python 2 whether or not the
            -py3 flag is used.

2016-11-12: joequant
            [R] Issue #697 - fix comma issue with overload methods

2016-11-12: joequant
	    [R] Issue #555 - R runtime needs stdio.h

2016-11-02: wsfulton
            [Python] Issue #816 - fix compilation error when using -extranative and -builtin.

2016-11-02: liorgold
            Patch #741 - Add support for C++11 alias templates, see updated CPlusPlus11.html
            documentation.

2016-10-30: myd7349
            [C#] Patch #740 Add std_array.i for C# for wrapping std::array.

            Patch also enhances std::vector<std::wstring> C# wrappers with additional functions
            (Contains, IndexOf, LastIndexOf and Remove).

2016-10-30: tobilau
            [Java] Fix wrappers for wstring parameters in director methods to cleanup local
            ref after director callback has finished.

2016-10-23: wsfulton
            [C#] Add missing csdirectorin VOID_INT_PTR and csdirectorout VOID_INT_PTR typemaps.

2016-10-23: jiulongw
            Patch #781 - Fix wrapping of C compound expressions containing char constants
            in quotes such as:

              #define H_SUPPRESS_SCALING_MAGIC (('s'<<24) | ('u'<<16) | ('p'<<8) | 'p')

              enum DifferentTypes {
                typecharcompound='A'+1,
                typecharcompound2='B' << 2
              };

2016-10-13: wsfulton
            [Python] Issue #808 - fix Python pickling and metaclass for builtin wrappers.

            The metaclass (SwigPyObjectType) for SWIG objects was not defined in
            a way that let importlib successfully import the Python wrappers.
            The pickle module previously failed to pickle objects because it couldn't
            determine what module the SWIG wrapped objects were in.

2016-09-29: wsfulton
            [Allegrocl, CFFI, GO, Javascript, Ocaml, R, Scilab]
            Add missing support for the "ret" typemap in a few target languages.
            The documentation also now has info on the "ret" typemap.

2016-09-27: ahmed-usman
            [xml] Handle template parameters correctly.

2016-09-27: dontpanic92
            [Go] Fix argument names in inherited functions taking more than 8
            parameters.  Fixes #795.

2016-09-26: smarchetto
            [Scilab] mlists that map pointers can be given a custom type name.

2016-09-25: wsfulton
            Patch #793 from q-p to expand exception handling to include std::bad_cast
            in std_except.i.

2016-09-24: olly
            [PHP] Fix code generated for feature("director:except") -
            previously the return value of call_user_function() was ignored and
            we checked an uninitialised value instead.  Fixes #627.  Based on
            patch from Sergey Seroshtan.

2016-09-22: wsfulton
            [Python] More flexible python builtin slots for overloaded C++ function.

            The closure names used for builtin slots are mangled with their functype so
            that overloaded C++ method names can be used for multiple slots.
            For example:

              %feature("python:slot", "mp_subscript", functype="binaryfunc") SimpleArray::__getitem__;
              %feature("python:slot", "sq_item", functype="ssizeargfunc") SimpleArray::__getitem__(Py_ssize_t n);

            will generate closures:

              SWIGPY_SSIZEARGFUNC_CLOSURE(_wrap_SimpleArray___getitem__) /* defines _wrap_SimpleArray___getitem___ssizeargfunc_closure */
              SWIGPY_BINARYFUNC_CLOSURE(_wrap_SimpleArray___getitem__) /* defines _wrap_SimpleArray___getitem___binaryfunc_closure */

            Previously only one name was defined: _wrap_SimpleArray___getitem___closure.
            Hence the overloaded __getitem__ method can be used to support both mp_subscript and sq_item slots.

2016-09-17: wsfulton
            [Python] Fix iterators for containers of NULL pointers (or Python None) when using
            -builtin. Previously iteration would stop at the first element that was NULL.

2016-09-16: olly
            [Javascript] Fix SWIG_exception() macro to return from the current
            function.  Fixes #789, reported by Julien Dutriaux.

2016-09-16: olly
            [PHP] Fix SWIG_exception() macro to return from the current function.
            Fixes #240, reported by Sergey Seroshtan.

2016-09-12: xypron
            [C#] Patch #786 Keyword rename to be CLS compliant by adding an underscore
            suffix instead of an underscore prefix to the C symbol name. Please use an explicit
            %rename to rename the symbol with a _ prefix if you want the old symbol name.

            *** POTENTIAL INCOMPATIBILITY ***

2016-09-09: olly
            [Python] Fix import handling for Python 2.6 to work in a frozen
            application.  Fixes #145, reported by Thomas Kluyver.

2016-09-02: smarchetto
            [Scilab] Pointers are mapped to mlist instead of tlist
            (mlist better for scilab overloading)

2016-09-02: olly
            [PHP] Fix "out" typemap for member function pointers and "in"
            typemap for char INPUT[ANY].

2016-09-01: wsfulton
            [Python] More efficient Python slicing.
            Call reserve for container types that support it to avoid repeated
            memory reallocations for new slices or slices that grow in size.

2016-09-01: wsfulton
            [Python] #771 - Make builtin types hashable by default.
            Default hash is the underlying C/C++ pointer. This matches up with testing for
            equivalence (Py_EQ in SwigPyObject_richcompare) which compares the pointers.

2016-08-22: wsfulton
            [Python] The following builtin slots can be customized like other slots via the
            "python:<x>" and "python:slot" features where <x> is the appropriate slot name:
              tp_allocs
              tp_bases
              tp_basicsize
              tp_cache
              tp_del
              tp_dealloc
              tp_flags
              tp_frees
              tp_getset
              tp_is_gc
              tp_maxalloc
              tp_methods
              tp_mro
              tp_new
              tp_next
              tp_prev
              tp_richcompare
              tp_subclasses
              tp_weaklist
              was_sq_ass_slice
              was_sq_slice

            A few documentation improvements for slot customization.

2016-08-09: joequant
            [R] Patch #765 Fix extern "C" header includes for C++ code.

2016-08-05: olly
            [xml] Fix how the output filename is built to avoid problems when
            it contains the embedded strings ".c", ".cpp" or ".cxx".
            Fixes #540 reported by djack42.

2016-07-01: wsfulton
            Fix corner case of wrapping std::vector of T pointers where a pointer to a pointer of T
            also exists in the wrapped code. SF Bug 2359417 (967).

2016-06-26: wkalinin
            [Java, C#] Patch #681 Fix seg fault when ignoring nested classes.

2016-06-25: mromberg
            [Python] #711 Fix -castmode and conversion of signed and unsigned integer types.
            See 2015-12-23 CHANGES entry for details of these improvements when they were
            implemented for the default options (ie not using -castmode).

2016-06-25: ahnolds
            Patch #730 - Fix %implicitconv for overloaded functions when using
            -castmode or -fastdispatch options.

            The result is that in all overload cases where there are multiple possibilities
            with the same number of arguments, the dispatch function will first check for
            exact (aka non implicit) matches, and then subsequently check for implicit
            casting matches. This was already happening in the normal dispatch situation,
            and in the -fastdispatch case two passes through the candidates were happening,
            just with SWIG_POINTER_IMPLICIT_CONV always set. After this patch, it is not set
            on the first pass, and then set on the second pass.

2016-06-25: liorgold
            Patch #727 - Add support for C++11 type aliasing.