git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6285 626c5289-ae23-0410-ae9c-e8d60b6d4f22
172 lines
5.1 KiB
Text
172 lines
5.1 KiB
Text
Version 1.3.23 (in progress)
|
|
==================================
|
|
|
|
10/1/2004: mmatus
|
|
- Fix the %callback feature (only used in ruby and python examples,
|
|
by now, but it should be generic), now member callbacks
|
|
are working again
|
|
|
|
- Fix wrapping of functions pointers like
|
|
|
|
std::ostream& std::endl(std::ostream&);
|
|
|
|
ie, the ones that return references or enums.
|
|
|
|
[Python] Add the %pythoncallback directive, which is
|
|
an improved version of %callback, ie,
|
|
|
|
%pythoncallback(1) foo;
|
|
%pythoncallback(1) A::bar;
|
|
%pythoncallback(1) A::barm;
|
|
|
|
int foo(int a) {
|
|
return a;
|
|
}
|
|
|
|
struct A
|
|
{
|
|
static int bar(int a);
|
|
int barm(int a);
|
|
|
|
};
|
|
|
|
int foobar(int a, int (*pf)(int a));
|
|
|
|
in python you can use
|
|
|
|
foo(2)
|
|
foobar(2,foo)
|
|
A.bar(2)
|
|
foobar(2,A.bar)
|
|
|
|
ie, no additional pointer elements are created, and
|
|
the original 'foo' and 'A.bar' can be used as parameters.
|
|
|
|
In the case of member fucntion however, still you need
|
|
to use the special variable Class::<fnc_name>_cb_ptr, ie:
|
|
|
|
foobarm(3, a, A.barm_cb_ptr)
|
|
|
|
we will try to fix this situation also, but later.
|
|
|
|
[Python] Add more elements from the STL library, now
|
|
you can use
|
|
|
|
import std
|
|
std.cout << "hello " << 123 << std.endl
|
|
|
|
[Python] Fix in/out return mechanism, now swig will behave
|
|
as 1.3.21 but using a python list when needed. The problem
|
|
is that the types std::pair,std::vector,etc, use tuples,
|
|
and they interfer with the previous inout tuple type.
|
|
|
|
By using lists we solve the conflicts, swig acts as before,
|
|
but returns a list when more than one parameter are using
|
|
the OUT typemap. See the new inout.i example in the
|
|
test-suite.
|
|
|
|
*** POTENTIAL INCOMPATIBILITY FOR PYTHON MODULE ***
|
|
|
|
[Python] Much better error messages for bad arguments, now
|
|
you always get the argument number where the error occurred.
|
|
|
|
09/27/2004: wsfulton
|
|
Patch from Bill Clarke -
|
|
1) Warning emitted when -importall and -includeall is used together,
|
|
with -includeall taking precedence.
|
|
2) Ensure SWIGIMPORTED is always defined when a file is being
|
|
imported with %import. Note that this is not the same as SWIGIMPORT,
|
|
which gets defined in all generated wrapper files.
|
|
|
|
09/26/2004: mmatus
|
|
|
|
- add %feature("exceptionclass") to identify a class used
|
|
as exception. Before swig identified and marked a class
|
|
using the "cplus:exceptionclass" attribute. However, the
|
|
class needed to appear on an throw() statement. Now
|
|
swig keeps trying to identify the exception classes, as
|
|
before, but it also allows the user to mark a class by
|
|
using the %feature explicitly. (mostly relevant for
|
|
python and chicken)
|
|
|
|
[Python]
|
|
|
|
- fix -modern option + exceptions, which mix old class
|
|
style with the new one. So, we always need to emit
|
|
the "nonmodern" python code.
|
|
|
|
- add the "python:nondynamic" feature and its handler
|
|
|
|
now if you have
|
|
|
|
%pythonnondynamic(1) A;
|
|
|
|
struct A {
|
|
int a;
|
|
int b;
|
|
};
|
|
|
|
then, in the python side
|
|
|
|
aa = A()
|
|
|
|
aa.a = 1 # ok
|
|
aa.b = 2 # ok
|
|
aa.c = 3 # error, the class can not be extended dynamically.
|
|
|
|
|
|
Since this is a feature, you can use
|
|
|
|
%pythonnondynamic(1);
|
|
|
|
or
|
|
|
|
%pythondynamic(0);
|
|
|
|
to force all the wrapped classes to be "nondynamic" ones.
|
|
|
|
The default, as in regular python, is that all the wrapped
|
|
classes are dynamics. So, careful with your spelling.
|
|
|
|
09/14/2004: mmatus
|
|
- Support the -I- option.
|
|
|
|
- Differentiate between %include <file> and %include "file".
|
|
This fix several corner cases.
|
|
|
|
|
|
[Python] Several patches:
|
|
|
|
- Normalize the Lib file names:
|
|
*.swg internal files,
|
|
*.i user files.
|
|
|
|
- Fix Char[ANY] typemaps, so they also delete any extra '\0' chars,
|
|
now they behave as before (1.3.21). Still, you can use
|
|
the SWIG_PRESERVE_CARRAY_SIZE macro if you need to
|
|
preserve the original size (see pystrbase.swg).
|
|
|
|
- Add the Char FIXSIZE[ANY] typemaps, to preserve the
|
|
original C array sizes (see above). Though, you can't
|
|
use them yet since %apply and arrays are not working
|
|
together.
|
|
|
|
- Add pyfragments.swg, now the user can add fragments
|
|
to override the default ones.
|
|
|
|
|
|
09/10/2004: wsfulton
|
|
Patch from Bill Clarke which fixes spurious preprocessor bug which
|
|
shows on Solaris and gcc, eg:
|
|
Warning(202): Could not evaluate '!defined(SWIGJAVA) &&
|
|
!(defined(SWIGCSHARP)'
|
|
Also fixes a bug where '#if "a" == "b" == 1' wouldn't have worked
|
|
|
|
09/10/2004: wsfulton
|
|
Restored multiple build directories for the test-suite. Patch from
|
|
Bill Clarke.
|
|
|
|
09/06/2004: wsfulton
|
|
Added the missing runtime.dsp Visual Studio project files for the
|
|
import examples to work.
|
|
|