swig/CHANGES.current
William S Fulton d0d9eded53 no message
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7096 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-03-21 22:43:50 +00:00

332 lines
15 KiB
Text

Version 1.3.25 (In progress)
============================
03/21/2005: wsfulton
[Perl] SF #1124490. Fix Perl macro clashes when using Visual Studio's STL string,
so now projects can #include <string>.
03/21/2005: wsfulton
Fixed %varargs which got broken with the recent default argument changes.
Also works for Java and C# for the first time now.
03/17/2005: wuzzeb (John Lenz)
[Chicken]
+ Fix a whole bunch of bugs in the chicken module. The entire
test suite now compiles, with the exception of the tests that require
std_vector.i, std_deque.i, and so on, which chicken does not have yet.
+ Add support for %exception and %typemap(exceptions). Exceptions are
thrown with a call to (abort) and can be handled by (handle-exceptions)
03/15/2005: wsfulton
[Java] Patch from Scott Michel for directors. Modifications to the typemaps
giving users fine control over memory ownership and lifetime of director classes.
Director classes no longer live forever by default as they are now collectable
by the GC.
03/15/2005: wuzzeb (John Lenz)
[Chicken] Add support for adding finalizers garbage collected objects.
Functions that return new objects should be marked with %newobject and
input arguments which consume (or take ownership) of a pointer should
be marked with the DISOWN typemap.
Also add support for correctly checking the number of arguments passed
to a function, and raising an error if the wrong number are passed.
03/14/2005: wuzzeb (John Lenz)
Add --without-alllang option to configure.in, which is the same as
passing all the --without-python --without-perl5 etc... that Matthias added.
03/09/2005: wsfulton
[Php] Memory leak fix for functions returning classes/structs by value.
03/08/2005: wsfulton
[Perl] Fix for Perl incorrectly taking memory ownership for return types that
are typedefs to a struct/class pointer. Reported by Josh Cherry.
03/07/2005: wsfulton
[C#] Various exception changes for the std::vector wrappers. These now more
accurately mirror the same exceptions that System.Collections.ArrayList throw.
03/07/2005: wsfulton
[C#] Fix undefined behaviour after any of the std::vector methods
throw an exception.
03/07/2005: wsfulton
[C#] When null is passed for a C++ reference or value parameter, the
exception thrown has been corrected to an ArgumentNullException instead
of NullReferenceException as recommended in the .NET Framework documentation.
The default throws typemaps turn a C++ exception into an ApplicationException,
not a SystemException now.
03/07/2005: wsfulton
[C#] Numerous changes in C# exception handling have been made over the past
few weeks. A summary follows:
The way in which C++ exceptions are mapped to C# exceptions is quite different.
The change is to fix C# exceptions so that the C++ exception stack is correctly
unwound as previously C++ exceptions were being thrown across the C PInvoke layer
into the managed world.
New typemap attributes (canthrow and excode) have been introduced to control the
mapping of C++ to C# exceptions. Essentially a callback into the unmanaged world
is made to set a pending exception. The exception to throw is stored in thread local
storage (so the approach is thread-safe). The typemaps are expected to return
from unmanaged code as soon as the pending exception is set. Any pending exceptions
are checked for and thrown once managed code starts executing. There should
be minimal impact on execution speed during normal behaviour. Full details will be
documented in CSharp.html.
The SWIG_CSharpThrowException() function has been removed and replaced with
SWIG_CSharpSetPendingExceptionArgument(). The name has been deliberately changed
to break old code as the old approach was somewhat flawed. Any user defined
exceptions that follow the same pattern as the old approach should also be fixed.
Numerous new .NET framework exceptions are now available for easy throwing from
unmanaged code. The complete list is:
ApplicationException, ArithmeticException, DivideByZeroException,
IndexOutOfRangeException, InvalidOperationException, IOException,
NullReferenceException, OutOfMemoryException, OverflowException,
SystemException, ArgumentException, ArgumentNullException and
ArgumentOutOfRangeException.
05/05/2005: mmatus
Fix several memory leaks around. Even when we survive knowning
swig is a memory leak factory, it was a little out of
control. To run std_containers.i in the python test-suite,
swig was using ~260MB, now it uses 'only' ~40MB, which is
the same ammount that g++ uses, so, is not that bad.
In the process, I found a couple of extra Deletes, which
in some cases could trigger seg. faults and/or
DOH/asserts.
[python] Better support for directors + exception. More
verbose errors and added an unexpected exception handler.
[python] Fix memory leak for the
std::vector<std::vector<int> >
case,reported by Bo Peng.
[python] Fix SwigPyObject compare problem reporte by
Cameron Patrick.
[python] Fix several warnings in the generated code
for gnu-gcc, Intel and VC7.1 compilers.
02/25/2005: wuzzeb (John Lenz)
Update documentation to use CSS and <div> instead of <blockquote>
I used a script to convert the docs, and it set all the box classes
to be "code". There are actually 4 different classes,
"shell", "code", "targetlang", and "diagram". We need to go through
and convert the divs depending on what they contain.
02/23/2005: mmatus
[Python] Added option -nortti to disable the use of native
C++ RTTI with directors (dynamic_cast<> is not used).
Add more code for directors to detect and report errors in
the python side.
Extend the use of SWIGINTERN whenever is possible.
Remove template warnings reported by VC7.1.
Remove warnings reported by gcc/g++. Finally you can
compile using
g++ -W -Wall -c mymodule_wrap.cxx
and no spurious errors will be generated in the wrapper
code.
02/23/2005: wuzzeb (John Lenz)
Added -external-runtime argument. This argument is used to dump
out all the code needed for external access to the runtime system,
and it replaces including the files directly. This change adds
two new virtual functions to the Language class, which are used
to find the language specific runtime code. I also updated
all languages that use the runtime to implement these two functions.
02/22/2005: mmatus
Fix %template + private error SF#1099976.
02/21/2005: mmatus
Fix swigrun.swg warnings reported when using "gcc -W -Wall"
(static/inline not used in front of a function
declaration), and add SWIGUNUSED attribute to avoid
unused warnings elsewhere.
Fix unused variable warnings.
[Python] Use new SWIGUNUSED attribute to avoid warnings in
SWIGINTERN methods.
[Python] Fix PyOS_snprintf for python versions < 2.2 (SF #1104919).
[Python] Fix map/multimap to allow empty maps (reported by
Philippe Hetroy).
[Docs] Add some documentation to Python.html and
SWIGPlus.html, including for example the fact that
'friends' are now supported.
02/21/2005: wsfulton
[PHP] Patch from Olly Betts, so that wrappers compile with Zend thread safety enabled.
02/17/2005: wsfulton
Memory leak fix in some of the scripting language modules when using default
arguments in constructors. The scripting language was not taking ownership of the
C++ object memory when any of the constructors that use default arguments was called.
02/16/2005: wsfulton
SF #1115055: Failed make install. Patch from Rob Stone.
02/16/2005: wsfulton
[Java] SF #1123416 from Paul Moore. Correct memory allocation for STRINGARRAY
typemaps in various.i.
02/15/2005: wsfulton
Disabled typemap search changes for now (see entry 19/12/2004). It breaks
old typemaps, lengthens the execution time by about 25% and introduces
inconsistencies.
02/15/2005: wsfulton
swig -help follows other software by printing to stdout instead of stderr now.
swig -version also displays to stdout instead of stderr now.
Behaviour reported by Torsten Landschoff.
02/15/2005: wsfulton
[Ruby] Fix for the less commonly used ordering of %include and #include, so
that the generated code compiles. Bug reported by reported by Max Bowsher.
%include foo.h
%{
#include foo.h
%}
02/15/2005: wsfulton
[C#, Java] SWIG_exception macro will now return from unmanaged code / native code
as soon as it is called. Fixes possible JVM crashes and other code unexpectedly
being executed. Note SWIG_exception is only occasionally used by SWIG library
writers, and is best avoided by SWIG users.
02/15/2005: wsfulton
[C#, Java] Typemaps can now be targeted at global variable names
and static member variable names. Previously the typemaps for
the setters were ignored, for example:
%typemap(in) int globalint "..."
int globalint;
02/13/2005: mkoeppe (Matthias Koeppe)
[Guile] Add %typecheck for SWIGTYPE, add %typecheck for ptrdiff_t, fix
typemaps for size_t.
[Pike] Merge patch from Torsten Landschoff for improved Pike configuration.
02/12/2005: mkoeppe (Matthias Koeppe)
New configure switches --without-tcl, --without-python etc. allow to
disable the search for installed languages.
01/31/2005: wuzzeb (John Lenz)
- Add DohSortList to DOH
- Improve the runtime type system:
+ Speed. Type loading is now O(n log n) instead of O(N^2), which
for large modules is a huge improvement.
+ A whole bunch of functions in swigrun.swg no longer need the
swig_type_list_handle passed to them. The only one left is
TypeQuery. This also makes runtime.swg a lot smaller.
+ Split up swig_type_info structure into two structures
(swig_type_info and swig_cast_info)
+ Store a pointer to a swig_type_info rather than just the type
name string in the linked list of casts. First off, this makes
the guile module a little faster, and second, the
SWIG_TypeClientData() function is faster too.
+ Add the idea of a module into the type system. Before, all the
types were stored in one huge linked list. Now, another level is
added, and the type system stores a linked list of modules, each
of which stores an array of types associated with it.
+ For more information of how the runtime type system now works,
please see Doc/Manual/typemaps.html and Doc/Devel/runtime.txt
- Update all language modules to use the new type system. The changes
to each language module are minor. All languages are now able to
use runtime.swg for external access to the type system. Before
only python and perl did.
- [guile, mzscheme, ocaml, and php4] These languages opened up the
init function inside the .cxx code, and any code in the .swg files
in the init section was inside this function. This was a problem
for swiginit.swg, which needs to be inserted before the SWIG_init
function is opened. Thus I changed these languages to be like
python or perl, where the init function is declared in the .swg
file.
- [Ruby] Instead of moving the init function to the .swg file, I
added a new section initbeforefunc, and then added
%insert(initbeforefunc) "swiginit.swg"
- [MzScheme] Fix enums and fix Examples/Makefile.in so that if
multiple -I arguments are specified in the INCLUDES variable, each
gets a ++ccf.
- [Guile GH] Update Guile GH to use the new type system. See
Doc/Manual/Guile.html for how smobs are now used.
01/11/2005: wsfulton
[C#] New typemap called 'csconstruct'. The code in this typemaps was previously hard
coded and could not be customised by a user. This typemap contains the code that is
generated into a proxy class's constructor.
[Java] New typemap called 'javaconstruct'. The code in this typemaps was previously hard
coded and could not be customised by a user. This typemap contains the code that is
generated into a proxy class's constructor. Another typemap named 'javaconstruct_director'
is used instead when the proxy class is a director class.
[C#, Java] If a C++ class did not have a default constructor, a protected default constructor
was automatically generated by SWIG. This seems is unnecessary and has been removed
and thereby giving the user almost complete control over the generated code along with the
new typemaps above.
19/12/2004: mmatus
[Disabled, see entry 02/15/2004]
- Fix typemap search, now the "out" typemap search is done as follows
int *Foo::foo(int bar) -> int *Foo::foo(int bar)
-> int *Foo::foo
-> int *foo(int bar)
-> int *foo
-> int *
then, now you can be more specific, and define
/* apply only for 'Foo::foo' method */
%typemap(out) int * Foo::foo(int *bar) ...;
/* apply for all 'foo' functions/methods */
%typemap(out) int * foo(int *bar) ...;
%inline {
struct Foo {
int *foo(int *bar);
};
}
15/12/2004: mmatus
- More fixes for templates and template default args.
See template_default.i for scary cases that now are
supported, besides the already ugly STL/std cases.
- Cosmetics and more use of 'const' where it was implicit.
- Other fixes for OSS, which is now working again with 1.3.25.