summaryrefslogtreecommitdiff
path: root/CHANGES.current
blob: 7e108764ed458edbd431e2c632e487ab7d03abdf (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
Version 1.3.29 (In progress)
============================

03/04/2006: mmatus
	    - Add -O to the main program, which now enables -fastdispatch
	    
	    [Python]

	    - Add the -fastinit option to enable faster __init__
              methods. Setting 'this' as 'self.this.append(this)' in the python
	      code confuses PyLucene. Now the initialization is done in the
	      the C++ side, as reported by Andi and Robin.

	    - Add the -fastquery option to enable faster SWIG_TypeQuery via a
              python dict cache, as proposed by Andi Vajda

	    - Avoid to call PyObject_GetAttr inside SWIG_Python_GetSwigThis,
	      since this confuses PyLucene, as reported by Andi Vajda.
	    
03/02/2006: wsfulton
            [Java]
            Removed extra (void *) cast when casting pointers to and from jlong as this
            was suppressing gcc's "dereferencing type-punned pointer will break strict-aliasing rules"
            warning. This warning could be ignored in versions of gcc prior to 4.0, but now the
            warning is useful as gcc -O2 and higher optimisation levels includes -fstrict-aliasing which
            generates code that doesn't work with these casts. The assignment is simply never made.
            Please use -fno-strict-aliasing to both suppress the warning and fix the bad assembly
            code generated. Note that the warning is only generated by the C compiler, but not
            the C++ compiler, yet the C++ compiler will also generate broken code. Alternatively use 
            -Wno-strict-aliasing to suppress the warning for gcc-3.x. The typemaps affected
            are the "in" and "out" typemaps in java.swg and arrays_java.swg. Users ought to fix
            their own typemaps to do the same. Note that removal of the void * cast simply prevents
            suppression of the warning for the C compiler and nothing else. Typical change:

            From:
              %typemap(in) SWIGTYPE * %{ $1 = *($&1_ltype)(void *)&$input; %}
            To:
              %typemap(in) SWIGTYPE * %{ $1 = *($&1_ltype)&$input; %}

            From:
              %typemap(out) SWIGTYPE * %{ *($&1_ltype)(void *)&$result = $1; %} 
            To:
              %typemap(out) SWIGTYPE * %{ *($&1_ltype)&$result = $1; %} 

03/02/2006: mkoeppe
	    [Guile -scm]
	    Add typemaps for "long long"; whether the generated code compiles, however, depends
	    on the version and configuration of Guile.

03/02/2006: wsfulton
            [C#]
            Add support for inner exceptions. If any of the delegates are called which construct
            a pending exception and there is already a pending exception, it will create the new
            exception with the pending exception as an inner exception.

03/02/2006: wsfulton
            [Php]
            Added support for Php5 exceptions if compiling against Php5 (patch from Olly Betts).

03/01/2006: mmatus
	    Use the GCC visibility attribute in SWIGEXPORT.

	    Now you can compile (with gcc 3.4 or later) using
	    CFLAGS="-fvisibility=hidden".
	    
	    Check the difference for the 'std_containers.i' python 
	    test case:
 
            Sizes:

	      3305432 _std_containers.so
	      2383992 _std_containers.so.hidden

	    Exported symbols (nm -D <file>.so | wc -l):

              6146 _std_containers.so 
              174  _std_containers.so.hidden 

	    Excecution times:

	      real 0m0.050s user 0m0.039s sys 0m0.005s   _std_containers.so
              real 0m0.039s user 0m0.026s sys 0m0.007s   _std_containers.so.hidden

	    Read http://gcc.gnu.org/wiki/Visibility for more details.


02/27/2006: mutandiz
	    [allegrocl]
	    Add support for INPUT, OUTPUT, and INOUT typemaps.
	    For OUTPUT variables, the lisp wrapper returns multiple
	    values.

02/26/2006: mmatus

	    [Ruby] add argcargv.i library file.
	    
	    Use it as follow:

		%include argcargv.i
	      									 
   	        %apply (int ARGC, char **ARGV) { (size_t argc, const char **argv) } 
	      									 
   	        %inline {				
   	          int mainApp(size_t argc, const char **argv) 	
   	          {						
   	            return argc;					
   	          }
                }							
	      							
   	    then in the ruby side:					
	      								
   	        args = ["asdf", "asdf2"]				
   	        n = mainApp(args);
	

	    This is the similar to the python version Lib/python/argcargv.i

02/24/2006: mgossage

	    Small update Lua documents on troubleshooting problems
	    
02/22/2006: mmatus 

	    Fix all the errors reported for 1.3.28.
	    - fix bug #1158178
	    - fix bug #1060789
	    - fix bug #1263457
	    - fix 'const  char*&' typemap in the UTL, reported by Geoff Hutchison
	    - fixes for python 2.1 and the runtime library
	    - fix copyctor + template bug #1432125
	    - fix [ 1432152 ] %rename friend operators in namespace
	    - fix gcc warning reported by R. Bernstein
	    - avoid assert when finding a recursive scope inheritance,
	      emit a warning in the worst case, reported by Nitro 
	    - fix premature object deletion reported by Paul in tcl3d
	    - fix warning reported by Nitro in VC7
	    - more fixes for old Solaris compiler
	    - fix for python 2.3 and gc_refs issue reported by Luigi
	    - fix fastproxy for methods using kwargs
	    - fix overload + protected member issue reported by Colin McDonald
	    - fix seterrormsg as reported by Colin McDonald
	    - fix directors, now the test-suite runs again using -directors
	    - fix for friend operator and Visual studio and bug 1432152
	    - fix bug #1435090
	    - fix using + %extend as reported by William
	    - fix bug #1094964
	    - fix for Py_NotImplemented as reported by Olly and Amaury
	    - fix nested namespace issue reported by Charlie

	    and also:
	    
	    - allow director protected members by default
	    - delete extra new lines in swigmacros[UTL]
	    - cosmetic for generated python code
	    - add the factory.i library for UTL
	    - add swigregister proxy method and move __repr__ to a
	      single global module  [python]

02/22/2006: mmatus 

	    When using directors, now swig will emit all the virtual
	    protected methods by default. 

	    In previous releases, you needed to use the 'dirprot'
	    option to acheive the same.

	    If you want, you can disable the new default behaviour,
	    use the 'nodirprot' option: 

	       swig -nodirprot ...

	    and/or the %nodirector feature for specific methods, i.e.:

	       %nodirector Foo::bar;

	       struct Foo {
	         virtual ~Foo();

	       protected:
	         virtual void bar();
	       };
	    

	    As before, pure abstract protected members are allways
	    emitted, independent of the 'dirprot/nodirprot' options.


02/22/2006: mmatus
	    Add the factory.i library for languages using the UTL (python,tcl,ruby,perl).
	    
            factory.i implements a more natural wrap for factory methods. 

	    For example, if you have:							    
	    								    
  	    ----  geometry.h --------					    
  	         struct Geometry {                          		    
  	           enum GeomType{			     			    
  	             POINT,				     		    
  	             CIRCLE				     		    
  	           };					     		    
  	           					     		    
  	           virtual ~Geometry() {}    		     		    
  	           virtual int draw() = 0;				    
  	    	 							    
  	    	 //							    
  	    	 // Factory method for all the Geometry objects		    
  	    	 //							    
  	           static Geometry *create(GeomType i);     		    
  	         };					     		    
  	         					     			    
  	         struct Point : Geometry  {		     		    
  	           int draw() { return 1; }		     		    
  	           double width() { return 1.0; }    	     		    
  	         };					     		    
  	         					     			    
  	         struct Circle : Geometry  {		     		    
  	           int draw() { return 2; }		     		    
  	           double radius() { return 1.5; }          		    
  	         }; 					     		    
  	         								    
  	         //							    
  	         // Factory method for all the Geometry objects		    
  	         //							    
  	         Geometry *Geometry::create(GeomType type) {		    
  	           switch (type) {			     		    
  	           case POINT: return new Point();	     		    
  	           case CIRCLE: return new Circle(); 	     		    
  	           default: return 0;			     		    
  	           }					     		    
  	         }					    		    
  	    ----  geometry.h --------					    
	    								    
	    								    
	    You can use the %factory with the Geometry::create method as follows:
	    								    
  	      %newobject Geometry::create;				    
  	      %factory(Geometry *Geometry::create, Point, Circle);	    
  	      %include "geometry.h"					    
	    								    
  	    and Geometry::create will return a 'Point' or 'Circle' instance   
  	    instead of the plain 'Geometry' type. For example, in python:	    
	    								    
  	      circle = Geometry.create(Geometry.CIRCLE)			    
  	      r = circle.radius()						    
	    								    
  	    where 'circle' now is a Circle proxy instance.	    		    


02/17/2006: mkoeppe
	    [MzScheme] Typemaps for all integral types now accept the full range of integral
	    values, and they signal an error when a value outside the valid range is passed.
	    [Guile] Typemaps for all integral types now signal an error when a value outside
	    the valid range is passed.

02/13/2006: mgossage
            [Documents] updated the extending documents to give a skeleton swigging code
            with a few typemaps.
            [Lua] added an extra typemap for void* [in], so a function which requires a void*
            can take any kind of pointer