aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Beazley <dave-swig@dabeaz.com>2002-06-17 20:28:59 +0000
committerDave Beazley <dave-swig@dabeaz.com>2002-06-17 20:28:59 +0000
commit61932868bbdcfebc135234ceffb037260c30d3da (patch)
tree62eefae72e66f31f48dd6d94585df5e0b5574b04
parent74a64556933c3a3f8c17a5702f7255bf6c8635b5 (diff)
downloadswig-61932868bbdcfebc135234ceffb037260c30d3da.tar.gz
update to 1.3.13
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@2979 626c5289-ae23-0410-ae9c-e8d60b6d4f22
-rw-r--r--CHANGES208
-rw-r--r--README19
-rw-r--r--TODO274
3 files changed, 433 insertions, 68 deletions
diff --git a/CHANGES b/CHANGES
index 9d0580573..4fbb1e176 100644
--- a/CHANGES
+++ b/CHANGES
@@ -14,6 +14,214 @@ http://www.math.uni-magdeburg.de/~mkoeppe/imo-debian
Eventually this branch will be merged back to the trunk of the CVS
tree (maybe).
+Version 1.3.13 (June 17, 2002)
+==============================
+06/16/2002: beazley
+ Fixed a bug with __FILE__ expansion in the preprocessor. On Windows,
+ the backslash (\) is now converted to (\\) in the string literal
+ used for __FILE__. Reported by Steve Glaser.
+
+06/14/2002: beazley
+ Fixed warning message about 'name private in this context'. The
+ warning is only generated for public methods. Reported by
+ Scott Michel.
+
+06/14/2002: beazley
+ Fixed some problems related to template instantiation
+ and namespaces. When SWIG expands a template, it does
+ so with fully resolved types. For example, if you have this:
+
+ template<class T> class foo { };
+ typedef double Double;
+ %template(foo_d) foo<Double>;
+
+ then, it is handled as foo<double> in the typesystem.
+ This fixes a number of subtle problems with inheritance
+ and templates.
+
+06/14/2002: ljohnson (Lyle Johnson)
+ [Ruby] Added missing bool typemaps for INPUT, OUTPUT and
+ INOUT in Lib/ruby/typemaps.i.
+
+05/29/2002: cheetah (William Fulton)
+ [Java] Fix for a couple of broken pragmas.
+
+05/29/2002: cheetah (William Fulton)
+ Fix for unnecessary cast when wrapping global variable where
+ the type is not parsed by SWIG - Java variables example
+ failure as reported by Larry Virden.
+
+06/10/2002: beazley
+ Modified %template to allow for empty instantiations.
+
+ %template() foo<int,int>;
+
+ This registers foo<int,int> with the type system, but
+ doesn't wrap it (same as %ignore). This may only be a
+ temporary measure. SWIG might be able to automatically
+ instantiate templates in certain cases.
+
+06/10/2002: beazley
+ Fixed function prototype problems with Tcl 8.4
+
+06/09/2002: beazley
+ Fixed problem with templates and location of base classes.
+ This one is a little mind-bending, but here is an example
+ that illustrates:
+
+ template <class ArgType, class ResType>
+ struct traits
+ {
+ typedef ArgType arg_type;
+ typedef ResType res_type;
+ };
+
+ template <class ArgType, class ResType>
+ struct Function
+ {
+ };
+
+ template <class AF, class AG>
+ struct Class : Function<typename traits<AF, AG>::arg_type,
+ typename traits<AF, AG>::res_type>
+ {
+ };
+
+ %template(traits_dd) traits <double, double>;
+ %template(Function_dd) Function <double, double>;
+ %template(Class_dd) Class <double, double>;
+
+
+ In this example, the base class of 'Class' is determined from
+ the Function template, but the types are obtained through typedefs.
+ Because of this, SWIG could not locate the wrapped base class
+ (Function<double,double>). Should be fixed in 1.3.13 even
+ though I can think of a million other things that might
+ also be broken.
+
+06/07/2002: beazley
+ Fixed a problem with conversion operators. If you had an
+ operator like this,
+
+ operator double() const;
+
+ SWIG was ommitting the "const" qualifier. This affected
+ %rename and other directives. Reported by Zhong Ren.
+
+06/07/2002: beazley
+ Lessened the strictness of abstract class checking. If
+ you have code like this:
+
+ class Foo {
+ public:
+ virtual int method() = 0;
+ };
+
+ class Bar : public Foo {
+ public:
+ Bar();
+ ~Bar();
+ };
+
+ SWIG will go ahead and generate constructor/destructors
+ for Bar. However, it will also generate a warning message
+ that "Bar" might be abstract (since method() isn't defined).
+ In SWIG-1.3.12, SWIG refused to generate a constructor at all.
+
+06/07/2002: beazley
+ Change to %template directive. If you specify something like this:
+
+ %template(vi) std::vector<int>;
+
+ It is *exactly* the same as this:
+
+ namespace std {
+ %template(vi) vector<int>;
+ }
+
+ SWIG-1.3.12 tried to instantiate the template outside of the namespace
+ using some trick. However, this was extremely problematic and full
+ holes. This version is safer.
+
+06/07/2002: beazley
+ Fixed bug with scope qualification and templates. For example:
+
+ A<B::C>::DD
+
+ Before, this was separated as scopes A<B, C>, and DD. Fixed now.
+
+06/06/2002: beazley
+ Allow the following syntax:
+
+ class A { };
+ struct B : A { ... };
+
+ A base class without a specifier is assumed to be public for a struct.
+
+06/06/2002: beazley
+ Fixed syntax error with template constructor initializers.
+ Reported by Marcelo Matus.
+
+06/06/2002: beazley
+ Fixed bug with default template arguments.
+ Reported by Marcelo Matus.
+
+06/05/2002: beazley
+ Fixed subtle problems with %rename directive and template
+ expansion.
+
+ Code like this should now work:
+
+ %rename(blah) foo<double>::method;
+ ...
+ template<class T> class foo {
+ public:
+ void method();
+ };
+
+ %template(whatever) foo<double>;
+
+06/05/2002: beazley
+ Resolved some tricky issues of multi-pass compilation and
+ and inheritance. The following situation now generates
+ an error:
+
+ class Foo : public Bar {
+ ...
+ };
+
+ class Bar {
+ ...
+ };
+
+ The following code generates a warning about incomplete classes.
+
+ class Bar;
+ class Foo : public Bar { };
+
+ The following code generates a warning about an undefined class.
+
+ class Foo : public Bar { }; // Bar undefined
+
+ This fixes a failed assertion bug reported by Jason Stewart.
+
+06/05/2002: ljohnson
+ [Ruby] Added a warning message for the Ruby module about the lack
+ of support for multiple inheritance. Only the first base class
+ listed is used and the others are ignored. (Reported by Craig
+ Files).
+
+06/03/2002: beazley
+ Fixed a bug with struct declarations and typedef. For example:
+
+ typedef struct Foo Foo;
+ struct Foo {
+ ...
+ };
+
+ A few other subtle struct related typing problems were
+ also resolved.
+
Version 1.3.12 (June 2, 2002)
=============================
diff --git a/README b/README
index 1bb2fba20..20a3b0f86 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
SWIG (Simplified Wrapper and Interface Generator)
-Version: 1.3.12 (June 2, 2002)
+Version: 1.3.13 (June 17, 2002)
$Header$
@@ -23,7 +23,7 @@ working on this are:
Loic Dachary (loic@ceic.com) (Perl5)
Jason Stewart (jason@openinformatics.com) (Perl5)
Thien-Thi Nguyen (ttn@glug.org) (Testing/Misc)
- Lyle Johnson (ljohnson@resgen.com) (Ruby)
+ Lyle Johnson (lyle@users.sourceforge.net) (Ruby)
Masaki Fukushima (fukusima@goto.info.waseda.ac.jp) (Ruby)
Richard Palmer (richard@magicality.org) (PHP)
Luigi Ballabio (ballabio@mac.com) (Macintosh port)
@@ -153,7 +153,6 @@ To build and install SWIG, simply type the following:
% ./configure
% make
- % make runtime # Optional (See note 4 below)
% make -k check # This step is optional (see note 3 below)
% make install
@@ -163,7 +162,6 @@ to ./configure. For example:
% ./configure --prefix=/home/yourname/projects
% make
- % make runtime
% make -k check
% make install
@@ -209,13 +207,6 @@ Notes:
does not support member templates). These errors are harmless if you
don't intend to use these features in your own programs.
-(4) The 'make runtime' target builds the SWIG runtime libraries. These
- are needed if you plan to build applications that might involve more
- than one SWIG generated module. This step requires that shared libraries
- be properly configured on your machine and it may not work on all
- platforms. If this step fails, SWIG will still work, but multi-module
- support will be broken. Please let us know if this fails on your platform.
-
Examples
========
The Examples directory contains a variety of examples of using SWIG
@@ -268,9 +259,9 @@ to take time to complete. Please be patient or volunteer to help.
!! The most up-to-date information concerning new features in SWIG1.3 is the
!! file Doc/Manual/SWIG.html.
-There is some technical documentation available in the Doc/Devel
-subdirectory. This is not necessarily up-to-date, but it has some
-information on SWIG internals.
+There is some technical developer documentation available in the
+Doc/Devel subdirectory. This is not necessarily up-to-date, but it
+has some information on SWIG internals.
Participate!
============
diff --git a/TODO b/TODO
index 6e866418e..fde6502d2 100644
--- a/TODO
+++ b/TODO
@@ -1,78 +1,244 @@
- -*- outline -*-
+SWIG TO-DO
+
+Release: SWIG-1.3.14 (Late July, 2002)
+-----------------------------------------------------------------------------
+
+**** = High Priority
+*** = Implement if possible.
+** = Will implement if time.
+* = Implement if bored (or deemed necessary).
-* for release 1.3.8 (or 1.4.0?)
+CORE:
+
+**** Add support for nested classes. The type system should be
+ ready to go. The primary obstacle lies in the target language
+ modules (which were never programmed with nested classes in
+ mind). There are also issues with nested C structures. For
+ example:
-** Revive the documentation
+ struct Foo {
+ struct {
+ int x,y;
+ } z;
+ };
-** Maybe port Wrapper DOH-ification from CVS head
+ This is one of the last remaining "hard" problems in the SWIG
+ core, but it is important that we solve it.
-** Fix all the bugs on SourceForge
+**** Better modularization of language modules and a minor redesign
+ of the very high-level API. Issues:
-** Add facilities to attach documentation strings to procedures.
- There is a patch by twburton on SF for the Python language module,
- but it needs to be done for all language modules.
+ - Language modules should be created by a factory function
+ with C linkage. For example:
-** Add support for type annotations, see mkoeppe's message:
- http://mailman.cs.uchicago.edu/pipermail/swig/2001-June/002652.html
+ Language *PYTHON_init() {
+ return new PYTHON();
+ }
-* for the unstable 1.5 series
+ swigmain.cxx should then be modified to only use the factory
+ functions when bringing a module into existence. This
+ decouples main() from the implementation of each language
+ module---and eliminates the need to have header files
+ for each module.
-** Maybe use libtool rather than all the home-grown compile/link stuff
+ Placing C linkage on the initialization function provides
+ support for eventual dynamic loading of SWIG modules--it
+ establishes a well-known symbol name that can be used in
+ conjunction with the dynamic loader.
-** The behavior of SWIG with respect to call/return-by-value needs
- to be verified for all language modules. Previously, the
- parser automatically performed the conversion of pass-by-value
- to pass-by-reference. Unfortunately, this confused typemap
- handling and other aspects of the system. I have removed
- this behavior. However, in doing so, the handling of user
- defined types is passed on to the language modules.
+ - Perhaps the module system would be simplified by having
+ all code located in a single file instead of a separate
+ header file and a separate implementation file.
-** All of the SWIG 1.1p5 examples need to be verified. Changes
- in type handling and internal data structures may have broken
- a variety of things.
+ - Does anyone inherit from existing modules?
-** [Guile] Rename slot setters from CLASS-SLOT-set to CLASS-SLOT-set!
+*** Support for overloaded functions. It is probably possible to
+ add some kind of support for this. Overloading has been supported
+ internally for quite some time---the warning messages are there
+ simply as a stop-gap measure (since no language modules support
+ overloading). We would keep the the existing %rename support.
-** [Guile] Maybe support keyword args
+*** Support for smart-pointers and proxies. This is primarily to
+ support classes that implement the -> operator and which are used
+ to dispatch on another class. I think it would be cool if
+ SWIG could automatically detect and handle this case. For example,
+ if you had this:
-** [Guile] Maybe support GOOPS shadow classes
+ class FooProxy {
+ ...
+ Foo *operator->();
+ ...
+ };
-** [Guile] Support garbage collection.
+ Perhaps SWIG could automagically locate Foo and arrange for its
+ methods to be associated with FooProxy. This is really not too
+ bad. The proxy methods could be wrapped normally with only
+ one minor modification in the wrapper code. If the class Foo had
+ a method "bar" it would be invoked as this, through the proxy:
-*** %new annotation decides whether a pointer smob can be gc'ed.
+ FooProxy *arg1; // Object pointer (to proxy)
+ (*arg1)->bar();
+ ^
+ extra "*" added here.
-*** New smob type `swig-gc'; instances created with
- SWIG_Guile_MakeCollectablePtr. %new versions of the pointer
- typemaps use this function rather than SWIG_Guile_MakePtr.
+ I think automatic wrapping of methods would be much nicer than
+ requiring the use of a special directive.
-*** New typemaps "destructor", "gcmarker". Their values are taken as
- identifiers for functions taking one argument: a pointer to the
- object to be destroyed, or whose SCM-valued subobjects are to be
- marked. After creating the pointer equivalence table, we iterate
- again over the remembered pointer types, emitting code that puts
- the functions into our type table. No additional functions are
- generated.
+*** Rewrite declaration annotation to better unify %rename and related
+ directives. Add a selector mechanism that allows specific parse tree
+ nodes to be identified. For example:
-*** The default for all pointer types would be:
- %typemap(destructor) SWIGPOINTER * "free";
+ %feature("foo", nodetype="class") Foo { ... some code ... };
-*** A special annotation, e.g. FREED, can be attached to the arguments
- of destructor functions, so that explicitly freed structs won't be
- collected by the GC again. Like this:
+ Consider use of wildcards. Namespace/nested scope support in
+ %feature is currently weak. It works, but is fragile. Consider
+ an implementation that is better integrated with symbol table
+ management. Continue to consolidate SWIG directives to %feature.
- %typemap(argout) SWIGPOINTER *FREED {
- smob-tag($source) = swig; /* non-gc */
- smob-data($source) = NULL;
- }
- void free_foo(struct foo *FREED);
-
-** Make a tricky header file defining annotations invisible to the C compiler.
- The idea is to prepare one file that serves both as a C header file
- and a SWIG interface file.
+*** Bring Aquinas' contract/assertion checking code online.
- void add(SWIG_OUTPUT(int) *z, int x, int y)
+*** Add more intelligent information related to object ownership.
+ SWIG should be able to automatically strip ownership from
+ objects when they are assigned to pointer variables and structure
+ members as well as stored in a container (i.e., an array of pointers).
-** Unify Guile and MzScheme support, add support for more Scheme systems.
+** Restoration of the documentation system.
-** [Guile]: Make SWIG's types first class.
+** Restoration of Objective-C support.
+** Unification of symbol tables and type system scopes. In a sense
+ they capture the same information so it is not necessary to have
+ both. The existence of two symbol management systems is mostly
+ historical.
+
+* Fix template partial specialization matching rules. SWIG does not
+ implement the proper C++ type deduction rules, but it does handle
+ the most common cases. This is likely to be hard and implementing
+ it is really only for completeness.
+
+Library
+-------
+
+**** Add more support for the C++ standard library. std::complex and other
+ core datatypes. Refine support for STL vector. Add more STL objects.
+
+**** Continue to expand the set of recognized typemaps.
+
+Python
+------
+
+**** Support for Python-2.2 style classes.
+
+**** Ability to wrap certain classes as Python built-in types.
+
+Perl
+----
+
+**** Rewrite runtime pointer type checking to better integrate
+ shadow classes. Creation of shadow classes should be done
+ in C instead of Perl. This will fix a number of problems
+ related to typemaps and reduce the amount of Perl wrapper code.
+
+**** Create tests for existing support for operator overloading
+
+Tcl
+---
+
+Ruby
+----
+
+**** Investigate the new object allocation framework that has been
+ implemented for Ruby 1.8 and determine what (if anything) needs
+ to be changed for the wrapper code generated by SWIG. For background
+ see ruby-talk messages 23358 and 38856 (and related threads).
+
+* Consider adding a switch to define everything in the global (Kernel)
+ module instead of nested in a user-defined module, but only if
+ it comes up.
+
+Java
+----
+**** Improved pointer handling to take advantage of Java's static type
+ checking. Currently all pointers are a Java long and these could
+ be changed to use a Java class wrapper.
+
+**** Better support for global variables and functions when using proxy
+ classes. They could be put into a global proxy class to improve on
+ current syntax:
+ A a = new A(module.global_function(b.getCPtrB()), true);
+ to use something like:
+ A a = Globals.global_function(b);
+
+*** Implement function overloading.
+
+*** Implement replacements for the deprecation of the %pragma directive.
+
+* Consider using typemaps for proxy class code generation.
+
+PHP
+---
+
+Guile
+-----
+
+** Rename slot setters from CLASS-SLOT-set to CLASS-SLOT-set!
+ to match Scheme convention for naming of mutators.
+
+** Support keyword args.
+
+** Support GOOPS shadow classes.
+
+** Support garbage collection. Here is a possible design:
+
+ -- %new annotation decides whether a pointer smob can be gc'ed.
+
+ -- New smob type `swig-gc'; instances created with
+ SWIG_Guile_MakeCollectablePtr. %new versions of the pointer
+ typemaps use this function rather than SWIG_Guile_MakePtr.
+
+ -- New typemaps "destructor", "gcmarker". Their values are taken
+ as identifiers for functions taking one argument: a pointer to
+ the object to be destroyed, or whose SCM-valued subobjects are
+ to be marked. After creating the pointer equivalence table,
+ we iterate again over the remembered pointer types, emitting
+ code that puts the functions into our type table. No
+ additional functions are generated.
+
+ -- The default for all pointer types would be:
+ %typemap(destructor) SWIGPOINTER * "free";
+ (or "delete" for C++)
+
+ -- A special annotation, e.g. FREED, can be attached to the
+ arguments of destructor functions, so that explicitly freed
+ structs won't be collected by the GC again. Like this:
+
+ %typemap(argout) SWIGPOINTER *FREED {
+ smob-tag($source) = swig; /* non-gc */
+ smob-data($source) = NULL;
+ }
+ void free_foo(struct foo *FREED);
+
+** Make SWIG's types first-class by using a separate smob type for
+ SWIG type descriptors; enable reflection on types.
+
+** Maybe communicate the type system between object modules via Scheme
+ variables, rather than a shared object.
+
+Mzscheme
+--------
+
+Documentation
+-------------
+
+**** Extending SWIG (and internals).
+
+*** Perl, Python, Tcl modules.
+
+*** add section for Perl module support for operator overloading
+
+** Add section on WAD.
+
+Other
+-----
+
+**** Bring Tiger's .NET/CLR module online.