From 06b6f2d8c98be6d530d1e0d0925fe205dfda0387 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Wed, 3 May 2006 21:00:23 +0000 Subject: [PATCH] move 1.3.29 changes into CHANGES and add a latest changes git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9074 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/CHANGES.current | 391 ++++--------------------------------------- 1 file changed, 29 insertions(+), 362 deletions(-) diff --git a/SWIG/CHANGES.current b/SWIG/CHANGES.current index 083b01efd..e91dc817c 100644 --- a/SWIG/CHANGES.current +++ b/SWIG/CHANGES.current @@ -1,373 +1,40 @@ -Version 1.3.29 (March 21, 2006) -=============================== +Version 1.3.30 (in progress) +============================ + +05/03/2006: wsfulton + Modify typemaps so that char * can be applied to unsigned char * or signed char * + types and visa versa. 05/03/2006: efuzzyone [cffi]Thanks to Luke J Crook for this idea. - - a struct/enum/union is replaced with :pointer only if - that slot is actually a pointer to that type. So,: - struct a_struct { int x; } and - struct b_struct { a_struct struct_1; }; - will be converted as: - (cffi:defcstruct b_struct - (struct_1 a_struct)) - - Other minor fixes in lispifying names. + - a struct/enum/union is replaced with :pointer only if + that slot is actually a pointer to that type. So,: + struct a_struct { int x; } and + struct b_struct { a_struct struct_1; }; + will be converted as: + (cffi:defcstruct b_struct + (struct_1 a_struct)) + - Other minor fixes in lispifying names. + +05/02/2006: wsfulton + Fix possible redefinition of _CRT_SECURE_NO_DEPRECATE for VC++. 04/14/2006: efuzzyone [cffi] - Thanks to Thomas Weidner for the patch. - - when feature export is set (export 'foo) is - generated for every symbol - - when feature inline is set (declaim (inline foo)) is - generated before every function definition - - when feature intern_function is set - #.(value-of-intern-function "name" "nodeType" package) - is emitted instead of the plain symbol. A sample swig-lispify - is provided. - - every symbol is prefixed by it's package. + Thanks to Thomas Weidner for the patch. + - when feature export is set (export 'foo) is + generated for every symbol + - when feature inline is set (declaim (inline foo)) is + generated before every function definition + - when feature intern_function is set + #.(value-of-intern-function "name" "nodeType" package) + is emitted instead of the plain symbol. A sample swig-lispify + is provided. + - every symbol is prefixed by it's package. 04/13/2006: efuzzyone [cffi] Fixed the generation of wrappers for global variables. - Added the option [no]swig-lisp which turns on/off generation - of code for swig helper lisp macro, functions, etc. - -04/05/2006: mutandiz - [allegrocl] - Fix output typemap of char so it produces a character instead - of an integer. Also adds input/output typemaps for 'char *'. - - add command-line argument -isolate to generate an interface - file that won't interfere with other SWIG generated files that - may be used in the same application. - -03/20/2005: mutandiz - [allegrocl] - More tweaks to INPUT/OUTPUT typemaps for bool. - - Fix constantWrapper for char and string literals. - - find-definition keybindings should work in ELI/SLIME. - Output (in-package ) to lisp wrapper - instead of (in-package #.*swig-module-name*). - - slight rework of multiple return values. - - doc updates. - -03/17/2005: mutandiz - [allegrocl] - mangle names of constants generated via constantWrapper. - - When using OUTPUT typemaps and the function has a non-void - return value, it should be first in the values-list, followed - by the OUTPUT mapped values. - - Fix bug with boolean parameters, which needed to be - passed in as int values, rather than T or NIL. - -03/15/2006: mutandiz - [allegrocl] - Generate wrappers for constants when in C++ or -cwrap mode. - Make -cwrap the default, since it is most correct. Users - can use the -nocwrap option to avoid the creation of a .cxx - file when interfacing to C code. - - When in -nocwrap mode, improve the handling of converting - infix literals to prefix notation for lisp. This is very - basic and not likely to be improved upon since this only - applies to the -nocwrap case. Literals we can't figure out - will result in a warning and be included in the generated - code. - - validIdentifier now more closely approximates what may be - a legal common lisp symbol. - - Fix typemap error in allegrocl.swg - -03/12/2006: mutandiz - [allegrocl] - fix up INPUT/OUTPUT typemaps for bool. - Generate c++ style wrapper functions for struct/union members - when -cwrap option specified. - -03/10/2006: mutandiz - [allegrocl] - Fix bug in C wrapper generation introduced by last allegrocl - commit. - -03/10/2006: wsfulton - [Java] - Commit #1447337 - Delete LocalRefs at the end of director methods to fix potential leak - -03/10/2006: wsfulton - Fix #1444949 - configure does not honor --program-prefix. - Removed non-standard configure option --with-release-suffix. Fix the autoconf standard - options --program-prefix and --program-suffix which were being shown in the help, - but were being ignored. Use --program-suffix instead of --with-release-suffix now. - -03/10/2006: wsfulton - [Java] - Fix #1446319 with patch from andreasth - more than one wstring parameter in director methods - -03/07/2006: mkoeppe - [Guile] - Fix for module names containing a "-" in non-"shadow" mode. - Patch from Aaron VanDevender (#1441474). - -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 .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 + Added the option [no]swig-lisp which turns on/off generation + of code for swig helper lisp macro, functions, etc.