3
3
See CHANGES.current for current version.
5
Version 1.3.34 (27 February 2008)
6
=================================
9
[R] Fix wrapping of global function pointer variables.
12
Add new special variables for use within %exception:
13
$wrapname - language specific wrapper name
14
$overname - if a method is overloaded this contains the extra mangling used on
16
$decl - the fully qualified C/C++ declaration of the method being wrapped
17
without the return type
18
$fulldecl - the fully qualified C/C++ declaration of the method being wrapped
19
including the return type
22
[R] Now setting S4 flag in SWIG created objects. This
23
fixes R-SWIG for 2.6 and warning for 2.6 failure has been removed.
26
[Lua] Added a patch by Torsten Landschoff to fix the unary minus issue
27
Ran 'astyle --style=kr -2' across lua.cxx to neaten it up
30
Bump SWIG_RUNTIME_VERSION to 4. This is because of the recently introduced API
31
change in the conversion functions, ie change in definition of swig_converter_func.
32
Anyone calling SWIG_TypeCast must pass in a valid value for the new additional
33
(third) parameter and then handle the newly created memory if the returned value
34
is set to SWIG_CAST_NEW_MEMORY else a memory leak will ensue.
37
[Python] Experimental shared_ptr typemaps added. Usage is the same as the recently
38
added Java and C# shared_ptr typemaps. Two macros are available, although these
39
may well change in a future version:
41
For base classes or classes not in an inheritance chain:
42
SWIG_SHARED_PTR(PROXYCLASS, TYPE)
44
SWIG_SHARED_PTR_DERIVED(PROXYCLASS, BASECLASSTYPE, TYPE)
46
The PROXYCLASS is the name of the proxy class, but is only required for Java/C#.
49
%include "boost_shared_ptr.i"
51
SWIG_SHARED_PTR(Klass, Space::Klass)
52
SWIG_SHARED_PTR_DERIVED(KlassDerived, Space::Klass, Space::KlassDerived)
56
struct KlassDerived : Klass { ... };
59
Further details to follow in future documentation, but the following features
62
- Not restricted to boost::shared_ptr, eg std::tr1::shared_ptr can also be used.
63
- Available typemap groups:
64
(a) Typemaps for shared_ptr passed by value, reference, pointer and pointer
66
- (b) Typemaps for passing by raw value, raw pointer, raw reference, raw pointer
68
- The code being wrapped does not even have to use shared_ptr, SWIG can use
69
shared_ptr as the underlying storage mechanism instead of a raw pointer due to
70
the typemaps in group (b) above.
71
- No array support as shared_ptr does not support arrays.
72
- This works quite differently to the usual SWIG smart pointer support when
73
operator-> is parsed by SWIG:
74
- An additional smart pointer class is not generated reducing code bloat in
76
- Using smart pointers and raw pointers can be mixed seamlessly.
77
- Missing constructors for the smart pointers is no longer a problem and so
78
separate factory type functions do not have to be written and wrapped.
79
- The implicit C++ shared_ptr< derived class > to shared_ptr< base class >
80
cast also works in the target language. This negates the necessity to write
81
an explicit helper cast function providing the upcast which would need
82
calling prior to passing a derived class to a method taking a shared_ptr to
86
[Python] Add support for overriding the class registration function via a new
87
"smartptr" feature. This is a very low level of customisation most users
88
would never need to know. The feature will typically be used for intrusive
89
smart pointers along with additional typemaps. Example usage of the feature:
91
%feature("smartptr", noblock=1) Foo { boost::shared_ptr< Foo > }
94
The generated Foo_swigregister function will then register boost::shared < Foo >
95
(SWIGTYPE_p_boost__shared_ptrTFoo_t instead of SWIGTYPE_p_Foo) as the underlying
96
type for instantiations of Foo.
99
Features now supports the optional 'noblock' attribute for all usage of %feature.
100
When specified, the { } braces are removed from the feature code. This is identical
101
in behaviour to usage of 'noblock' in typemaps and is used when the preprocessor
102
is required to operate on the code in the feature and the enclosing { } braces
103
are not required. Example:
106
%feature("smartptr", noblock="1") { FOO::bar }
108
The preprocessor then reduces this as if this had been used instead:
110
%feature("smartptr") "foo::bar"
113
[Python] Fix format string bug (SF#1882220).
116
Additions to the %types directive. Now the conversion / casting code can be
117
overridden to some custom code in the %types directive, like so:
119
%types(fromtype = totype) %{
120
... code to convert fromtype to totype and return ...
123
The special variable $from will be replaced by the name of the parameter of the
124
type being converted from. The code must return the totype cast to void *. Example:
128
Date &Time::dateFromTime();
130
%types(Time = Date) %{
131
Time *t = (Time *)$from;
132
Date &d = t->dateFromTime();
136
resulting in the conversion / casting code looking something like:
138
static void *_p_TimeTo_p_Date(void *x) {
140
Date &d = t->dateFromTime();
144
This is advanced usage, please use only if you understand the runtime type system.
147
Small update to documentation in Typemaps.html, to warn about use of local
148
variables in typemaps for multiple types.
151
[Java] Fix bug reported by Kevin Mills in ARRAYSOFCLASSES typemaps where any
152
changes made to an array element passed from Java to C are not reflected back
156
More updates to the configure script for detecting lua.
157
Also looks in /usr/include/lua*
158
Also changed typemaps.i not to check for NULL before freeing a pointer
161
[Python] For STL containers, SWIG no longer attempts to convert from one
162
STL container to another, eg from std::vector<int> to std::vector<double>
163
or std::list<int> to std::vector<int> or even std::vector<Foo> to
164
std::vector<Bar> as it previously did. In fact SWIG no longer attempts to
165
convert any SWIG wrapped C++ proxy class that is also a Python sequence,
166
whereas previously it would. Any non-SWIG Python sequence will still be
167
accepted wherever an STL container is accepted. Overloaded methods using
168
containers should be faster.
171
[C#] Add 'directorinattributes' and 'directoroutattributes' typemap attributes
172
for the imtype typemap. These should contain C# attributes which will
173
be generated into the C# director delegate methods.
176
Fix handling of byte value 255 in input files on platforms where
177
char is signed (it was getting mapped to EOF). Fixes SF#1518219.
180
Fix template member variables wrapped by a smart pointer. Bug reported
184
Substantial changes to configure script for detecting lua.
185
Code can now link to liblua.a, liblua50.a or liblua51.a
186
It's also a lot neater now.
189
[Perl] Backed out #1798728 - numbers can be passed to functions taking char *
192
Fix #1832613 - Templates and some typedefs involving pointers or function pointers
195
[Java] Fix #1632625 - Compilation errors on Visual C++ 6 when using directors.
198
[Perl] Fix #1798728 - numbers can be passed to functions taking char *.
201
Fix #1819847 %template with just one default template parameter
203
template<typename T = int> class Foo {...};
204
%template(FooDefault) Foo<>;
207
[Lua] Small correction on Lua.html
210
Apply patch #1838248 from Monty Taylor for vpath builds of SWIG.
213
[Lua] Fixes to remove gcc-4.2 warnings
216
Fix #1734415 - template template parameters with default arguments such as:
218
template<typename t_item, template<typename> class t_alloc = pfc::alloc_fast >
219
class list_t : public list_impl_t<t_item,pfc::array_t<t_item,t_alloc> > { ... };
222
[lua] Fix a bug in the class hierachy code, where the methods were not propagated,
223
if the name ordering was in a certain order.
224
Added new example programs (dual, embed) and runtime tests for test-suite.
227
Fix using statements using a base class method where the methods were overloaded.
228
Depending on the order of the using statements and method declarations, these
229
were previously generating uncompileable wrappers, eg:
231
struct Derived : Base {
236
Version 1.3.33 (November 23, 2007)
237
=================================
240
[allegrocl] omit private slot type info in the classes/types
241
defined on the lisp side. Fix bug in mapping of C/++ types
242
to lisp types. Fix typo in modules generated defpackage form.
243
Have std::string *'s automatically marshalled between foreign
247
[Python] Fill in Python Dictionary functions list (patch from
248
Jelmer Vernooij posted to swig-devel).
251
Fixed a bug in the C scanner related to backslash characters.
254
[Perl] Fix broken compilation of C++ wrappers on some compilers.
257
[Python] Don't pass Py_ssize_t for a %d printf-like format as
258
that's undefined behaviour when sizeof(Py_ssize_t) != sizeof(int).
5
260
Version 1.3.32 (November 15, 2007)
6
261
==================================