Changes for version 1.1

  • 6/24/97 : Fixed Objective-C constructor bug when working with Perl5 shadow classes.
  • 6/23/97 : Fixed some parsing problems with Objective-C. Declarations such as the following should work now :
    • foo : (int) a with: (int) b;
  • 6/22/97 : Added SWIG Runtime library. This library contains the SWIG pointer type-checker and support functions that are normally included in every module. By using the library, it is easier to work with multiple SWIG generated modules.
  • 6/22/97 : Fixed minor bug in Perl5 module related to static linking of multiple modules.
  • 6/22/97 : Fixed some bugs with the %import directive. When used with Perl5 shadow classes, this generates a 'require' statement to load in external modules.
  • 6/22/97 : Added -swiglib option. This prints out the location of the SWIG library and exits. This option is only really useful to configuration tools that are looking for SWIG and its library location (e.g. autoconf, configure, etc...).
  • 6/21/97 : Fixed export bug with Perl5.004 on Windows-NT.
  • 6/20/97 : Minor change to code generation of class/structure members in order to work better with typemaps. Should have no noticable impact on existing SWIG modules.
  • 6/19/97 : Added -t option. This allows SWIG to load a typemap file before processing any declarations. For example :
    • swig -t typemaps.i -python example.i
    • At most, only one typemap file can be specified in this manner.
    • NEW FEATURE ***
  • 6/18/97 : Need a Makefile fast? Type
    • swig [-tcl, -perl5, -python] -co Makefile
    • and you will get a Makefile specific to that target language. You just need to modify it for your application and you're ready to run.
  • 6/18/97 : Completed the -ci option. This option checks a file into the SWIG library. It should be used in conjunction with a language option. For example :
    • swig -tcl -ci foobar.i
    • Checks the file foobar.i into the Tcl part of the library. In order to check a file into the general library (accessible to all languages modules), do the following
      • swig -ci -o ../foobar.i foobar.i
    • (Admittedly this looks a little strange but is unavoidable). The check-in option is primarily designed for SWIG maintenance and library development. The command will fail if the user does not have write permission to the SWIG library. Third party library extensions can easily install themselves by simply providing a shell script that uses 'swig -ci' to install the appropriate library files. It is not necessary to know where the SWIG library is located if you use this mechanism.
    • NEW FEATURE ***
  • 6/16/97 : Fixed a bug in shadow class generation when %name() was applied to a class definition. Unfortunately, fixing the bug required a change in the Language C API by adding an extra argument to the Language::cpp_class_decl() function. This may break SWIG C++ extensions.
    • POTENTIAL INCOMPATIBILITY ***
  • 6/15/97 : Added a warning message if no module name is specified with the %module directive or -module option.
  • 6/15/97 : Fixed line number bug when reporting errors for undefined base classes.
  • 6/15/97 : Added new %rename directive. This allows the forward declaration of a renaming. For example :
    • %rename OldName NewName;
    • .... later ... int OldName(int);
    • Unlike %name, %rename will rename any occurence of the old name. This applies to functions, variables, class members and so forth. There is no way to disable %rename once set, but you can change the name by redeclaring it to something else.
    • NEW FEATURE ***
  • 6/15/97 : Improved the implementation of the %name directive so that it could be used with conditional compilation :
    • #ifdef SWIG %name(NewName) #endif int OldName(int);
  • 6/15/97 : Added support for functions with no return datatype. In this case, SWIG assumes a return type of 'int'.
  • 6/11/97 : Improved error reporting in the parser. It should be a little less sensitive to errors that occur inside class definitions now. Also reports errors for function pointers.
  • 6/11/97 : Made '$' a legal symbol in identifiers. This is to support some Objective-C libraries. Some compilers (such as gcc) may also allow identifiers to contain a $ in C/C++ code as well (this is an obscure feature of C). When '$' appears in identifier, SWIG remaps it to the string '_S_' when creating the scripting language function. Thus a function 'foo$bar' would be called 'foo_S_bar'.
  • 6/11/97 : Fixed bug in Python shadow classes with __repr__ method. If supplied by the user, it was ignored, but now it should work.
  • 6/9/97 : Fixed the Tcl 8.0 module to work with Tcl 8.0b1. SWIG is no longer compatible with *any* alpha release of Tcl 8.0.
    • POTENTIAL INCOMPATIBILITY ***
  • 6/7/97 : Put a maximal error count in (currently set to 20). SWIG will bail out if it generates more errors than this (useful for preventing SWIG from printing 4000 syntax errors when it gets confused).
  • 6/7/97 : Fixed segmentation fault when parsing variable length arguments.
  • 6/7/97 : Minor change to Perl5 module. C++ static functions are now put in the same package as their class when using shadow classes.
  • 6/7/97 : Centralized the naming of functions, members, wrappers etc... By centralizing the naming scheme, it should be possible to make some multi-file optimizations. Also, it should be possible to change SWIG's naming scheme (perhaps a new feature to be added later).
  • 6/2/97 : Added 'arginit' typemap. This can be used to assign initial values to function arguments. Doing so makes it somewhat easier to detect improper argument passing when working with other typemaps.
  • 6/2/97 : Fixed code generation bug when read-only variables were inherited into other classes. Under inheritance, the variables would become writable, but this has now been corrected.
  • 5/30/97 : An empty %name() directive is no longer allowed or supported. This directive was originally used to strip the prefix off of a class or structure. Unfortunately, this never really seemed to work right and it complicated the C++ code generator significantly. As far as I can tell no one uses it, so it is now history. *** POTENTIAL INCOMPATIBILITY ***
  • 5/28/97 : Fixed a parsing bug with #define and C++ comments. Declarations such as the following now work properly :
    • #define CONST 4 // A Comment
  • 5/28/97 : Made some performance improvements to the SWIG String class. (only affects the SWIG compiler itself).
  • 5/28/97 : Modified the parser to skip template definitions and issue a warning message.
  • 5/28/97 : Preliminary support for parameterized types added (ie. templates). Types such as the following should pass through the SWIG compiler
    • void foo(vector<complex> *a, vector<double> *b);
    • When used, the entire name 'vector<complex>' becomes the name of the datatype. Due to space limitations in datatype representations, the name should not exceed 96 characters.
    • Note : This is only part of what is needed for template support. Template class definitions are not yet supported by SWIG.
    • The template notation above may also be used when specifying Objective-C protocol lists.
    • NEW FEATURE ***
  • 5/24/97 : First cut at Objective-C support added. As it turns out, almost everything can be handled with only a few minor modifications to the C++ module.
    • NEW FEATURE ***
  • 5/23/97 : Fixed repeated definition bug in multiple inheritance handling when multiple base classes share a common base class (ie. the evil diamond).
  • 5/21/97 : Fixed rather embarrassing typo that worked its way into the Tests/Build directory.
  • 5/19/97 : Fixed code generation bug when using native methods and shadow classes with Python and Perl5 modules.
  • 5/19/97 : Modified the %apply directive slightly so that it would work with pointers a little better. For example :
    • %apply unsigned long { DWORD };
    • Applies *all* typemaps associated with "unsigned long" to "DWORD". This now includes pointers to the two datatypes. For example, a typemap applied to "unsigned long **" would also be applied to any occurrence of "DWORD **" as well.
  • 5/19/97 : Fixed an ownership assignment bug in the Perl5 module when class members were returning new objects belonging to different classes.
  • 5/17/97 : Added a few more typemap variables.
    • $name - Name of function/variable/member $basetype - Base datatype (type without pointers) $argnum - Argument number
  • 5/16/97 : Fixed embarrassing underscore error in local variable allocator.
  • 5/16/97 : Fixed namespace clash bug in parameterized typemaps when creating arrays as new local variables.
  • 5/15/97 : Fixed some bugs with inheritance of added methods across multiple files. SWIG now uses names of base classes when generating such functions.
  • 5/14/97 : Finished support for default typemaps. Primarily used internally, they can be used to match the basic built-in datatypes used inside of SWIG. You can specify them in interface files as well like this :
    • %typemap(tcl,in) int SWIG_DEFAULT_TYPE { $target = atoi($target); }
    • Unlike normal typemaps, this default map will get applied to *all* integer datatypes encountered, including those renamed with typedef, etc...
  • 5/13/97 : Fixed substring bug in type checker.
  • 5/12/97 : Fixed bug in parameterized typemaps when declaring local variables of structures.

Provides

in Examples/perl5/filedialog/FileSelect.pm
in Examples/tcl/objc/list.pm
in Examples/perl5/SWIGtoXS/produce.pm
in Tests/Doc/swig.pm
in Tests/Doc/text.pm

Examples