swig/SWIG/CHANGES.current
2003-03-07 02:09:03 +00:00

386 lines
15 KiB
Text
Raw Blame History

Version 1.3.18 (In progress)
============================
03/06/2003: mrose (Mark Rose)
The short-lived "-fdirectors" command line option has been
removed. To enable directors, instead use the extended %module
directive as follows:
%module(directors="1") modulename
03/06/2003: cheetah (William Fulton)
The long long typemaps have been rewritten so that they can be more
easily used with non ISO compilers, like Visual C++. For example
if you are wrapping the Windows 64 bit type __int64 the long long
typemaps can be used with %apply:
%apply long long { __int64 };
__int64 value1(__int64 x);
__int64 will now appear in the generated code instead of long long.
03/06/2003: beazley
*** DEVELOPER CHANGE ***
Swig module mutation has been changed slightly. When a language
class method wants to save node attributes, it now uses one of the
following functions:
Swig_require()
Swig_save()
The first argument to these functions is a namespace in which
saved attributes are placed. For example,this code
Node *n;
Swig_save("cDeclaration",n,"type","parms","name",NIL);
saves the attributes as "cDeclaration:type", "cDeclaration:parms",
and so forth. If necessary, a language module can refer to
old values by using this special namespace qualifier.
In addition to this, a special attribute "view" contains the name
of the last namespace used to save attributes. In the above
example, "view" would have the value "cDeclaration". The value
of "cDeclaration:view" would have the previous view and so forth.
Swig_restore(n) restores a node to the state before the last
Swig_require() or Swig_save() call.
Note: This change makes it easier for language modules to refer
to old values of attributes.
03/06/2003: mrose (Mark Rose)
Merged the cross-language polymorphism patch. When enabled, C++
"proxy" classes (called directors) are generated for each specified
C++ class. Directors pass method calls from C++ to Python, similar
to the way the usual proxy (shadow) classes pass method calls from
Python to C++. Together, these two types of proxies allow C++
classes that are extended in Python to behave just like ordinary
C++ classes and be used in C++ like native objects.
This feature is still very experimental and is disabled by default.
To enable director support, specify '-fdirectors' on the SWIG command
line or in the SWIG_FEATURES environment variable. In the interface
file, add %feature("director") to generate directors for all classes
that have virtual methods.
See http://stm.lbl.gov/~tm2/swig/ProxyDoc.html for more details.
03/03/2003: beazley
Fixed a small glitch in typemap local variable replacement. If you had
a typemap like this:
%typemap(in) type ($1_type temp) {
...
temp = ...;
...
}
and no occurrence of "$1_type" appeared in the body, then the local
variable type wouldn't be substituted.
03/03/2003: cheetah (William Fulton)
[CSharp] New version of the CSharp module which is typemap based.
It also uses ECMA C# and no longer uses Microsoft Visual C++.NET
glue. This means that it will work on non-Windows platforms.
Contributed by Neil Cawse.
02/27/2003: beazley
Fixed [ 653548 ] error parsing casting operator definition.
SWIG now ignores casting operators declared outside of a class.
For example:
inline A::operator char *() { ... }
Bug reported by Martin Casado.
02/27/2003: beazley
Added support for anonymous bit-fields. For example:
struct Foo {
int x : 4;
int : 4;
int y : 8;
};
Anonymous bit-fields are ignored by SWIG. Problem
reported by Franz H<>pfinger.
02/26/2003: cheetah (William Fulton)
[Java] Better typemaps in the Examples/java/typemap example and also
fixes subtle bug when using the StringBuffer typemaps more than once.
02/26/2003: beazley
Fixed [ 642112 ] Constants char bug.
02/26/2003: beazley
Fixed [ 675337 ] Partial template specialization not entirely working.
There was a subtle problem related to the naming and ordering of
template partial specialization arguments. Matching worked okay,
the resulting templates weren't expanded correctly.
02/25/2003: beazley
Fixed problem with parsing (and generating code) for
references to arrays. For example:
int foo(int (&x)[10]);
02/25/2003: beazley
Fixed [ 635347 ] Compilation warning from libpy.c.
Reported by Daniel L. Rall.
02/25/2003: beazley
Fixed a subtle problem with virtual method implementation
checking and typedef.
typedef int *intptr;
struct A {
virtual int *foo() = 0;
};
struct B : public A {
virtual intptr foo() { };
};
SWIG was treating these declarations as different even though
they are the same (via typedef).
02/25/2003: ljohnson (Lyle Johnson)
[Ruby] Added range checking for the NUM2USHRT macro, per [ 675353 ].
02/24/2003: beazley
Fixed a subtle problem with the code that determined if a class is abstract
and can be instantiated. If you had classes like this:
struct A {
virtual int foo(int) = 0;
};
struct B : virtual A {
virtual int foo(int);
};
struct C : virtual A {
};
/* Note order of base classes */
struct D : B, C { }; /* Ok */
struct E : C, B { }; /* Broken */
then SWIG determined that it could instantiate D(), but not E().
This inconsistency arose from the depth-first search of the
inheritance hierarchy to locate the implementations of virtual
methods. This problem should now be fixed---SWIG will attempt
to locate any valid implementation of a virtual method by
traversing over the entire hierarchy.
02/22/2003: cheetah (William Fulton)
[Java] Fix for using enum typemaps. The Java final static variable type
can be set using the jstype typemap, enabling enums to be mapped to
something other than int. Bug reported by Heiner Petith.
02/21/2003: songyanf (Tiger)
Added CSharp (C#) module prototype
i.e. csharp.cxx & csharp.h at Source/Modules/.
They are for test usage only now and need improvement.
The interface also need to be modified.
*** NEW FEATURE ***
02/20/2003: songyanf (Tiger)
Fixed problem with typedef with -fvirtual.
Similar as beazley's modification today.
02/20/2003: beazley
Added support for gcc-style variadic preprocessor macros.
Patch [ 623258 ] GCC-style vararg macro support.
Contributed by Joe Mason.
02/20/2003: beazley
Fixed [ 605162 ] Typemap local variables.
Reported by Lyle Johnson.
02/20/2003: beazley
Fixed problem with abstract classes and typedef. For example:
class Foo {
public:
virtual void foo(int x) = 0;
};
typedef int Integer;
class Bar : public Foo {
public:
virtual void foo(Integer x);
};
SWIG was getting confused about the latter method---making Bar
abstract. Reported by Marcelo Matus.
02/19/2003: cheetah (William Fulton)
[Java] %javaconst(flag) can also be used on enums as well as constants.
This feature enables true Java compiler constants so that they can be
used in Java switch statements. Thanks to Heiner Petith for patches.
02/19/2003: songyanf (Tiger)
Modified -fcompact feature to deal with PP lines
02/18/2003: beazley
Fixed [ 689040 ] Missing return value in std_vector.i.
Reported by Robert H. de Vries.
02/18/2003: beazley
Fixed a few evil scoping problems with templates, namespaces, and the
%extend directive. Problem reported by Luigi Ballabio.
02/18/2003: cheetah (William Fulton)
[Ruby] Improved support for Visual C++ and other native Windows compilers.
It is no longer necessary to specify "/EXPORT:Init_<module>", where <module> is the
swig module name when linking using these native Windows compilers.
02/15/2003: songyanf (Tiger)
Added -fvirtual option.
Reduce the lines and size of the wrapper file
by omitting redifined virtual function in children classes.
Modified -compact option to -fcompact option
Added -small option.
-small = -fvirtual -fcompact
And it can be extended by future feature options,
which are used to reduce wrapper file szie.
Added SWIG_FEATURES environment variable check.
To dynamically set the feature options such as -fcompact & -fvirtual
*** NEW FEATURE ***
02/13/2003: lenz
Updated Doc/Manual/Perl5.html to talk about C++ compile problems
configure.in now checks for PERL5_CCFLAGS
Runtime/Makefile.in and Example/Makefile.in now use PERL5_CCFLAGS
Added Lib/perl5/noembed.h which contains all the known macro conflicts
02/12/2003: beazley
Fixed [ 685410 ] C++ Explicit template instantiation causes SWIG to exit.
Fixes a syntax error with declarations similar to this:
template class std::vector<int>;
SWIG now ignores the instantiation and generates a warning message.
We might do more later. Reported by Thomas Williamson.
02/11/2003: cheetah (William Fulton)
Rewrote bool typemaps to remove performance warning for compiling generated code
under Visual C++.
02/11/2003: cheetah (William Fulton)
Fix for wrapping reference variables (const non-primitive and all non-const types)
for example:
int& i;
Class& c;
const Class& c;
02/11/2003: beazley
Fixed more very subtle preprocessor corner cases related to recursive
macro expansion. For example:
#define cat(x,y) x ## y
cat(cat(1,2),3) // Produces: cat(1,2)3
#define xcat(x,y) cat(x,y)
xcat(xcat(1,2),3) // Produces 123
See K&R, 2nd Ed. p. 231.
02/10/2003: cheetah (William Fulton)
Fixed [ 683882 ] - patch submitted by F. Postma for SWIG to compile on HP-UX.
02/10/2003: beazley
Fixed subtle preprocessor argument expansion bug. Reported by Marcelo Matus.
02/10/2003: songyanf
Added -compact option.
Reduce the lines and size of the wrapper file
by omitting comments and combining short lines.
*** NEW FEATURE ***
02/07/2003: beazley
Fixed [ 651355 ] Syntax error with cstring.i
Reported by Omri Barel.
02/07/2003: beazley
Fixed [ 663632 ] incompatibility with standard cpp.
This is a refinement that fixes this problem:
// Some macro with an argument
#define FOO(x) x
int FOO; /* Not a macro---no arguments */
02/05/2003: beazley
Fixed [ 675491 ] parse error with global namespace qualification.
Submitted by Jeremy Yallop.
02/04/2003: beazley
Fixed bug in varargs processing introduced by the numinputs typemap parameter.
01/08/2003: ttn
[xml] Fix string-replacement ordering buglet.
Thanks to Gary Herron.
12/23/2002: cheetah (William Fulton)
Further build changes:
- The SWIG executable is now built using a single Makefile.
- This makefile is generated by Automake (Source/Makefile.am).
- Dependency tracking and tags support are in this makefile.
- Automake 1.7.2 and Autoconf 2.54 minimum versions are needed to build SWIG from CVS.
- Running ./autogen.sh now installs Autoconf/Automake support files into
Tools/config and these files are no longer stored in CVS.
- Bug fixes in 'make install' for systems using .exe executable extension and
./configure --with-release-suffix=whatever
12/16/2002: cheetah (William Fulton)
More build changes:
- Autoconf's AC_CANONICAL_HOST replaces proprietary approach for detecting build host.
- Autoconf support files moved to Tools/config.
12/16/2002: cheetah (William Fulton)
Modifications to run on MacOS, submitted by Bernard Desgraupes.
Mainly ensuring generated files are output in the appropriate directory for
some modules.
12/11/2002: cheetah (William Fulton)
Various build modifications and bug fixes:
- Simplification of version string. Use autoconf's PACKAGE_VERSION instead.
- Build time removed from SWIG version.
- Using standard autoconf config header generation.
- Updated old autoconf macros as reported by autoupdate.
- Removed $prefix in autoconf from search paths as autoconf won't expand them.
- Subtle bug fix where 'make prefix=/somewhere; make clean; make prefix=/somwhere/else'
produced an executable using the incorrect library directories.
- Added -ldflags commandline option for MzScheme, Ocaml, Pike and PHP.
- Fixed reporting of compiler used when using -version commandline option.
- SWIG web address added to -version commandline option.
12/11/2002: beazley
Minor fix to Tcl dynamic cast typemaps. Reported by
Kristopher Blom.
12/10/2002: beazley
Fixed subtle template argument replace bug. Reported by
Chris Flatley.
12/10/2002: beazley
Reverted CHANGES 09/03/2002, preprocessor argument evaluation. Arguments
are not evaluated during collection, K&R, p. 230.
12/06/2002: beazley
Fixed [ 649022 ] Compilation problems with KAI/KCC
12/02/2002: beazley
SWIG 'rel-1-3' CVS branch merged back into the main branch.