git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7718 626c5289-ae23-0410-ae9c-e8d60b6d4f22
261 lines
8 KiB
Text
261 lines
8 KiB
Text
Version 1.3.27 (October 15, 2005)
|
|
=================================
|
|
|
|
10/25/2005: mmatus
|
|
|
|
- Perl, complete the DISOWN typemap.
|
|
|
|
- added the attribute.i file to the unified typemap
|
|
library (before was only usable from python).
|
|
|
|
- uniform the names for the setter and getter methods in
|
|
perl,tcl,ruby and python, so, the attribute.i library
|
|
can work accross them.
|
|
|
|
- see the li_attribute.i test-case or the library file
|
|
|
|
Lib/typemaps/attribute.swg
|
|
|
|
for more info about how to use it.
|
|
|
|
|
|
|
|
|
|
10/24/2005: mmatus
|
|
|
|
- Perl uses now the unified typemap libray.
|
|
|
|
- Changes in ruby to use the $track option in typemaps.
|
|
|
|
- Changes in the unified typemap library to follow the
|
|
convention that all macros that are not used in the
|
|
C/C++ side starts with %, such as
|
|
|
|
%delete
|
|
%new_array
|
|
|
|
etc.
|
|
|
|
- Documenting fragments, see fragments.swg.
|
|
|
|
- Cleaner way to use the unified typemap library, include
|
|
just <typemaps/swigtypes.swg>.
|
|
|
|
Check some of the supported languages: perl, tcl, ruby,
|
|
python.
|
|
|
|
Always start with the head file, such as
|
|
|
|
python/python.swg
|
|
tcl/tcl8.swg
|
|
ruby/ruby.swg
|
|
perl5/perl5.swg
|
|
|
|
and the principal file that invokes the unified library, such as
|
|
|
|
python/pytypemaps.swg
|
|
tcl/tcltypemaps.swg
|
|
ruby/rubytypemaps.swg
|
|
perl/perltypemaps.swg
|
|
|
|
The file that provide the specialization for each
|
|
language are the one that provides the basic types:
|
|
|
|
python/pyprimtypes.swg
|
|
ruby/rubyprimtypes.swg
|
|
tcl/tclprimtypes.swg
|
|
perl5/perlprimtypes.swg
|
|
|
|
and the string manipulation:
|
|
|
|
python/pystrings.swg
|
|
ruby/rubystrings.swg
|
|
tcl/tclstrings.swg
|
|
perl5/perlstrings.swg
|
|
|
|
|
|
The rest fo the files, such as carray.i, are mostly one
|
|
line files that include the proper typemap library
|
|
version.
|
|
|
|
10/23/2005: wuzzeb
|
|
Chicken:
|
|
+ pointers to member functions finally work properly
|
|
+ add test of member function pointers to cpp_basic.i
|
|
|
|
10/20/2005: mmatus
|
|
Ruby, Tcl, Python:
|
|
|
|
- Uniform way to fail (label fail:), now finally
|
|
SWIG_exception works across the three languages and all
|
|
the typemaps.
|
|
|
|
- Add proper cleanup code to ruby
|
|
|
|
- More valgrind fixes
|
|
|
|
- Simplify the inline use, it seems a small interface of
|
|
20,000 lines (plus many many templates0 can break
|
|
gcc -O3 easily.
|
|
|
|
- Finalize the typemaps library. All the old *.i files
|
|
(carray.i, cpointer.i, exception.i) had been implemented
|
|
in the new typemaps library.
|
|
|
|
|
|
10/19/2005: wuzzeb
|
|
Update the Runtime Typemap documentation in Typemaps.html
|
|
|
|
10/18/2005: wuzzeb
|
|
Chicken:
|
|
- Correctly handle %ignored classes
|
|
- Correctly convert long, long long, unsigned long, etc
|
|
to chicken primitives. (Thanks to Felix Winkelmann)
|
|
- Using argout parameters when the return value was a
|
|
wrapped pointer caused a memory corruption. The chicken
|
|
garbage collector moved a pointer out from under us.
|
|
This is now fixed by running all the proxy creation
|
|
functions as continuations after the wrapper function
|
|
returns. As part of this, we no longer need the
|
|
chickenfastproxy flag on output typemaps.
|
|
- using -proxy and -nocollection together works now
|
|
Before, it was not exporting the destructor in the proxy
|
|
wrapper.
|
|
|
|
10/18/2005: mmatus
|
|
|
|
Unifying the typemaps for
|
|
|
|
python, ruby, tcl
|
|
|
|
and in the process, fix several problems in three
|
|
languages to work in the "canonical" way now stablished in
|
|
the typemap library
|
|
|
|
SWIG/Lib/typempas
|
|
|
|
The current status of the unification is that everything
|
|
compiles and runs inside the test-suite and examples
|
|
directories. And for the first type we have three
|
|
languages than pass the primitive_types.i case.
|
|
|
|
Also, we have uniform way to treat the errors, for example
|
|
if you do something like
|
|
|
|
>>> from primitive_types import *
|
|
>>> print val_uchar(10)
|
|
10
|
|
>>> print val_uchar(1000)
|
|
Traceback (most recent call last):
|
|
File "<stdin>", line 1, in ?
|
|
OverflowError: in argument 1 of type 'unsigned char'
|
|
|
|
you get the same exception in all the three languages.
|
|
|
|
And well, many more good things will come from this
|
|
unification, as proper support of the STL/STD classes
|
|
for all the languages, and hopefully, we can keep
|
|
adding other languages.
|
|
|
|
The hardest part, writting a common typemap library
|
|
that suites the three different languages, is done,
|
|
and adding another language it is easy now.
|
|
|
|
Still the global unification is not complete, the STL/STD
|
|
part is next, and probably adding one or two more
|
|
languages.
|
|
|
|
If you are curious, look at the python, ruby and/or tcl
|
|
directories to see what is needed to support the new
|
|
common typemaps library. Still, the final way to
|
|
integrate a new language could change as we move to
|
|
integrate the STD/STL.
|
|
|
|
*** POTENTIAL INCOMPATIBILITY ***
|
|
|
|
Some missing typemaps could start working, and change
|
|
the old expected behavior, specially in ruby and tcl.
|
|
|
|
|
|
|
|
10/15/2005: wsfulton
|
|
[Java] Fix for typesafe enum wrapping so that it is possible to
|
|
overload a method with 2 different enum types.
|
|
|
|
10/15/2005: wsfulton
|
|
Fix for %feature("immutable","0") attempting to generate setters
|
|
for constants.
|
|
|
|
Restored %immutable and %makedefault to clear the feature as it
|
|
behaved in SWIG-1.3.25 and earlier.
|
|
|
|
10/14/2005: mmatus
|
|
Fix bug in anonymous typedef structures which was leading to
|
|
strange behaviour.
|
|
|
|
10/13/2005: mmatus
|
|
Several minor changes:
|
|
|
|
- Improve the wchar_t type support
|
|
- Add a warning for when you define the 'in' typemap but
|
|
you don't define the 'typecheck' one. Very common mistake.
|
|
- Add proper default rule for function pointers, now you
|
|
can define a typemap such as:
|
|
|
|
%typemap(in) SWIGTYPE ((*)(ANY)) {...}
|
|
|
|
That will apply to all the pointer to functions. The
|
|
rule in C++ also apply to the function 'reference', ie,
|
|
in both cases
|
|
|
|
typedef int (*fptr)(int a);
|
|
typedef int (func)(int a);
|
|
|
|
This was needed since it seems to be 'illegal' in C++ to
|
|
do something like:
|
|
|
|
void *ptr = static_cast<void *>(fptr);
|
|
|
|
and probably, as for member functions, it is not
|
|
warrantied that the pointer sizes will match.
|
|
|
|
- Add the #error/#warning directives to swig's cpp.
|
|
|
|
- Add the noblock option for typemaps, which is used as
|
|
follows: supposed you a typemap, like this
|
|
|
|
|
|
%typemap(in,noblock=1) Hello {
|
|
....
|
|
}
|
|
|
|
then the typemap will be inserted without the block
|
|
imposed by the brackets, similar to
|
|
|
|
%typemap(in) Hello "...";
|
|
|
|
So, why you don't just use the quote style?, because:
|
|
|
|
1.- The quote style doesn't get preprocessed, for example
|
|
|
|
%typemap(in) Hello "$1= SWIG_macro($1);";
|
|
|
|
here, SWIG_macro doesn't get expanded
|
|
|
|
2.- Inside a quote typemap, you have to use
|
|
quotes carefully
|
|
|
|
%typemap(in) Hello "$1 = \"hello\" ";
|
|
|
|
3.- You can't make emacs and/or other editors
|
|
to indent inside a string!.
|
|
|
|
|
|
So, why do you want to remove the block?, because an extra
|
|
block when not needed (no local variables in it):
|
|
|
|
1.- makes the code harder to read
|
|
2.- makes the code larger
|
|
3.- or in short, for the same reason we have the quote style.
|
|
|
|
|