git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8919 626c5289-ae23-0410-ae9c-e8d60b6d4f22
203 lines
6.8 KiB
Text
203 lines
6.8 KiB
Text
Version 1.3.29 (In progress)
|
|
============================
|
|
03/01/2006: mmatus
|
|
Use the GCC visibility attribute in SWIGEXPORT.
|
|
|
|
Now you can compile (with gcc 4.0 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
|
|
|