import source from 1.3.40
[external/swig.git] / CHANGES
1 SWIG (Simplified Wrapper and Interface Generator)
2
3 See CHANGES.current for current version.
4
5 Version 1.3.39 (21 March 2009)
6 ==============================
7
8 2009-03-19: bhy
9             [Python] Fix the memory leak related to Python 3 unicode and C char* conversion,
10             which can be shown in the following example before this fix:
11             
12                   from li_cstring import *
13                   i=0
14                   while True:
15                       i += 1
16                       n = str(i)*10
17                       test3(n)
18
19             This fix affected SWIG_AsCharPtrAndSize() so you cannot call this function with
20             a null alloc and non-null cptr argument in Python 3, otherwise a runtime error
21             will be raised.
22
23 2009-03-18: wsfulton
24             [C#] std::vector<T> wrapper improvements for .NET 2 and also providing the
25             necessary machinery to use the std::vector<T> wrappers with more advanced features such
26             as LINQ - the C# proxy class now derives from IEnumerable<>. The default is now to 
27             generate code requiring .NET 2 as a minimum, although the C# code can be compiled 
28             for .NET 1 by defining the SWIG_DOTNET_1 C# preprocessor constant. See the 
29             std_vector.i file for more details.
30
31             *** POTENTIAL INCOMPATIBILITY ***
32
33 2009-03-12: wsfulton
34             [Ruby] Fix #2676738 SWIG generated symbol name clashes.
35
36 2009-03-01: bhy
37             [Python] Some fixes for Python 3.0.1 and higher support. In 3.0.1, the C API function
38             PyObject_Compare is removed, so PyObject_RichCompareBool is used for replacement.
39             Struct initilization of SwigPyObject and SwigPyObject_as_number changed to reflect
40             the drop of tp_compare and nb_long.
41
42 2009-03-01: bhy
43             [Python] Fix SF#2583160. Now the importer in Python shadow wrapper take care of the
44             case that module already imported at other place.
45
46 2009-02-28: bhy
47             [Python] Fix SF#2637352. Move struct declaration of SWIG_module in pyinit.swg before
48             the method calls, since some C compiler don't allow declaration in middle of function
49             body.
50
51 2009-02-21: wsfulton
52             [Allegrocl] Fix seg fault wrapping some constant variable (%constant) types.
53
54 2009-02-20: wsfulton
55             [CFFI] Fix seg faults when for %extend and using statements.
56
57 2009-02-20: wsfulton
58             Fix SF #2605955: -co option which broke in 1.3.37. 
59
60 2009-02-20: wsfulton
61             New %insert("begin") section added. Also can be used as %begin. This is a new
62             code section reserved entirely for users and the code within the section is generated
63             at the top of the C/C++ wrapper file and so provides a means to put custom code
64             into the wrapper file before anything else that SWIG generates.
65
66 2009-02-17: wsfulton
67             'make clean-test-suite' will now run clean on ALL languages. Previously it only
68             ran the correctly configured languages. This way it is now possible to clean up
69             properly after running 'make partialcheck-test-suite'.
70
71 2009-02-14: wsfulton
72             Extend attribute library support for structs/classes and the accessor functions use
73             pass/return by value semantics. Two new macros are available and usage is identical
74             to %attribute. These are %attributeval for structs/classes and %attributestring for
75             string classes, like std::string. See attribute.swg for more details.
76
77 2009-02-13: wsfulton
78             Add support for %extend and memberin typemaps. Previously the memberin typemaps were
79             ignored for member variables within a %extend block.
80
81 2009-02-12: wsfulton
82             Remove unnecessary temporary variable when wrapping return values that are references. 
83             Example of generated code for wrapping:
84
85               struct XYZ {
86                 std::string& refReturn();
87               };
88
89             used to be:
90
91               std::string *result = 0 ;
92               ...
93               {
94                 std::string &_result_ref = (arg1)->refReturn();
95                 result = (std::string *) &_result_ref;
96               }
97
98              Now it is:
99
100               std::string *result = 0 ;
101               ...
102               result = (std::string *) &(arg1)->refReturn();
103
104 2009-02-08: bhy
105             Change the SIZE mapped by %pybuffer_mutable_binary and %pybuffer_binary in pybuffer.i from
106             the length of the buffer to the number of items in the buffer.
107
108 2009-02-08: wsfulton
109             Fix %feature not working for conversion operators, reported by Matt Sprague, for example:
110               %feature("cs:methodmodifiers") operator bool "protected";
111
112 2009-02-07: wsfulton
113             [MzScheme] Apply #2081967 configure changes for examples to build with recent PLT versions.
114             Also fixes Makefile errors building SWIG executable when mzscheme package is installed 
115             (version 3.72 approx and later).
116
117 2009-02-04: talby
118             [Perl] Fix SF#2564192 reported by David Kolovratnk.
119             SWIG_AsCharPtrAndSize() now handles "get" magic.
120
121 Version 1.3.38 (31 January 2009)
122 ================================
123
124 2009-01-31: bhy
125             [Python] Fix SF#2552488 reported by Gaetan Lehmann. Now %pythonprepend
126             and %pythonappend have correct indentation.
127
128 2009-01-31: bhy
129             [Python] Fix SF#2552048 reported by Gaetan Lehmann. The parameter list
130             of static member function in generated proxy code should not have the
131             'self' parameter.
132
133 2009-01-29: wsfulton
134             Fix regression introduced in 1.3.37 where the default output directory
135             for target language specific files (in the absence of -outdir) was no
136             longer the same directory as the generated c/c++ file.
137
138 2009-01-28: wsfulton
139             [Java, C#] Fix proxy class not being used when the global scope operator
140             was used for parameters passed by value. Reported by David Piepgrass.
141
142 2009-01-15: wsfulton
143             [Perl] Fix seg fault when running with -v option, reported by John Ky.
144
145 Version 1.3.37 (13 January 2009)
146 ================================
147
148 2009-01-13: mgossage
149             [Lua] Added contract support for requiring that unsigned numbers are >=0
150             Rewrote much of Examples/Lua/embed3. 
151             Added a lot to the Lua documentation.
152
153 2009-01-13: wsfulton
154             Fix compilation error when using directors on protected virtual overloaded 
155             methods reported by Sam Hendley.
156
157 2009-01-12: drjoe
158             [R] Fixed handling of integer arrays
159
160 2009-01-10: drjoe
161             [R] Fix integer handling in r to deal correctly with signed
162             and unsigned issues
163
164 2009-01-10: wsfulton
165             Patch  #1992756 from Colin McDonald - %contract not working for classes 
166             in namespace
167
168 2009-01-05: olly
169             Mark SWIGPERL5, SWIGPHP5, and SWIGTCL8 as deprecated in the source
170             code and remove documentation of them.
171
172 2008-12-30: wsfulton
173             Bug #2430756. All the languages now define a macro in the generated C/C++
174             wrapper file indicating which language is being wrapped. The macro name is the
175             same as those defined when SWIG is run, eg SWIGJAVA, SWIGOCTAVE, SWIGCSHARP etc
176             and are listed in the "Conditional Compilation" section in the documentation.
177
178 2008-12-23: wsfulton
179             [Java] Fix #2153773 - %nojavaexception was clearing the exception feature
180             instead of disabling it. Clearing checked Java exceptions also didn't work. 
181             The new %clearjavaexception can be used for clearing the exception feature.
182
183 2008-12-22: wsfulton
184             Fix #2432801 - Make SwigValueWrapper exception safe for when copy constructors
185             throw exceptions.
186
187 2008-12-21: wsfulton
188             Apply patch #2440046 which fixes possible seg faults for member and global
189             variable char arrays when the strings are larger than the string array size.
190
191 2008-12-20: wsfulton
192             The ccache compiler cache has been adapted to work with SWIG and
193             named ccache-swig. It now works with C/C++ compilers as well as SWIG
194             and can result in impressive speedups when used to recompile unchanged
195             code with either a C/C++ compiler or SWIG. Documentation is in CCache.html
196             or the installed ccache-swig man page.
197
198 2008-12-12: wsfulton
199             Apply patch from Kalyanov Dmitry which fixes parsing of nested structs
200             containing comments.
201
202 2008-12-12: wsfulton
203             Fix error message in some nested struct and %inline parsing error situations
204             such as unterminated strings and comments.
205
206 2008-12-07: olly
207             [PHP] Fix warnings when compiling generated wrapper with GCC 4.3.
208
209 2008-12-06: wsfulton
210             [PHP] Deprecate %pragma(php4). Please use %pragma(php) instead.
211             The following two warnings have been renamed:
212             WARN_PHP4_MULTIPLE_INHERITANCE -> WARN_PHP_MULTIPLE_INHERITANCE
213             WARN_PHP4_UNKNOWN_PRAGMA       -> WARN_PHP_UNKNOWN_PRAGMA
214
215             *** POTENTIAL INCOMPATIBILITY ***
216
217 2008-12-04: bhy
218             [Python] Applied patch SF#2158938: all the SWIG symbol names started with Py
219             are changed, since they are inappropriate and discouraged in Python
220             documentation (from http://www.python.org/doc/2.5.2/api/includes.html):
221
222             "All user visible names defined by Python.h (except those defined by
223             the included standard headers) have one of the prefixes "Py" or "_Py".
224             Names beginning with "_Py" are for internal use by the Python implementation
225             and should not be used by extension writers. Structure member names do
226             not have a reserved prefix.
227
228             Important: user code should never define names that begin with "Py" or "_Py".
229             This confuses the reader, and jeopardizes the portability of the user
230             code to future Python versions, which may define additional names beginning
231             with one of these prefixes."
232
233             Here is a brief list of what changed:
234
235                 PySwig* -> SwigPy*
236                 PyObject_ptr -> SwigPtr_PyObject
237                 PyObject_var -> SwigVar_PyObject
238                 PySequence_Base, PySequence_Cont, PySequence_Ref ->
239                         SwigPySequence_Base, SwigPySequence_Cont, SwigPySequence_Ref
240                 PyMap* -> SwigPyMap*
241
242             We provided a pyname_compat.i for backward compatibility. Users whose code having
243             these symbols and do not want to change it could simply include this file
244             at front of your code. A better solution is to run the converting tool on
245             your code, which has been put in SWIG's SVN trunk (Tools/pyname_patch.py) and
246             you can download it here:
247             https://swig.svn.sourceforge.net/svnroot/swig/trunk/Tools/pyname_patch.py 
248
249             *** POTENTIAL INCOMPATIBILITY ***
250
251 2008-12-02: wsfulton
252             [Python] Apply patch #2143727 from Serge Monkewitz to fix importing base classes 
253             when the package option is specified in %module and that module is %import'ed.
254
255 2008-11-28: wsfulton
256             [UTL] Fix #2080497. Some incorrect acceptance of types in the STL, eg a double * element
257             passed into a vector<int *> constructor would be accepted, but the ensuing behaviour
258             was undefined. Now the type conversion correctly raises an exception.
259
260 2008-11-24: wsfulton
261             Add -outcurrentdir option. This sets the default output directory to the current 
262             directory instead of the path specified by the input file. This option enables
263             behaviour similar to c/c++ compilers. Note that this controls the output directory,
264             but only in the absence of the -o and/or -outdir options.
265
266 2008-11-23: wsfulton
267             [ruby] Apply patch #2263850 to fix ruby/file.i ... rubyio.h filename change in 
268             ruby 1.9.
269
270 2008-11-23: wsfulton
271             Apply patch #2319790 from Johan Hake to fix shared_ptr usage in std::tr1 namespace.
272
273 2008-11-21: wsfulton
274             The use of the include path to find the input file is now deprecated.
275             This makes the behaviour of SWIG the same as C/C++ compilers in preparation
276             for use with ccache.
277
278 2008-11-16: wsfulton
279             Fix -nopreprocess option to:
280             - correctly report file names in warning and error messages.
281             - use the original input filename that created the preprocessed output when 
282               determining the C++ wrapper file name (in the absence of -o). Previously 
283               the name of the input file containing the preprocessed output was used.
284
285 2008-11-11: wsfulton
286             [Java] Add patch #2152691 from MATSUURA Takanori which fixes compiles using the
287             Intel compiler
288
289 2008-11-01: wsfulton
290             Add patch #2128249 from Anatoly Techtonik which corrects the C/C++ proxy
291             class being reported for Python docstrings when %rename is used.
292
293 2008-11-01: wsfulton
294             Add the strip encoder patch from Anatoly Techtonik #2130016. This enables an 
295             easy way to rename symbols by stripping a commonly used prefix in all the
296             function/struct names. It works in the same way as the other encoders, such as
297             title, lower, command etc outlined in CHANGES file dated 12/30/2005. Example
298             below will rename wxAnotherWidget to AnotherWidget and wxDoSomething to 
299             DoSomething:
300
301               %rename("%(strip:[wx])s") ""; 
302
303               struct wxAnotherWidget {
304                   void wxDoSomething();
305               };
306
307 2008-09-26: mutandiz
308             [allegrocl]
309             Lots of test-suite work.
310             - Fix ordering of wrapper output and %{ %} header output.
311             - Fix declarations of local vars in C wrappers.
312             - Fix declaration of defined constants in C wrappers.
313             - Fix declaration of EnumValues in C wrappers.
314             - add some const typemaps to allegrocl.swg
315             - add rename for operator bool() overloads.
316         
317 2008-09-25: olly
318             [PHP5] Fill in typemaps for SWIGTYPE and void * (SF#2095186).
319
320 2008-09-22: mutandiz (Mikel Bancroft)
321             [allegrocl]
322             - Support wrapping of types whose definitions are not seen by
323             SWIG. They are treated as forward-referenced classes and if a
324             definition is not seen are treated as (* :void).
325             - Don't wrap the contents of unnamed namespaces.
326             - More code cleanup. Removed some extraneous warnings.
327             - start work on having the allegrocl mod pass the cpp test-suite.
328
329 2008-09-19: olly
330             [PHP5] Add typemaps for long long and unsigned long long.
331
332 2008-09-18: wsfulton
333             [C#] Added C# array typemaps provided by Antti Karanta.
334             The arrays provide a way to use MarshalAs(UnmanagedType.LPArray)
335             and pinning the array using 'fixed'. See arrays_csharp.i library file
336             for details.
337
338 2008-09-18: wsfulton
339             Document the optional module attribute in the %import directive,
340             see Modules.html. Add a warning for Python wrappers when the
341             module name for an imported base class is missing, requiring the
342             module attribute to be added to %import, eg 
343
344               %import(module="FooModule") foo.h
345
346 2008-09-18: olly
347             [PHP5] Change the default input typemap for char * to turn PHP
348             Null into C NULL (previously it was converted to an empty string).
349             The new behaviour is consistent with how the corresponding output
350             typemap works (SF#2025719).
351
352             If you want to keep the old behaviour, add the following typemap
353             to your interface file (PHP's convert_to_string_ex() function does
354             the converting from PHP Null to an empty string):
355
356             %typemap(in) char * {
357                 convert_to_string_ex($input);
358                 $1 = Z_STRVAL_PP($input);
359             }
360
361 2008-09-18: olly
362             [PHP5] Fix extra code added to proxy class constructors in the case
363             where the only constructor takes no arguments.
364
365 2008-09-18: olly
366             [PHP5] Fix wrapping of a renamed enumerated value of an enum class
367             member (SF#2095273).
368
369 2008-09-17: mutandiz (Mikel Bancroft)
370             [allegrocl]
371             - Fix how forward reference typedefs are handled, so as not to conflict
372             with other legit typedefs.
373             - Don't (for now) perform an ffitype typemap lookup when trying to
374             when calling compose_foreign_type(). This is actually a useful thing
375             to do in certain cases, the test cases for which I can't currently
376             locate :/. It's breaking some wrapping behavior that is more commonly
377             seen, however. I'll readd in a more appropriate way when I can
378             recreate the needed test case, or a user complains (which means
379             they probably have a test case).
380             - document the -isolate command-line arg in the 'swig -help' output.
381             It was in the html docs, but not there.
382             - small amount of code cleanup, removed some unused code.
383             - some minor aesthetic changes.
384
385 2008-09-12: bhy
386             [Python] Python 3.0 support branch merged into SWIG trunk. Thanks to
387             Google Summer of Code 2008 for supporting this project! By default
388             SWIG will generate interface files compatible with both Python 2.x
389             and 3.0. And there's also some Python 3 new features that can be
390             enabled by passing a "-py3" command line option to SWIG. These
391             features are:
392
393               - Function annotation support
394                   Also, the parameter list of proxy function will be generated,
395                   even without the "-py3" option. However, the parameter list
396                   will fallback to *args if the function (or method) is overloaded.
397               - Buffer interface support
398               - Abstract base class support
399
400             For details of Python 3 support and these features, please see the
401             "Python 3 Support" section in the "SWIG and Python" chapter of the SWIG
402             documentation.
403
404             The "-apply" command line option and support of generating codes
405             using apply() is removed. Since this is only required by very old
406             Python.
407
408             This merge also patched SWIG's parser to solve a bug. By this patch,
409             SWIG features able to be correctly applied on C++ conversion operator,
410             such like this:
411               
412               %feature("shadow")  *::operator bool %{ ... %}
413
414 2008-09-02: richardb
415             [Python] Commit patch #2089149: Director exception handling mangles
416             returned exception.  Exceptions raised by Python code in directors
417             are now passed through to the caller without change.  Also, remove
418             the ": " prefix which used to be added to other director exceptions
419             (eg, those due to incorrect return types).
420
421 2008-09-02: wsfulton
422             [Python] Commit patch #1988296 GCItem multiple module linking issue when using 
423             directors.
424
425 2008-09-02: wsfulton
426             [C#] Support for 'using' and 'fixed' blocks in the 'csin' typemap is now
427             possible through the use of the pre attribute and the new terminator attribute, eg
428
429               %typemap(csin, 
430                        pre="    using (CDate temp$csinput = new CDate($csinput)) {",
431                        terminator="    } // terminate temp$csinput using block",
432                       ) const CDate &
433                        "$csclassname.getCPtr(temp$csinput)"
434
435             See CSharp.html for more info.
436
437 2008-09-01: wsfulton
438             [CFFI] Commit patch #2079381 submitted by Boris Smilga - constant exprs put into 
439             no-eval context in DEFCENUM
440
441 2008-08-02: wuzzeb
442             [Chicken,Allegro] Commit Patch 2019314
443             Fixes a build error in chicken, and several build errors and other errors
444             in Allegro CL
445
446 2008-07-19: wsfulton
447             Fix building of Tcl examples/test-suite on Mac OSX reported by Gideon Simpson.
448
449 2008-07-17: wsfulton
450             Fix SF #2019156 Configuring with --without-octave or --without-alllang
451             did not disable octave.
452
453 2008-07-14: wsfulton
454             [Java, C#] Fix director typemaps for pointers so that NULL pointers are correctly 
455             marshalled to C#/Java null in director methods.
456
457 2008-07-04: olly
458             [PHP] For std_vector.i and std_map.i, rename empty() to is_empty()
459             since "empty" is a PHP reserved word.  Based on patch from Mark Klein
460             in SF#1943417.
461
462 2008-07-04: olly
463             [PHP] The deprecated command line option "-make" has been removed.  
464             Searches on Google codesearch suggest that nobody is using it now
465             anyway.
466
467 2008-07-04: olly
468             [PHP] The SWIG cdata.i library module is now supported.
469
470 2008-07-03: olly
471             [PHP] The deprecated command line option "-phpfull" has been
472             removed.  We recommend building your extension as a dynamically
473             loadable module.
474
475 2008-07-02: olly
476             [PHP4] Support for PHP4 has been removed.  The PHP developers are
477             no longer making new PHP4 releases, and won't even be providing
478             patches for critical security issues after 2008-08-08.
479
480 2008-07-02: olly
481             [Python] Import the C extension differently for Python 2.6 and
482             later so that an implicit relative import doesn't produce a
483             deprecation warning for 2.6 and a failure for 2.7 and later.
484             Patch from Richard Boulton in SF#2008229, plus follow-up patches
485             from Richard and Haoyu Bai.
486
487 Version 1.3.36 (24 June 2008)
488 =============================
489
490 06/24/2008: wsfulton
491             Remove deprecated -c commandline option (runtime library generation).
492
493 06/24/2008: olly
494             [PHP] Fix assertion failure when handling %typemap(in,numinputs=0)
495             (testcase ignore_parameter).
496
497 06/24/2008: olly
498             [PHP] Fix segfault when wrapping a non-class function marked with
499             %newobject (testcase char_strings).
500
501 06/22/2008: wsfulton
502             [Java] Add a way to use AttachCurrentThreadAsDaemon instead of AttachCurrentThread
503             in director code. Define the SWIG_JAVA_ATTACH_CURRENT_THREAD_AS_DAEMON macro, see
504             Lib/java/director.swg.
505
506 06/21/2008: wsfulton
507             [Ruby] Fix crashing in the STL wrappers (reject! and delete_if methods)
508
509 06/19/2008: wsfulton
510             [Java, C#] C# and Java keywords will be renamed instead of just issuing a warning
511             and then generating uncompileable code. Warning 314 gives the new name when a 
512             keyword is found.
513
514 06/19/2008: wsfulton
515             [R] Keyword handling added. R Keywords will be renamed as necessary.
516             Warning 314 gives the new name when a keyword is found.
517
518 06/17/2008: mgossage
519             [Lua] Added missing support for bool& and bool*. Added runtest for li_typemaps testcase.
520             (Bug #1938142)
521
522 06/07/2008: bhy
523             Added test case keyword_rename, then made the keyword renaming works properly
524             by fixing Swig_name_make() for a incomplete condition checking.
525
526 06/02/2008: wsfulton
527             [Java, C#] Fix enum wrappers when using -noproxy.
528
529 05/30/2008: bhy
530             Added std::wstring into Lib/typemaps/primtypes.swg, since it is also a primitive 
531             type in SWIG - fixed SF #1976978.
532
533 05/29/2008: wsfulton
534             [Java, C#] Fix variable wrappers when using -noproxy.
535
536 05/29/2008: bhy
537             [Python] Fixed a typo of %#ifdef in Lib/python/pycontainer.swg, which is related 
538             to -extranative SWIG option - SF #1971977.
539
540 05/20/2008: wsfulton
541             New partialcheck makefile targets for partial testing of the test-suite. These
542             just invoke SWIG, ie no compilation and no runtime testing. It can be faster
543             when developing by just doing a directory diff of the files SWIG generates
544             against those from a previous run. Example usage from the top level directory:
545
546               make partialcheck-test-suite
547               make partialcheck-java-test-suite
548
549             This change also encompasses more flexibility in running the test-suite, eg
550             it is possible to prefix the command line which runs any target language test
551             with a tool. See the RUNTOOL, COMPILETOOL and SWIGTOOL targets in the common.mk
552             file and makefiles in the test-suite directory. For example it is possible to 
553             run the runtime tests through valgrind using:
554
555               make check RUNTOOL="valgrind --leak-check=full"
556
557             or invoke SWIG under valgrind using:
558
559               make check SWIGTOOL="valgrind --tool=memcheck"
560
561 05/19/2008: drjoe
562             [R] Fixed define that was breaking pre-2.7.  Checked in
563             patch from Soren Sonnenburg that creates strings in  
564             version independent way
565
566 05/15/2008: wsfulton
567             [Java] Fix variable name clash in directors - SF #1963316 reported by Tristan.
568
569 05/14/2008: wsfulton
570             Add an optimisation for functions that return objects by value, reducing
571             the number of copies of the object that are made. Implemented using an
572             optional attribute in the "out" typemap called "optimal". Details in 
573             Typemaps.html.
574
575 05/11/2008: olly
576             [PHP] Check for %feature("notabstract") when generating PHP5 class
577             wrapper.
578
579 05/11/2008: wsfulton
580             Fix SF #1943608 - $self substitution in %contract, patch submitted by
581             Toon Verstraelen.
582
583 05/09/2008: olly
584             [PHP] Fix char * typemaps to work when applied to signed char * and
585             unsigned char * (uncovered by testcase apply_strings).
586
587 05/09/2008: wsfulton
588             Fix wrapping of char * member variables when using allprotected mode.
589             Bug reported by Warren Wang.
590
591 05/09/2008: olly
592             [PHP] Fix bad PHP code generated when wrapping an enum in a
593             namespace (uncovered by testcase arrays_scope).
594
595 05/09/2008: olly
596             [PHP] SWIG now runs the PHP testsuite using PHP5, not PHP4.  PHP4
597             is essentially obsolete now, so we care much more about solid PHP5
598             support.
599
600 05/07/2008: wsfulton
601             STL fixes when using %import rather than %include and the Solaris Workshop
602             compiler and the Roguewave STL.
603
604 05/07/2008: wsfulton
605             Fix wrapping of overloaded protected methods when using allprotected mode.
606             Bug reported by Warren Wang.
607
608 05/03/2008: wsfulton
609             Commit patch #1956607 to add -MT support from Richard Boulton.
610             This patch mirrors the gcc -MT option which allows one to change the default
611             Makefile target being generated when generating makefiles with the -M family
612             of options. For example:
613
614               $ swig -java -MM -MT overiddenname -c++  example.i
615               overiddenname: \
616                example.i \
617                example.h 
618
619 04/30/2008: mgossage
620             [Lua] Removed generation of _wrap_delete_XXXXX (wrappered destructor)
621             which was unused and causing warning with g++ -Wall.
622             Removed other unused warning in typemaps.i and other places.
623             Added Examples/lua/embed3, and run tests a few test cases.
624
625 04/24/2008: olly
626             [Python] Fix generated code for IBM's C++ compiler on AIX (patch
627             from Goeran Uddeborg in SF#1928048).
628
629 04/24/2008: olly
630             Rename BSIZE in Examples/test-suite/arrays_scope.i to BBSIZE to
631             avoid a clash with BSIZE defined by headers on AIX with Perl
632             (reported in SF#1928048).
633
634 04/20/2008: wsfulton
635             Add the ability to wrap all protected members when using directors.
636             Previously only the virtual methods were available to the target language.
637             Now all protected members, (static and non-static variables, non-virtual methods
638             and static methods) are wrapped when using the allprotected mode. The allprotected
639             mode is turned on in the module declaration:
640
641               %module(directors="1", allprotected="1") modulename
642
643 Version 1.3.35 (7 April 2008)
644 =============================
645
646 04/07/2008: wsfulton
647             [Lua] Add missing pointer reference typemaps
648
649 04/06/2008: wsfulton
650             Fix stack overflow when using typemap warning suppression, eg 
651               %warnfilter(SWIGWARN_TYPEMAP_CHARLEAK_MSG)
652
653 04/05/2008: wsfulton
654             [Python] Fix shared_ptr typemaps so that %pythonnondynamic can be used. Also corrects
655             display of the proxy class type. Reported by Robert Lupton.
656
657 04/04/2008: olly
658             [Python] Add %newobject reference to python memory management subsection of manual
659             (patch from mdbeachy in SF#1894610).
660
661 03/27/2008: wsfulton
662             [Python] Fix shared_ptr typemaps where the pointer type is a templated type with
663             with more than one parameter. Reported by Robert Lupton.
664
665 03/27/2008: mgossage
666             [Lua] Added a typemap DISOWN for SWIGTYPE* and SWIGTYPE[], and support for %delobject feature.
667             Added Examples/lua/owner which demonstrates the use of the memory management.
668
669 03/26/2008: wsfulton
670             [Java] Apply patch #1844301 from Monty Taylor to suppress enum constructor
671             unused warnings.
672
673 03/26/2008: wsfulton
674             [Python] Apply patch #1924524 from Casey Raymondson which ensures the
675             "No constructor defined" message is displayed when attempting to call a
676             constructor on a class that doesn't have a constructor wrapper, eg if
677             the C++ class is abstract.
678
679 03/26/2008: wsfulton
680             [Python] Apply patch #1925702 from Casey Raymondson which removes warning 512
681             for std::vector wrappers.
682
683 03/26/2008: olly
684             [Python] Apply GCC 4.3 warnings patch from Philipp Thomas
685             (SF#1925122).
686
687 03/21/2008: wsfulton
688             [Python] Thread safety patch for STL iterators from Abhinandan Jain.
689
690 03/17/2008: mgossage
691             [Lua] Added %luacode feature to add source code into wrappers.
692             Updated documentation to document this.
693             Added Examples/lua/arrays to show its use (and typemaps)
694
695 03/17/2008: olly
696             Fix nonportable sed usage which failed on Mac OS X (and probably
697             other platforms).  Fixes SF#1903612.
698
699 03/17/2008: olly
700             Fix memory leak in SWIG's parser (based on patch from Russell
701             Bryant in SF#1914023).`
702
703 03/12/2008: wsfulton
704             Fix bug #1878285 - unnecessary cast for C struct creation wrappers.
705
706 03/12/2008: wsfulton
707             [Python] Remove debugging info when using shared_ptr support
708
709 03/06/2008: mgossage
710             [Lua] Updated documentation for Lua exceptions.
711             Added Examples/lua/exception and Examples/lua/embed2.
712             Small updates to the typemaps.
713
714 03/04/2008: wsfulton
715             [Java, C#] Add char *& typemaps.
716
717 03/04/2008: wsfulton
718             Fix occasional seg fault when attempting to report overloaded methods as being ignored.
719
720 02/29/2008: wsfulton
721             [Perl] Fix #1904537 Swig causes a Perl warning "x used only once" in Perl 5.10
722             reported by Ari Jolma
723
724 02/29/2008: wsfulton
725             [Python] Add shared_ptr varin/varout typemaps for wrapping global variables.
726
727 02/25/2008: wsfulton
728             Fix $wrapname to work in %exception (fixes some wrap:name assertions)
729
730 Version 1.3.34 (27 February 2008)
731 =================================
732
733 02/13/2008: wsfulton
734             [R] Fix wrapping of global function pointer variables.
735
736 02/13/2008: wsfulton
737             Add new special variables for use within %exception:
738               $wrapname - language specific wrapper name
739               $overname - if a method is overloaded this contains the extra mangling used on 
740                           the overloaded method
741               $decl     - the fully qualified C/C++ declaration of the method being wrapped 
742                           without the return type
743               $fulldecl - the fully qualified C/C++ declaration of the method being wrapped 
744                           including the return type
745
746 02/12/2008: drjoe
747             [R] Now setting S4 flag in SWIG created objects.  This
748             fixes R-SWIG for 2.6 and warning for 2.6 failure has been removed.
749
750 02/11/2008: mgossage
751             [Lua] Added a patch by Torsten Landschoff to fix the unary minus issue
752             Ran 'astyle --style=kr -2' across lua.cxx to neaten it up
753
754 02/10/2008: wsfulton
755             Bump SWIG_RUNTIME_VERSION to 4. This is because of the recently introduced API 
756             change in the conversion functions, ie change in definition of swig_converter_func.
757             Anyone calling SWIG_TypeCast must pass in a valid value for the new additional
758             (third) parameter and then handle the newly created memory if the returned value
759             is set to SWIG_CAST_NEW_MEMORY else a memory leak will ensue.
760
761 02/09/2008: wsfulton
762             [Python] Experimental shared_ptr typemaps added. Usage is the same as the recently
763             added Java and C# shared_ptr typemaps. Two macros are available, although these
764             may well change in a future version:
765
766             For base classes or classes not in an inheritance chain:
767               SWIG_SHARED_PTR(PROXYCLASS, TYPE)
768             For derived classes:
769               SWIG_SHARED_PTR_DERIVED(PROXYCLASS, BASECLASSTYPE, TYPE)
770
771             The PROXYCLASS is the name of the proxy class, but is only required for Java/C#.
772             Example usage:
773
774               %include "boost_shared_ptr.i"
775
776               SWIG_SHARED_PTR(Klass, Space::Klass)
777               SWIG_SHARED_PTR_DERIVED(KlassDerived, Space::Klass, Space::KlassDerived)
778
779               namespace Space {
780                 struct Klass { ... };
781                 struct KlassDerived : Klass { ... };
782               }
783
784             Further details to follow in future documentation, but the following features
785             should be noted:
786
787             - Not restricted to boost::shared_ptr, eg std::tr1::shared_ptr can also be used.
788             - Available typemap groups:
789               (a) Typemaps for shared_ptr passed by value, reference, pointer and pointer 
790                   reference.
791             - (b) Typemaps for passing by raw value, raw pointer, raw reference, raw pointer
792                   reference. 
793             - The code being wrapped does not even have to use shared_ptr, SWIG can use
794               shared_ptr as the underlying storage mechanism instead of a raw pointer due to 
795               the typemaps in group (b) above.
796             - No array support as shared_ptr does not support arrays.
797             - This works quite differently to the usual SWIG smart pointer support when
798               operator-> is parsed by SWIG:
799               - An additional smart pointer class is not generated reducing code bloat in
800                 the wrappers.
801               - Using smart pointers and raw pointers can be mixed seamlessly.
802               - Missing constructors for the smart pointers is no longer a problem and so
803                 separate factory type functions do not have to be written and wrapped.
804               - The implicit C++ shared_ptr< derived class > to shared_ptr< base class >
805                 cast also works in the target language. This negates the necessity to write
806                 an explicit helper cast function providing the upcast which would need
807                 calling prior to passing a derived class to a method taking a shared_ptr to
808                 a base class.
809
810 02/09/2008: wsfulton
811             [Python] Add support for overriding the class registration function via a new
812             "smartptr" feature. This is a very low level of customisation most users
813             would never need to know. The feature will typically be used for intrusive 
814             smart pointers along with additional typemaps. Example usage of the feature:
815
816               %feature("smartptr", noblock=1) Foo { boost::shared_ptr< Foo > }
817               class Foo {};
818
819             The generated Foo_swigregister function will then register boost::shared < Foo >
820             (SWIGTYPE_p_boost__shared_ptrTFoo_t instead of SWIGTYPE_p_Foo) as the underlying
821             type for instantiations of Foo.
822
823 02/09/2008: wsfulton
824             Features now supports the optional 'noblock' attribute for all usage of %feature. 
825             When specified, the { } braces are removed from the feature code. This is identical
826             in behaviour to usage of 'noblock' in typemaps and is used when the preprocessor
827             is required to operate on the code in the feature and the enclosing { } braces
828             are not required. Example:
829
830               #define FOO foo
831               %feature("smartptr", noblock="1") { FOO::bar }
832
833             The preprocessor then reduces this as if this had been used instead:
834
835               %feature("smartptr") "foo::bar"
836
837 02/01/2008: olly
838             [Python] Fix format string bug (SF#1882220).
839
840 01/31/2008: wsfulton
841             Additions to the %types directive. Now the conversion / casting code can be
842             overridden to some custom code in the %types directive, like so:
843
844               %types(fromtype = totype) %{
845                 ... code to convert fromtype to totype and return ...
846               %}
847
848             The special variable $from will be replaced by the name of the parameter of the
849             type being converted from. The code must return the totype cast to void *. Example:
850
851               class Time;
852               class Date;
853               Date &Time::dateFromTime();
854
855               %types(Time = Date) %{
856                 Time *t = (Time *)$from;
857                 Date &d = t->dateFromTime();
858                 return (void *) &d;
859               %}
860
861             resulting in the conversion / casting code looking something like:
862
863               static void *_p_TimeTo_p_Date(void *x) {
864                 Time *t = (Time *)x;
865                 Date &d = t->dateFromTime();
866                 return (void *) &d;
867               }
868
869             This is advanced usage, please use only if you understand the runtime type system.
870
871 01/30/2008: mgossage
872             Small update to documentation in Typemaps.html, to warn about use of local 
873             variables in typemaps for multiple types.
874
875 01/25/2008: wsfulton
876             [Java] Fix bug reported by Kevin Mills in ARRAYSOFCLASSES typemaps where any
877             changes made to an array element passed from Java to C are not reflected back
878             into Java.
879
880 01/24/2008: mgossage
881             More updates to the configure script for detecting lua.
882             Also looks in /usr/include/lua*
883             Also changed typemaps.i not to check for NULL before freeing a pointer
884
885 01/21/2008: wsfulton
886             [Python] For STL containers, SWIG no longer attempts to convert from one
887             STL container to another, eg from std::vector<int> to std::vector<double>
888             or std::list<int> to std::vector<int> or even std::vector<Foo> to
889             std::vector<Bar> as it previously did. In fact SWIG no longer attempts to
890             convert any SWIG wrapped C++ proxy class that is also a Python sequence,
891             whereas previously it would. Any non-SWIG Python sequence will still be
892             accepted wherever an STL container is accepted. Overloaded methods using
893             containers should be faster.
894
895 01/18/2008: wsfulton
896             [C#] Add 'directorinattributes' and 'directoroutattributes' typemap attributes
897             for the imtype typemap. These should contain C# attributes which will
898             be generated into the C# director delegate methods.
899
900 01/18/2008: olly
901             Fix handling of byte value 255 in input files on platforms where
902             char is signed (it was getting mapped to EOF).  Fixes SF#1518219.
903
904 01/16/2008: wsfulton
905             Fix template member variables wrapped by a smart pointer. Bug reported 
906             by Robert Lupton.
907
908 01/14/2008: mgossage
909             Substantial changes to configure script for detecting lua.
910               Code can now link to liblua.a, liblua50.a or liblua51.a
911               It's also a lot neater now.
912
913 12/16/2007: wsfulton
914             [Perl] Backed out #1798728 - numbers can be passed to functions taking char *
915
916 12/16/2007: wsfulton
917             Fix #1832613 - Templates and some typedefs involving pointers or function pointers
918
919 12/12/2007: wsfulton
920             [Java] Fix #1632625 - Compilation errors on Visual C++ 6 when using directors.
921
922 12/12/2007: wsfulton
923             [Perl] Fix #1798728 - numbers can be passed to functions taking char *.
924
925 12/12/2007: wsfulton
926             Fix #1819847 %template with just one default template parameter 
927
928               template<typename T = int> class Foo {...};
929               %template(FooDefault) Foo<>;
930
931 12/12/2007: mgossage
932             [Lua] Small correction on Lua.html
933
934 12/09/2007: wsfulton
935             Apply patch #1838248 from Monty Taylor for vpath builds of SWIG.
936
937 12/08/2007: wsfulton
938             [Lua] Fixes to remove gcc-4.2 warnings
939
940 12/06/2007: wsfulton
941             Fix #1734415 - template template parameters with default arguments such as:
942
943               template<typename t_item, template<typename> class t_alloc = pfc::alloc_fast >
944                 class list_t : public list_impl_t<t_item,pfc::array_t<t_item,t_alloc> > { ... };
945
946 12/04/2007: mgossage
947             [lua] Fix a bug in the class hierachy code, where the methods were not propagated, 
948             if the name ordering was in a certain order.
949             Added new example programs (dual, embed) and runtime tests for test-suite.
950
951 11/30/2007: wsfulton
952             Fix using statements using a base class method where the methods were overloaded.
953             Depending on the order of the using statements and method declarations, these
954             were previously generating uncompileable wrappers, eg:
955
956               struct Derived : Base {
957                 virtual void funk();
958                 using Base::funk;
959               };
960
961 Version 1.3.33 (November 23, 2007)
962 ==================================
963
964 11/21/2007: mikel
965             [allegrocl] omit private slot type info in the classes/types
966             defined on the lisp side. Fix bug in mapping of C/++ types
967             to lisp types. Fix typo in modules generated defpackage form.
968             Have std::string *'s automatically marshalled between foreign
969             and lisp strings.
970         
971 11/20/2007: olly
972             [Python] Fill in Python Dictionary functions list (patch from
973             Jelmer Vernooij posted to swig-devel).
974
975 11/20/2007: beazley
976             Fixed a bug in the C scanner related to backslash characters.
977
978 11/19/2007: wsfulton
979             [Perl] Fix broken compilation of C++ wrappers on some compilers.
980
981 11/16/2007: olly
982             [Python] Don't pass Py_ssize_t for a %d printf-like format as
983             that's undefined behaviour when sizeof(Py_ssize_t) != sizeof(int).
984
985 Version 1.3.32 (November 15, 2007)
986 ==================================
987
988 11/14/2007: wsfulton
989             [R] Package name and dll name is now the same as the SWIG module
990             name. It used to be the module name with _wrap as a suffix. The package
991             and dll names can be modified using the -package and -dll commandline
992             options.
993
994             *** POTENTIAL INCOMPATIBILITY ***
995
996 11/11/2007: wsfulton
997             [R] Add support for Windows (Visual C++ 8 tested)
998
999 11/10/2007: olly
1000             [php] Fix makefile generated by -make (SF#1633679).  Update
1001             documentation to mark "-make" as deprecated (none of the other
1002             SWIG backends seem to offer such a feature, it can't realistically
1003             generate a fully portable makefile, and the commands to build an
1004             extension are easy enough to write for the user's preferred build
1005             tool).  Also recommend against the use of "-phpfull" (it's only
1006             really useful when static linking, and a dynamically loadable
1007             module is virtually always the better approach).
1008
1009 11/09/2007: olly
1010             Fix --help output to note that `export SWIG_FEATURES' is required.
1011
1012 10/29/2007: wsfulton
1013             [R] Fix seg fault on Windows
1014             [R] Examples R scripts are now platform independent
1015
1016 10/30/2007: mgossage
1017             [lua] fixed bug in template classes which cases template_default2
1018             and template_specialization_defarg to fail.
1019             Added several warning filters into the overload's test cases.
1020             Added runtime tests for several codes.
1021             You can now make check-lua-test-suite with no errors and only a few warnings.
1022
1023 10/30/2007: olly
1024             [guile] Fix the configure test to put GUILELINK in LIBS not LDFLAGS
1025             (SF#1822430).
1026
1027 10/30/2007: olly
1028             [guile] Fix the guile examples on 64-bit platforms.
1029
1030 10/29/2007: wsfulton
1031             [C#] Fix member pointers on 64 bit platforms.
1032
1033 10/28/2007: olly
1034             [lua] Fix swig_lua_class instances to be static to allow multiple
1035             SWIG wrappers to be compiled into the same executable statically.
1036             Patch from Andreas Fredriksson (posted to the swig mailing list).
1037
1038 10/28/2007: olly
1039             [lua] Fix Examples/lua to pass SRCS for C tests rather than CXXSRCS.
1040             The code as it was happened to work on x86, but broke on x86_64 (and
1041             probably any other platforms which require -fPIC).
1042
1043 10/28/2007: wsfulton
1044             [Java, C#] New approach for fixing uninitialised variable usage on error in director
1045             methods using the new templated initialisation function SwigValueInit().
1046
1047 10/28/2007: wsfulton
1048             [Perl] Use more efficient SvPV_nolen(x) instead of SvPV(x,PL_na) if SvPV_nolen is
1049             supported.
1050
1051 10/26/2007: wuzzeb
1052             [Chicken] Fix global variables of class member function pointers.
1053             Other minor fixes, so all tests in the chicken test suite now pass
1054
1055 10/25/2007: olly
1056             Fix UTL typecheck macro for a function taking char[] or const
1057             char[] (SF#1820132).
1058
1059 10/22/2007: mkoeppe
1060             [Guile] Filter out -ansi -pedantic from CFLAGS while compiling test programs for Guile
1061             in configure.  This enables running the test suite for Guile if it is installed and
1062             usable.
1063
1064 10/22/2007: mkoeppe
1065             [Guile -scm] Fix testcases apply_signed_char and apply_strings
1066             by adding explicit casts to the appropriate $ltype.
1067
1068 10/22/2007: wsfulton
1069             [Java, C#] Fix uninitialised variable usage on error in director methods.
1070
1071 10/19/2007: wsfulton
1072             [Java, C#] Bug #1794247 - fix generated code for derived classes when csbase or javabase
1073             typemaps are used with the replace="1" attribute.
1074
1075 10/19/2007: wsfulton
1076             [Python] Docs updated to suggest using distutils. Patch #1796681 from Christopher Barker.
1077
1078 10/19/2007: olly
1079             [perl5] Clear errno before calls to strtol(), strtoul(), strtoll()
1080             and strtoull() which we check errno after to avoid seeing a junk
1081             value of errno if there isn't an error in the call.
1082
1083 10/16/2007: wsfulton
1084             Deprecate %attribute_ref and replace with %attributeref. There is just an argument
1085             order change in order to maintain consistency with %attribute, from:
1086
1087               %attribute_ref(Class, AttributeType, AccessorMethod, AttributeName)
1088             to
1089               %attributeref(Class, AttributeType, AttributeName, AccessorMethod)
1090
1091 10/16/2007: olly
1092             [Tcl] Fix several ocurrences of "warning: deprecated conversion
1093             from string constant to 'char*'" from GCC 4.2 in generated C/C++
1094             code.
1095
1096 10/16/2007: olly
1097             [PHP] Fix many occurrences of "warning: deprecated conversion from
1098             string constant to 'char*'" from GCC 4.2 in generated C/C++ code
1099             when compiling with a new enough version of PHP 5 (tested with
1100             PHP 5.2.3, but PHP 5.2.1 is probably the minimum requirement).
1101
1102 10/15/2007: wsfulton
1103             Patch #1797133 from David Piepgrass fixes %attribute when the getter has the same name
1104             as the attribute name and no longer generate non-functional setter for read-only attributes.
1105
1106 10/15/2007: olly
1107             [Tcl] Prevent SWIG_Tcl_ConvertPtr from calling the unknown proc.
1108             Add Examples/tcl/std_vector/ which this change fixes.  Patch
1109             is from "Cliff C" in SF#1809819.
1110
1111 10/12/2007: wsfulton
1112             [Java] Add DetachCurrentThread back in for directors. See entry dated 08/11/2006 and
1113             search for DetachCurrentThread on the mailing lists for details. The crashes on Solaris
1114             seem to be only present in jdk-1.4.2 and lower (jdk-1.5.0 and jdk-1.6.0 are okay), so
1115             anyone using directors should use a recent jdk on Solaris, or define (see director.swg)
1116             SWIG_JAVA_NO_DETACH_CURRENT_THREAD to the C++ compiler to get old behaviour.
1117
1118 10/12/2007: wsfulton
1119             [Java] Ensure the premature garbage collection prevention parameter (pgcpp) is generated
1120             when there are C comments in the jtype and jstype typemaps.
1121
1122 10/12/2007: wuzzeb
1123             Added a testsuite entry for Bug #1735931
1124
1125 10/09/2007: olly
1126             Automatically rerun autogen.sh if configure.in is modified.
1127
1128 10/09/2007: olly
1129             Enhance check-%-test-suite rule and friends to give a more helpful
1130             error message if you try them for a language which doesn't exist
1131             (e.g. "make check-php-test-suite" rather than the correct
1132             "make check-php4-test-suite").
1133
1134 10/09/2007: olly
1135             Add make rule to regenerate Makefile from Makefile.in if it has
1136             changed.
1137
1138 10/09/2007: olly
1139             [php] Fix long-standing memory leak in wrapped constructors and
1140             wrapped functions/methods which return an object.
1141
1142 10/08/2007: olly
1143             Fix Makefile.in to read check.list files correctly in a VPATH
1144             build.
1145
1146 10/07/2007: wsfulton
1147             [C#, Java] Experimental shared_ptr typemaps added
1148
1149 09/27/2007: mgossage
1150             [lua] added more verbose error messages for incorrect typechecks.
1151             Added a routine which checks the exact number of parameters passed to a function
1152             (breaks operator_overloading for unary minus operator, currently disabled).
1153             Reorganised the luatypemaps.swg to tidy it up.
1154             Added a lot of %ignores on the operators not supported by lua.
1155             Added support for constant member function pointers & runtest for member_pointer.i
1156             Added first version of wchar.i
1157
1158 09/25/2007: wsfulton
1159             [C#, Java] throws typemaps for std::wstring using C# patch #1799064 from David Piepgrass
1160
1161 09/24/2007: wsfulton
1162             [Tcl] Apply #1771313 to fix bug #1650229 - fixes long long and unsigned long long
1163             handling.
1164
1165 09/20/2007: olly
1166             [Java] Eliminate some unnecessary uses of a temporary buffer
1167             allocated using new[].  SF#1796609.
1168
1169 09/19/2007: wsfulton
1170             [C#] The $csinput special variable can be used in the csvarin typemap where it is always
1171             expanded to 'value'.
1172
1173 09/19/2007: wsfulton
1174             [C#] Fix bug reported by Glenn A Watson and #1795260 where the cstype typemap used the 'ref'
1175             keyword in the typemap body, it produced uncompilable C# properties (variable wrappers).
1176             The type for the property now correctly comes from the 'out' attribute in the cstype typemap.
1177
1178 09/19/2007: wsfulton
1179             [Java] Fix const std::wstring& typemaps
1180
1181 09/19/2007: wsfulton
1182             [Java] Ensure the premature garbage collection prevention parameter (pgcpp) is generated
1183             where a parameter is passed by pointer reference, eg in the std::vector wrappers. The pgcpp
1184             is also generated now when user's custom typemaps use a proxy class in the jstype typemap
1185             and a 'long' in the jtype typemap.
1186
1187 09/18/2007: olly
1188             [php] Add typemaps for handling parameters of type std::string &
1189             which are modified by the wrapped function.
1190
1191 09/17/2007: olly
1192             [python] Split potentially long string literals to avoid hitting
1193             MSVC's low fixed limit on string literal length - patch from
1194             SF#1723770, also reported as SF#1630855.
1195
1196 09/17/2007: olly
1197             [ocaml] Fix renaming of overloaded methods in the method_table -
1198             my patch from SF#940399.
1199
1200 09/17/2007: olly
1201             [python] Simpler code for SWIG_AsVal_bool() which fixes a "strict
1202             aliasing" warning from GCC - patch from SF#1724581 by Andrew
1203             Baumann.
1204
1205 09/17/2007: olly
1206             [perl5] Use sv_setpvn() to set a scalar from a pointer and length
1207             - patch from SF#174460 by "matsubaray".
1208
1209 09/17/2007: olly
1210             When wrapping C++ code, generate code which uses
1211             std::string::assign(PTR, LEN) rather than assigning
1212             std::string(PTR, LEN).  Using assign generates more efficient code
1213             (tested with GCC 4.1.2).
1214
1215 09/07/2007: wsfulton
1216             Fix %ignore on constructors which are not explicitly declared [SF #1777712]
1217
1218 09/05/2007: wuzzeb (John Lenz)
1219             - Change r_ltype in typesys.c to store a hashtable instead of a single value.
1220               several very subtle bugs were being caused by multiple ltypes being mapped
1221               to a single mangled type, mostly when using typedefed template parameters.
1222               Now, r_ltype stores a hashtable of possible ltypes, and when generating the
1223               type table, all the ltypes are added into the swig_type_info structure.
1224
1225 08/31/2007: wsfulton
1226             SF #1754967 from James Bigler.
1227             - Fix bug in turning on warnings that were turned off by default. Eg 'swig -w+309' will now
1228               turn on the normally suppressed warning 309.
1229
1230             - New -Wextra commandline option which enables the extra warning numbers:
1231               202,309,403,512,321,322 (this is the list of warnings that have always been suppressed by
1232               default). By specifying -Wextra, all warnings will be turned on, but unlike -Wall,
1233               warnings can still be selectively turned on/off using %warnfilter,
1234               #pragma SWIG nowarn or further -w commandline options, eg:
1235                 swig -Wextra -w309
1236               will turn on all warnings except 309.
1237
1238 08/28/2007: wsfulton
1239             - New debugging options, -debug-module <n> and -debug-top <n> to display the parse tree at
1240               various stages, where <n> is a comma separated list of stages 1-4.For example, to
1241               display top of parse tree at stages 1 and 3:
1242                 swig -debug-top 1,3
1243
1244             - Deprecate the following options which have equivalents below:
1245               -dump_parse_module    =>   -debug-module 1
1246               -dump_module          =>   -debug-module 4
1247               -dump_parse_top       =>   -debug-top 1
1248               -dump_top             =>   -debug-top 4
1249
1250             - Renamed some commandline options for naming consistency across all options:
1251               -debug_template  =>   -debug-template
1252               -debug_typemap   =>   -debug-typemap
1253               -dump_classes    =>   -debug-classes
1254               -dump_tags       =>   -debug-tags
1255               -dump_typedef    =>   -debug-typedef
1256               -dump_memory     =>   -debug-memory
1257
1258 08/25/2007: olly
1259             [PHP5] Fix handling of double or float parameters with an integer
1260             default value.
1261
1262 08/25/2007: olly
1263             [PHP5] Generate __isset() methods for setters for PHP 5.1 and later.
1264
1265 08/20/2007: wsfulton
1266             [Java C#] Fix director bug #1776651 reported by Stephane Routelous which occurred when
1267             the director class name is the same as the start of some other symbols used within
1268             the director class.
1269
1270 08/17/2007: wsfulton
1271             Correct behaviour for templated methods used with %rename or %ignore and the empty
1272             template declaration - %template(). A warning is issued if the method has not been
1273             renamed.
1274
1275 08/16/2007: mutandiz (Mikel Bancroft)
1276             [allegrocl] Name generated cl file based on input file rather than by
1277             module name. It was possible to end up with a mypackage.cl and a test_wrap.c
1278             when parsing a test.i input file. Confusing. Also, include external-format
1279             templates for :fat and :fat-le automatically to avoid these being compiled
1280             at runtime.
1281
1282 08/15/2007: efuzzyone
1283             [cffi] Apply patch #1766076 from Leigh Smith adding support for newly introduced
1284             in cffi :long-long and :unsigned-long-long.
1285
1286 08/10/2007: wsfulton
1287             [Java] Add documentation patch #1743573 from Jeffrey Sorensen. It contains a neat
1288             idea with respect to better memory management by the JVM of C++ allocated memory.
1289
1290 08/10/2007: wsfulton
1291             [Perl] Apply patch #1771410 from Wade Brainerd to fix typedef XS(SwigPerlWrapper) in
1292             perlrun.swg for ActiveState Perl build 822 and Perl 5.8.9 and 5.10 branches.
1293
1294 08/10/2007: wsfulton
1295             [Lua] const enum reference typemaps fixed.
1296
1297 08/09/2007: wsfulton
1298             [C#] Added missing support for C++ class member pointers.
1299
1300 08/09/2007: wsfulton
1301             [C#, Java] Add support for $owner in the "out" typemaps like in the the scripting
1302             language modules. Note that $owner has always been supported in the "javaout" / "csout"
1303             typemaps.
1304
1305 08/01/2007: wsfulton
1306             Fix smart pointer handling for classes that have templated methods within the smart
1307             pointer type. Problem reported by craigdo at ee.washington.edu.
1308
1309 07/31/2007: efuzzyone
1310             [cffi] fixed memory access after being freed bug. thanks to Martin Percossi.
1311             package name clos changed to cl. thanks to Ralf Mattes
1312
1313 07/24/2007: wsfulton
1314             Parallel make support added for the examples and test-suite for developers who have
1315             more than one CPU. Now parallel make can be used for checking in addition to building
1316             the SWIG executable. Some typical checking examples:
1317
1318               make -j8 -k check
1319               make -j4 check-java-test-suite
1320               make -j2 check-java-examples
1321
1322 07/19/2007: mgossage
1323             Fixed bug that stopped configure working on mingw (applied dos2unix to configure.in)
1324
1325 07/10/2007: mgossage
1326             [lua] Extra compatibility with Lua 5.1 (updated SWIG_init, docs, examples, test suite)
1327             Removed name clash for static link of multiple modules
1328
1329 07/05/2007: mgossage
1330             [lua] Fix a bug in SWIG_ALLOC_ARRAY()
1331             improved the error messages for incorrect arguments.
1332             Changed the output of swig_type() to use the human readable form of the type,
1333             rather than the raw swig type.
1334
1335 07/03/2007: wsfulton
1336             [C#] Fix directors for some overloaded methods where the imtype resulted in identical
1337             methods being generated in the C# director class, eg void foo(int *) and void foo(double *)
1338             used to generated two of these:
1339
1340               private void SwigDirectorfoo(IntPtr p) { ... }
1341
1342 06/25/2007: wsfulton
1343             [Java, C#] Some parameter name changes in std_vector.i allowing better targeting
1344             of typemaps for method parameters (for memory management of containers of pointers).
1345
1346 06/07/2007: mutandiz (Mikel Bancroft)
1347             [allegrocl]
1348             fix foreign-type constructor to properly look for ffitype typemap
1349             bindings. fix inout_typemaps.i for strings.
1350
1351 06/06/2007: olly
1352             [Ruby]
1353             Use whichever of "long" or "long long" is the same size as "void*"
1354             to hold pointers as integers, rather than whichever matches off_t.
1355             Fixes compilation on OS X and GCC warnings on platforms where
1356             sizeof(void*) < sizeof(off_t) (SF patch #1731979).
1357
1358 06/06/2007: olly
1359             [PHP5]
1360             Fix handling of a particular case involving overloaded functions
1361             with default parameters.
1362
1363 06/05/2007: mutandiz (Mikel Bancroft)
1364             [allegrocl]
1365             Fix case where we'd pass fully qualified identifiers
1366             (i.e. NS1::NS2::FOO) to swig-insert-id. All namespaces
1367             should be stripped.
1368
1369             Fix bug in TypedefHandler introduced by last fix.
1370
1371 06/05/2007: olly
1372             Fix reporting of filenames in errors after %include (patch from
1373             Leigh Smith in #1731040; also reported as #1699940).
1374
1375 05/31/2007: olly
1376             [Python]
1377             Fix "missing initialiser" warning when compiling generated C/C++
1378             wrapper code with Python 2.5 with warnings enabled (patch from
1379             bug#1727668 from Luke Moore).
1380
1381 05/29/2007: olly
1382             [Python]
1383             Split docstrings into separate string literals at each newline when
1384             generating C/C++ wrapper code (the C/C++ compiler will just combine
1385             them back into a single string literal).  This avoids MSVC
1386             complaining that the strings are too long (problem reported by
1387             Bo Peng on the mailing list).
1388
1389 05/28/2007: olly
1390             [Python]
1391             Escape backslashes in docstrings.
1392
1393 05/26/2007: olly
1394             [Python]
1395             Fix autodoc generation of enums to be more consistent with how the
1396             enums are wrapped - patch #1697226 from Josh Cherry.
1397
1398 05/26/2007: olly
1399             [PHP5]
1400             Fix wrapping of methods and functions which return a pointer to a
1401             class (bug#1700788) and those which have overloaded forms returning
1402             both classes and non-classes (bug#1712717, thanks to Simon
1403             Berthiaume for the patch).
1404
1405 05/25/2007: wsfulton
1406             Fixed %rename inconsistency in conversion operators as reported by Zhong Ren. The matching
1407             is now done on the operator name in the same way as it is done for parameters. For example:
1408
1409               %rename(opABC) Space::ABC::operator ABC() const;
1410               %rename(methodABC) Space::ABC::method(ABC a) const;
1411               namespace Space {
1412                 class ABC {
1413                   public:
1414                     void method(ABC a) const {}
1415                     operator ABC() const { ABC a; return a; }
1416                 };
1417               }
1418
1419             Note that qualifying the conversion operator previously may or may not have matched.
1420             Now it definitely won't, so this will not match:
1421
1422               %rename(opABC) Space::ABC::operator Space::ABC() const;
1423
1424             in the same way that this does not match:
1425
1426               %rename(methodABC) Space::ABC::method(Space::ABC a) const;
1427
1428             The documentation has been improved with respect to %rename, namespaces and templates.
1429             Conversion operators documentation too.
1430
1431             *** POTENTIAL INCOMPATIBILITY ***
1432
1433 05/16/2007: mutandiz
1434             [allegrocl]
1435             Fix bad generation of local var ltype's in functionWrapper().
1436             Try to work better with the backward order in which swig
1437             unrolls nested class definitions.
1438             cleaned up a little unnecessary code/debug printf's.
1439             Remove warning when replacing $ldestructor for ff:foreign-pointer
1440
1441 05/12/2007: olly
1442             [Python]
1443             swig -python -threads now generates C/C++ code which uses Python's
1444             own threading abstraction (from pythread.h) rather than OS specific
1445             code.  The old code failed to compile on MS Windows.  (See SF patch
1446             tracker #1710341).
1447
1448 05/04/2007: gga
1449             [Ruby]
1450             Changed STL renames to be global renames.  This fixes
1451             STL functions not being renamed when autorename is on.
1452             This is a not a totally perfect work-around, but better.
1453             Someone really needs to fix the template renaming code.
1454             (See bug #1545634)
1455
1456 05/04/2007  gga
1457             [All]
1458             Changed %rename("%(undercase)s") a little so that single
1459             numbers at the end of a function are not undercased.  That is:
1460                 getSomething -> get_something
1461                 get2D        -> get_2d
1462                 get234       -> get_234
1463             BUT:
1464                 asFloat2     -> as_float2
1465             (Bug #1699714)
1466
1467 05/03/2007: gga
1468             [Ruby]
1469             Made __swigtype__ => @__swigtype__ so it can be accessed
1470             from the scripting language (and follows Ruby's official
1471             documentation, just in case).
1472             Made tracking => @__trackings__ for same reason.
1473             Currently storing ivars without the @ seems valid, but
1474             the PickAxe says this is not correct, so just in case...
1475
1476 05/03/2007: gga
1477             [Ruby]
1478             Applied patch for -minherit bug and exception classes.
1479             This issue should be revisited more closely, as Multiple
1480             Inheritance in Ruby is still problematic.
1481             (patch/bug #1604878)
1482
1483 05/03/2007: gga
1484             [Ruby]
1485             Overloaded functions in ruby will now report to the user
1486             the possible prototypes when the user mistypes the number or
1487             type of a parameter.
1488
1489 05/03/2007: gga
1490             [Ruby]
1491             Forgot to document the bug fixing of an old bug regarding
1492             exceptions.
1493             (bug #1458247)
1494
1495 05/03/2007: gga
1496             [Ruby]
1497             Fixed Ruby documentation to use the proper css styles for
1498             each section. Added autodoc section to Ruby's docs to
1499             document the features supported by Ruby in documenting its modules.
1500             Made rdoc documentation spit out the full name of the class +
1501             method name.  Albeit this will make the current rdoc not recognize
1502             the method, this is still needed to disambiguate between different
1503             classes with similar methods (rdoc was created to document the
1504             ruby source which only contains one class per c file, unlike swig)
1505             I have patched rdoc to make it more friendly to swig.  This
1506             patch needs to be merged in the ruby std library now.
1507
1508 05/03/2007: gga
1509             [Ruby]
1510             Changed flag -feature to be -init_name to better reflect its
1511             purpose and avoid confusion with -features.
1512
1513 05/03/2007: gga
1514             [Ruby]
1515             Improved autodoc generation.
1516             Added autodoc .swg files to Ruby library for easily adding
1517             documentation to common Ruby methods and STL methods.
1518             Fixed autodoc documenting of getters and setters and module.
1519             Made test suite always generate autodocs.
1520
1521 05/03/2007: gga
1522             [Ruby]
1523             Removed some warnings from STL and test suite.
1524
1525 05/02/2007: mgossage
1526             [Lua] Fixed issues with C++ classes and hierachies across multiple
1527             source files. Fixed imports test case & added run test.
1528             Added Examples/imports.
1529             Added typename for raw lua_State*
1530             Added documentation on native functions.
1531
1532 05/02/2007: gga
1533             [Ruby]
1534             Docstrings are now supported.
1535             %feature("autodoc") and %feature("docstring") are now
1536             properly supported in Ruby.  These features will generate
1537             a _wrap.cxx file with rdoc comments in them.
1538
1539 05/02/2007: gga
1540             [Ruby]
1541             STL files have been upgraded to follow the new swig/python
1542             Lib/std conventions.
1543             This means std::vector, std::set, std::map, set::multimap,
1544             std::multiset, std::deque and std::string are now properly
1545             supported, including their iterators, support for containing
1546             ruby objects (swig::GC_VALUE) and several other ruby
1547             enhancements.
1548             std::complex, std::ios, std::iostream, std::iostreambuf and
1549             std::sstream are now also supported.
1550             std::wstring, std::wios, std::wiostream, std::wiostreambuf
1551             and std::wsstream are supported verbatim with no unicode
1552             conversion.
1553
1554             std_vector.i now mimics the behavior of Ruby Arrays much more
1555             closely, supporting slicing, shifting, unshifting,
1556             multiple indexing and proper return values on assignment.
1557
1558             COMPATABILITY NOTE: this changes the older api a little bit in
1559             that improper indexing would previously (incorrectly) raise
1560             exceptions.  Now, nil is returned instead, following ruby's
1561             standard Array behavior.
1562
1563 05/02/2007: gga
1564             [Ruby]
1565             Changed the value of SWIG_TYPECHECK_BOOL to be 10000 (ie. higher
1566             than that of all integers).
1567             This is because Ruby allows typecasting
1568             integers down to booleans which can make overloaded functions on
1569             bools and integers to fail.
1570             (bug# 1488142)
1571
1572 05/02/2007: gga
1573             [Ruby]
1574             Fixed a subtle bug in multiple argouts that could get triggered if
1575             the user returned two or more arguments and the first one was an
1576             array.
1577
1578 05/01/2007: gga
1579             [Ruby]
1580             Improved the documentation to document the new features
1581             added, add directorin/out/argout typemaps, etc.
1582
1583 05/01/2007: gga
1584             [Ruby]
1585             Added %initstack and %ignorestack directives for director
1586             functions.  These allow you to control whether a director
1587             function should re-init the Ruby stack.
1588             This is sometimes needed for an embedded Ruby where the
1589             director method is used as a C++ callback and not called
1590             by the user from ruby code.
1591             Explanation:
1592             Ruby's GC needs to be aware of the running OS stack in order to
1593             mark any VALUE (Ruby objects) it finds there to avoid collection
1594             of them.  This allows the ruby API to be very simple and allows
1595             you to write code like "VALUE a = sth" anywhere without needing
1596             to do things like refcounting like python.
1597             By default, the start of the stack is set when ruby_init() is
1598             called.   If ruby is inited within main(), as it usually is the
1599             case with the main ruby executable, ruby will be able to calculate
1600             its stack properly.  However, when this is not possible, as when
1601             ruby is embedded as a plugin to an application where main is not
1602             available, ruby_init() will be called in the wrong place, and
1603             ruby will be incorrectly tracking the stack from the function
1604             that called ruby_init() forwards only, which can lead to
1605             all sorts of weird crashes or to ruby thinking it has run out of
1606             stack space incorrectly.
1607             To avoid this, director (callback) functions can now be tagged
1608             to try to reset the ruby stack, which will solve the issues.
1609             NOTE: ruby1.8.6 still contains a bug in it in that its function
1610             to reset the stack will not always do so.  This bug is triggered
1611             very rarely, when ruby is called from two very distinct places
1612             in memory, like a branch of main() and another dso.  This bug
1613             has now been reported to ruby-core and is pending further
1614             investigation.
1615             (bug #1700535 and patch #1702907)
1616
1617 04/30/2007: wsfulton
1618             Fix #1707582 - Restore building from read-only source directories.
1619
1620 04/30/2007: gga
1621             [Ruby]
1622             Ruby will now report the parameter index properly on type
1623             errors as well as the class and value of the incorrect
1624             argument passed.
1625             (feature request #1699670)
1626
1627 04/30/2007: gga
1628             [Ruby]
1629             Ruby no longer creates the free_Class function if the class
1630             contains its own user defined free function (%freefunc).
1631             (bug #1702882)
1632
1633 04/30/2007: gga
1634             [Ruby]
1635             Made directors raise a ruby exception for incorrect argout
1636             returned values if RUBY_EMBEDDED is set, instead of throwing
1637             an actual SwigDirector exception.
1638             This will prevent crashes when ruby is embedded and unaware
1639             of the SwigDirector exception.
1640
1641 04/30/2007: gga
1642             [Ruby]
1643             Removed the need for -DSWIGEXTERN.
1644             Changed swig_ruby_trackings to be a static variable, but also
1645             be kept within a hidden instance variable in the SWIG module.
1646             This allows properly dealing with trackings across multiple
1647             DSOs, which was previously broken.
1648             (bug #1700535 and improvement to patch #1702907)
1649
1650 04/29/2007: gga
1651             [Ruby] Fixed GC memory issues with trackings that could lead
1652             to segfaults when dealing, mainly, with static variables.
1653             (bug #1700535 and patch #1702907)
1654
1655 04/29/2007: gga
1656             [Ruby]
1657             Fixed String conversion using old ruby1.6 macros.  Now
1658             StringValuePtr() is used if available.  This removes warnings
1659             when converting strings with \0 in them.
1660             (bug #1700535 and patch #1702907)
1661
1662 04/29/2007: gga
1663             [Ruby]
1664             Fixed the argout count in directors for Ruby.  Previously,
1665             ignored or "numinputs=0" typemaps would incorrectly not get
1666             counted towards the argout count.
1667             (bug/patch #1545585)
1668
1669 04/29/2007: gga
1670             [Ruby]
1671             Upgraded Ruby converter to recognize "numinputs=0".  Previously,
1672             only the old "ignore" flag was checked (which would currently
1673             still work properly, but is deprecated).
1674
1675 04/29/2007: gga
1676             [Ruby - but should be made generic]
1677
1678             %feature("numoutputs","0") added.
1679
1680             This feature allows you to ignore the output of a function so
1681             that it is not added to a list of output values
1682             ( ie. argouts ).
1683             This should also become a feature of %typemap(directorout)
1684             as "numoutputs"=0, just like "numinputs"=0 exists.
1685
1686             %feature("directors"=1)
1687
1688             %include <typemaps.i>
1689
1690             %feature("numoutputs","0") { Class::member_function1 };
1691             %typemap(out) MStatus { // some code, like check mstatus
1692                                     // and raise exception if wrong };
1693
1694             %inline %{
1695               typedef int MStatus;
1696               class Class {
1697
1698               // one argument returned, but director out code added
1699               // MStatus is discarded as a return (out) parameter.
1700               virtual MStatus member_function1( int& OUTPUT );
1701
1702               // two arguments returned, director out code added
1703               // MStatus is not discarded
1704               virtual MStatus member_function2( int& OUTPUT );
1705               };
1706             %}
1707
1708
1709 04/21/2007: olly
1710             Fix parsing of float constants with an exponent (e.g. 1e-02f)
1711             (bug #1699646).
1712
1713 04/20/2007: olly
1714             [Python] Fix lack of generation of docstrings when -O is used.
1715             Also, fix generation of docstrings containing a double quote
1716             character.  Patch from Richard Boulton in bug#1700146.
1717
1718 04/17/2007: wsfulton
1719             [Java, C#] Support for adding in Java/C# code before and after the intermediary call,
1720             specifically related to the marshalling of the proxy type to the intermediary type.
1721             The javain/csin typemap now supports the 'pre' and 'post' attributes to achieve this.
1722             The javain typemap also supports an optional 'pgcppname' attribute for premature garbage
1723             collection prevention parameter naming and the csin typemap supports an optional 'cshin'
1724             attribute for the parameter type used in a constructor helper generated when the type is used
1725             in a constructor. Details in the Java.html and CSharp.html documentation.
1726
1727 04/16/2007: olly
1728             Don't treat `restrict' as a reserved identifier in C++ mode
1729             (bug#1685534).
1730
1731 04/16/2007: olly
1732             [PHP5] Fix how zend_throw_exception() is called (bug #1700785).
1733
1734 04/10/2007: olly
1735             Define SWIGTEMPLATEDISAMBIGUATOR to template for aCC (reported on
1736             swig-user that this is needed).
1737
1738 04/04/2007: olly
1739             [PHP5] If ZTS is enabled, release <module>_globals_id in MSHUTDOWN
1740             to avoid PHP interpreter crash on shutdown.  This solution was
1741             suggested here: http://bugs.php.net/bug.php?id=40985
1742
1743 04/03/2007: olly
1744             [PHP4] Add missing ZTS annotations to generated C++ wrapper code
1745             to fix compilation failures when using ZTS enabled SWIG (Linux
1746             distributions tend to disable ZTS, but notably the Windows build
1747             uses it by default).
1748
1749 04/01/2007: efuzzyone
1750             [CFFI] Patch #1684261: fixes handling of unsigned int literals, thanks Leigh Smith.
1751             Also, improved documentation.
1752
1753 03/30/2007: olly
1754             Avoid generating '<:' token when using SwigValueWrapper<> on a type
1755             which starts with '::' (patch #1690948).
1756
1757 03/25/2007: wuzzeb (John Lenz)
1758             [perl5] Add SWIG_fail to the SWIG_exception macro.  Fixes a few problems reported
1759             on the mailing list.
1760
1761 03/23/2007: wsfulton
1762             String copying patch from Josh Cherry reducing memory consumption by about 25%.
1763
1764 03/21/2007: wsfulton
1765             [Java] Apply patch #1631987 from Ulrik Peterson - bool INOUT typemaps
1766             fail on big endian machines.
1767
1768 03/16/2007: wsfulton
1769             Fix seg fault given dodgy C++ code: namespace abc::def { }
1770
1771 03/16/2007: wsfulton
1772             [Java] Fixes so that ARRAYSOFCLASSES and ARRAYSOFENUMS in arrays_java.i can be applied
1773             to pointer types.
1774
1775 03/03/2007: olly
1776             [PHP5] When we know the literal numeric value for a constant, use
1777             that to initialise the const member in the PHP wrapper class.
1778
1779 03/02/2007: olly
1780             [PHP5] Fix PHP wrapper code generated for certain cases of
1781             overloaded forms with default arguments.
1782
1783 02/26/2007: efuzzyone
1784             [CFFI] Patch #1656395: fixed hex and octal values bug, thanks to Arthur Smyles.
1785
1786 02/22/2007: mgossage
1787             [Lua] Fixed bug in typemaps which caused derived_byvalue and rname test cases to fail.
1788             Updated derived_byvalue.i to explain how to find and fix the problem
1789
1790 01/25/2007: wsfulton
1791             Fix #1538522 and #1338527, forward templated class declarations without a
1792             name for the templated class parameters, such as:
1793
1794               template <typename, class> class X;
1795
1796 01/23/2007: mgossage
1797             [Lua] Patch #1640862: <malloc.h> replaced by <stdlib.h>
1798             Patch #1598063 Typo in typemaps.i
1799
1800 01/22/2007: mgossage
1801             [Lua] Added a lua specific carrays.i which adds the operator[] support.
1802             modified the main code to make it not emit all the class member functions & accessors
1803             Note: C structs are created using new_XXX() while C++ classes use XXX() (should be standardised)
1804             Updated test case: li_carrays
1805             Updated the documentation.
1806
1807 01/12/2007: wsfulton
1808             [Php] Add support for newfree typemaps (sometimes used by %newobject)
1809
1810 01/12/2007: beazley
1811             New command line option -macroerrors.   When supplied, this will force
1812             the C scanner/parser to report proper location information for code contained
1813             inside SWIG macros (defined with %define).  By default, SWIG merely reports
1814             errors on the line at which a macro is used.  With this option, you
1815             can expand the error back to its source---something which may simplify
1816             debugging.
1817
1818 01/12/2007: beazley
1819             [Internals] Major overhaul of C/C++ scanning implementation.  For quite
1820             some time, SWIG contained two completely independent C/C++ tokenizers--
1821             the legacy scanner in CParse/cscanner.c and a general purpose scanner
1822             in Swig/scanner.c. SWIG still has two scanning modules, but the C parser
1823             scanner (CParse/cscanner.c) now relies upon the general purpose
1824             scanner found in Swig/scanner.c.  As a result, it is much smaller and
1825             less complicated.  This change also makes it possible to maintain all
1826             of the low-level C tokenizing in one central location instead of two
1827             places as before.
1828
1829             ***POTENTIAL FLAKINESS***
1830             This change may cause problems with accurate line number reporting
1831             as well as error reporting more generally. I have tried to resolve this
1832             as much as possible, but there might be some corner cases.
1833
1834 01/12/2007: mgossage
1835             [Lua] Added typemap throws for std::string*, typemap for SWIGTYPE DYNAMIC,
1836             changed the existing throws typemap to throw a string instead of making a copy of
1837             the object (updating a few test cases to deal with the change).
1838             fixed test case: dynamic_casts, exception_partial_info, li_std_string, size_t
1839
1840 01/03/2007: beazley
1841             [Internals].  Use of swigkeys.c/.h variables is revoked.  Please use
1842             simple strings for attribute names.
1843
1844 12/30/2006: beazley
1845             Internal API functions HashGetAttr() and HashCheckAttr() have been revoked.
1846             Please use Getattr() to retrieve attributes.  The function Checkattr() can
1847             be used to check attributes.  Note:  These functions have been revoked
1848             because they only added a marginal performance improvement at the expense
1849             code clarity.
1850
1851 12/26/2006: mgossage
1852             [Lua] Added more STL (more exceptions, map, size_t),
1853             fixed test case: conversion_ns_template.
1854
1855 12/21/2006: mgossage
1856             [Lua] Update to throw errors when setting immutables,
1857             and allowing user addition of module variables.
1858
1859 12/20/2006: wsfulton
1860             Fix typedef'd variable wrappers that use %naturalvar, eg, std::string.
1861
1862 12/14/2006: wsfulton
1863             [C#] Add std::wstring and wchar_t typemaps
1864
1865 12/14/2006: olly
1866             [php] Fix bug #1613673 (bad PHP5 code generated for getters and
1867             setters).
1868
1869 12/02/2006: wsfulton, John Lenz, Dave Beazley
1870             Move from cvs to Subversion for source control
1871
1872 11/30/2006: beazley
1873             Cleaned up swigwarnings.swg file not to use nested macro
1874             definitions.
1875
1876 11/12/2006: wsfulton
1877             [Java, C#] Fix for %extend to work for static member variables.
1878
1879 Version 1.3.31 (November 20, 2006)
1880 ==================================
1881
1882 11/12/2006: Luigi Ballabio
1883             [Python] Alternate fix for Python exceptions bug #1578346 (the previous one broke Python
1884             properties in modern classes)
1885
1886 11/12/2006: wsfulton
1887             -fakeversion commandline option now generates the fake version into the generated wrappers
1888             as well as displaying it when the -version commandline option is used.
1889
1890 14/11/2006: mgossage
1891             [lua] update to typemap for object by value, to make it c89 compliant
1892
1893 Version 1.3.30 (November 13, 2006)
1894 ==================================
1895
1896 11/12/2006: wsfulton
1897             [java] Remove DetachCurrentThread patch from  08/11/2006 - it causes segfaults
1898             on some systems.
1899
1900 11/12/2006: wsfulton
1901             [python] Fix #1578346 - Python exceptions with -modern
1902
1903 11/10/2006: wsfulton
1904             Fix #1593291 - Smart pointers and inheriting from templates 
1905
1906 11/09/2006: wsfulton
1907             Fix director operator pointer/reference casts - #1592173.
1908
1909 11/07/2006: wsfulton
1910             Add $self special variable for %extend methods. Please use this instead of just 'self'
1911             as the C++ 'this' pointer.
1912
1913 11/07/2006: mutandiz
1914             [allegrocl] 
1915             allegrocl.swg: swig-defvar updated to allow specifying of
1916                            non-default foreign type (via :ftype keyword arg).
1917             allegrocl.cxx: Specify proper access type for enum values.
1918
1919 11/03/2006: wsfulton
1920             [Java/C#] Fix const std::string& return types for directors as reported by
1921             Mark Donselzmann
1922
1923 10/29/2006: wsfulton
1924             [Java] Remove DeleteLocalRef from end of director methods for now as it is causing a
1925             seg fault when run on Solaris 8.
1926
1927 10/29/2006: wuzzeb (John Lenz)
1928             [Guile] Patch from Chris Shoemaker to clean up some warnings in the generated code.
1929
1930 10/29/2006: wsfulton
1931             [Java] Important fix to prevent early garbage collection of the Java proxy class
1932             while it is being used in a native method. The finalizer could destroy the underlying
1933             C++ object while it was being used. The problem occurs when the proxy class is no
1934             longer strongly reachable after a native call.  The problem seems to occur in
1935             memory stress situations on some JVMs. It does not seem to occur on the
1936             Sun client JVM up to jdk 1.5. However the 1.6 client jdk has a more aggressive garbage
1937             collector and so the problem does occur. It does occur on the Sun server
1938             JVMs (certainly 1.4 onwards). The fix entails passing the proxy class into the native
1939             method in addition to the C++ pointer in the long parameter, as Java classes are not
1940             collected when they are passed into JNI methods. The extra parameter can be suppressed
1941             by setting the nopgcpp attribute in the jtype typemap to "1" or using the new -nopgcpp
1942             commandline option.
1943
1944             See Java.html#java_pgcpp for further details on this topic.
1945
1946 10/24/2006: wsfulton
1947             [C#] Fix smart pointer wrappers. The virtual/override/new keyword is not generated
1948             for each method as the smart pointer class does not mirror the underlying pointer
1949             class inheritance hierarchy. SF #1496535
1950
1951 10/24/2006: mgossage
1952             [lua] added support for native methods & member function pointers.
1953             fixed test cases arrays_dimensionless & cpp_basic. Added new example (functor).
1954             tidied up a little of the code (around classHandler).
1955
1956 10/17/2006: wsfulton
1957             [C#, Java] directorout typemap changes to fall in line with the other director
1958             languages. $result is now used where $1 used to be used. Please change your typemaps
1959             if you have a custom directorout typemap.
1960
1961 10/18/2006: wsfulton
1962             Some fixes for applying the char array typemaps to unsigned char arrays.
1963
1964 10/17/2006: wsfulton
1965             [C#, Java] Add in const size_t& and const std::size_t& typemaps.
1966
1967 10/15/2006: efuzzyone 
1968             [CFFI] Suppress generating defctype for enums, thanks to Arthur Smyles. Patch 1560983. 
1969
1970 10/14/2006: wuzzeb (John Lenz)
1971             [Chicken] Minor fix to make SWIG work with the (as yet unreleased) chicken 2.5
1972
1973             [Guile,Chicken] Fix SF Bug 1573892.  Added an ext_test to the test suite to test
1974             this bug, but this test can not really be made generic because the external code must
1975             plug into the target language interpreter directly.
1976             See Examples/test-suite/chicken/ext_test.i and ext_test_external.cxx
1977
1978             Added a %.externaltest to common.mk, and any interested language modules can
1979             copy and slightly modify either the chicken or the guile ext_test.i
1980
1981 10/14/2006: mgossage
1982             [Lua] added OUTPUT& for all number types, added a long long type
1983             fixed several test cases.
1984             update: changed typemaps to use SWIG_ConvertPtr rather than SWIG_MustGetPointer
1985             started spliting lua.swg into smaller parts to make it neater
1986
1987 10/13/2006: wsfulton
1988             [C#, Java] Marginally better support for multiple inheritance only in that you can
1989             control what the base class is. This is done using the new 'replace' attribute in the 
1990             javabase/csbase typemap, eg in the following, 'Me' will be the base class,
1991             no matter what Foo is really derived from in the C++ layer.
1992
1993               %typemap(javabase, replace="1") Foo "Me";
1994               %typemap(csbase, replace="1") Foo "Me";
1995
1996             Previously it was not possible for the javabase/csbase typemaps to override the C++ base.
1997
1998 10/12/2006: wsfulton
1999             [Java] Remove potential race condition on the proxy class' delete() method 
2000             (it is now a synchronized method, but is now customisable by changing the 
2001             methodmodifiers attribute in the the javadestruct or javadestruct_derived typemap)
2002
2003             [C#] Remove potential race condition on the proxy class' Dispose() method, 
2004             similar to Java's delete() above.
2005
2006             *** POTENTIAL INCOMPATIBILITY ***
2007
2008 10/12/2006: wsfulton
2009             [Ruby, Python] Remove redundant director code in %extend methods (%extend
2010             methods cannot be director methods)
2011
2012 10/12/2006: wsfulton
2013             [Ruby, Python] Fix #1505594 - director objects not returned as director objects
2014             in %extend methods.
2015
2016 10/11/2006: wsfulton
2017             [Java] Fix #1238798 - Directors using unsigned long long or any other type
2018             marshalled across the JNI boundary using a Java class (where the jni typemap 
2019             contains jobject).
2020
2021 10/06/2006: wsfulton
2022             Fix #1162194 - #include/%include within a structure
2023
2024 10/06/2006: wsfulton
2025             Fix #1450661, string truncation in String_seek truncating Java/C# enums.
2026
2027 10/06/2006: mgossage
2028             [Lua] Fix #1569587. The name is now correct.
2029
2030 10/04/2006: wsfulton
2031             Director fixes for virtual conversion operators
2032
2033 10/04/2006: olly
2034             [php] Fix #1569587 for PHP.  Don't use sizeof() except with string
2035             literals.  Change some "//" comments to "/* */" for portability.
2036
2037 10/04/2006: mgossage
2038             [Lua] Partial Fix #1569587. The type is now correct, but the name is still not correct.
2039
2040 10/03/2006: wsfulton
2041             [Ruby] Fix #1527885 - Overloaded director virtual methods sometimes produced
2042             uncompileable code when used with the director:except feature.
2043
2044 10/03/2006: wsfulton
2045             Directors: Directors are output in the order in which they are declared in 
2046             the C++ class rather than in some pseudo-random order.
2047
2048 10/03/2006: mmatus
2049             Fix #1486281 and #1471039.
2050
2051 10/03/2006: olly
2052             [Perl] Fix for handling strings with zero bytes from Stephen Hutsal.
2053
2054 09/30/2006: efuzzyone
2055             [CFFI] Bitfield support and vararg support due to Arthur Smyles.
2056             C expression to Lisp conversion, thanks to Arthur Smyles for the initial
2057             idea, it now supports conversion for a whole range of C expressions. 
2058
2059 09/28/2006: wsfulton
2060             Fix #1508327 - Overloaded methods are hidden when using -fvirtual optimisation.
2061             Overloaded methods are no longer candidates for elimination - this mimics
2062             C++ behaviour where all overloaded methods must be defined and implemented
2063             in a derived class in order for them to be available.
2064
2065 09/25/2006: wsfulton
2066             [Ruby, Python, Ocaml] Fix #1505591 Throwing exceptions in extended directors
2067
2068 09/25/2006: wsfulton
2069             Fix #1056100 - virtual operators. 
2070
2071 09/24/2006: olly
2072             Don't accidentally create a "<:" token (which is the same as "[" in C++).
2073             Fixes bug # 1521788.
2074
2075 09/23/2006: olly
2076             [Ruby] Support building with recent versions of the Ruby 1.9
2077             development branch.  Fixes bug #1560092.
2078
2079 09/23/2006: olly
2080             Templates can now be instantiated using negative numbers and
2081             constant expressions, e.g.:
2082
2083             template<int q> class x {};
2084             %template(x_minus1) x<-1>;
2085             %template(x_1plus2) x<1+2>;
2086
2087             Also, constant expressions can now include comparisons (>, <, >=,
2088             <=, !=, ==), modulus (%), and ternary conditionals (a ? b : c).
2089
2090             Fixes bugs #646275, #925555, #956282, #994301.
2091
2092 09/22/2006: wsfulton
2093             Fix %ignore on director methods - Bugs #1546254, #1543533
2094
2095 09/20/2006: wsfulton
2096             Fix %ignore on director constructors
2097
2098 09/20/2006: wsfulton
2099             Fix seg faults and asserts when director methods are ignored (#1543533)
2100
2101 09/20/2006: wsfulton
2102             Fix out of source builds - bug #1544718
2103
2104 09/20/2006: olly
2105             Treat a nested class definition as a forward declaration rather
2106             than ignoring it completely, so that we generate correct code for
2107             passing opaque pointers to the nested class (fixes SF bug #909387).
2108
2109 09/20/2006: olly
2110             *** POTENTIAL INCOMPATIBILITY ***
2111             [php] Overload resolution now works.  However to allow this, SWIG
2112             generated wrappers no longer coerce PHP types (which reverts a change
2113             made in 1.3.26).  So for example, if a method takes a string, you
2114             can no longer pass a number without explicitly converting it to a
2115             string in PHP using: (string)x
2116
2117 09/18/2006: mgossage
2118             [ALL] fix on swiginit.swg, has been reported to crash on several test cases
2119             found and fixed problem in imports under python (mingw)
2120
2121 09/16/2006: wsfulton
2122             [Python] Patch from Michal Marek for Python 2.5 to fix 64 bit array indexes on
2123             64 bit machines.
2124
2125 09/13/2006: wsfulton
2126             The explicitcall feature has been scrapped. This feature was introduced primarily
2127             to solve recursive director method calls. Director upcall improvements made instead:
2128
2129             [Python, Ruby, Ocaml] The swig_up flag is no longer used. The required mutexes
2130             wrapping this flag are also no longer needed. The recursive calls going from C++
2131             to the target language and back again etc are now avoided by a subtlely different
2132             approach. Instead of using the swig_up flag in each director method to indicate
2133             whether the explicit C++ call to the appropriate base class method or a normal
2134             polymorphic C++ call should be made, the new approach makes one of these calls
2135             directly from the wrapper method.
2136
2137             [Java, C#] The recursive call problem when calling a C++ base class method from
2138             Java/C# is now fixed. The implementation is slightly different to the other languages
2139             as the detection as to whether the explicit call or a normal polymorphic call is made
2140             in the Java/C# layer rather than in the C++ layer.
2141
2142 09/11/2006: mgossage
2143             [ALL] updated swiginit.swg to allow multiple interpreters to use multiple
2144             swig modules at once. This has been tested in Lua (mingw & linux),
2145             perl5 & python (linux) only.
2146
2147 09/11/2006: mgossage
2148             [lua] added support for passing function pointers as well as native lua object
2149             into wrappered function.
2150             Added example funcptr3 to demonstrate this feature
2151
2152 09/05/2006: olly
2153             [php] Rename ErrorCode and ErrorMsg #define-s to SWIG_ErrorCode
2154             and SWIG_ErrorMsg to avoid clashes with code the user might be
2155             wrapping (patch from Darren Warner in SF bug #1466086).  Any
2156             user typemaps which use ErrorCode and/or ErrorMsg directly will
2157             need adjusting - you can easily fix them to work with both old
2158             and new SWIG by changing to use SWIG_ErrorMsg and adding:
2159
2160                 #ifndef SWIG_ErrorMsg
2161                 #define SWIG_ErrorMsg() ErrorMsg()
2162                 #endif
2163
2164 08/29/2006: olly
2165             [php] Move constant initialisation from RINIT to MINIT to fix a
2166             warning when using Apache and mod_php.  We only need to create
2167             PHP constants once when we're first initialised, not for every HTTP
2168             request.
2169
2170 08/21/2006: mgossage
2171             [Lua]
2172             Bugfix #1542466 added code to allow mapping Lua nil's <-> C/C++ NULL's
2173             updated various typemaps to work correctly with the changes
2174             added voidtest_runme.lua to show the features working
2175
2176 08/19/2006: wuzzeb (John Lenz)
2177             [Guile] Add feature:constasvar to export constants as variables instead of functions
2178             that return the constant value.
2179
2180 08/11/2006: wsfulton
2181             [Java] DetachCurrentThread calls have been added so that natively created threads
2182             no longer prevent the JVM from exiting. Bug reported by Thomas Dudziak and
2183             Paul Noll.
2184
2185 08/10/2006: wsfulton
2186             [C#] Fix director protected methods so they work
2187
2188 07/25/2006: mutandiz
2189             [allegrocl]
2190             more additions to std::string, some tweaks and small bug fixes
2191             -nocwrap mode.
2192
2193 07/21/2006: mgossage
2194             [Lua]
2195             Bugfix #1526022 pdated std::string to support strings with '\0' inside them
2196             updated typemaps.i to add support for pointer to pointers
2197
2198 07/19/2006: mutandiz
2199             [allegrocl]
2200             - Add std_string.i support.
2201             - Add newobject patch submitted by mkoeppe (thanks!)
2202             - Fix type name mismatch issue for nested type definitions.
2203               specifically typedefs in templated class defns.
2204
2205 07/18/2006: mgossage
2206             Bugfix #1522858
2207             updated lua.cxx to support -external-runtime command
2208
2209 07/14/2006: wuzzeb (John Lenz)
2210             Increment the SWIG_RUNTIME_VERSION to 3, because of the
2211             addition of the owndata member in swig_type_info.
2212             Reported by: Prabhu Ramachandran
2213
2214 07/05/2006: wsfulton
2215             Search path fixes:
2216             - Fix search path for library files to behave as documented in Library.html.
2217             - Fix mingw/msys builds which did not find the SWIG library when installed.
2218             - Windows builds also output the mingw/msys install location when running
2219               swig -swiglib.
2220             - The non-existent and undocumented config directory in the search path has
2221               been removed.
2222
2223 07/05/2006: wsfulton
2224             Fix $symname special variable expansion.
2225
2226 07/04/2006: wuzzeb (John Lenz)
2227             [Chicken]
2228             Add %feature("constasvar"), which instead of exporting a constant as a
2229             scheme function, exports the constant as a scheme variable.  Update the
2230             documentation as well.
2231
2232 07/04/2006: wsfulton
2233             [See entry of 09/13/2006 - explicitcall feature and documentation to it removed]
2234             New explicitcall feature which generates additional wrappers for virtual methods
2235             that call the method explicitly, not relying on polymorphism to make the method
2236             call. The feature is a feature flag and is enabled like any other feature flag.
2237             It also recognises an attribute, "suffix" for mangling the feature name, see
2238             SWIGPlus.html#SWIGPlus_explicitcall documentation for more details.
2239
2240             [Java, C#]
2241             The explicitcall feature is also a workaround for solving the recursive calls
2242             problem when a director method makes a call to a base class method. See
2243             Java.html#java_directors_explicitcall for updated documentation.
2244
2245 06/28/2006: joe (Joseph Wang)
2246             [r] Initial support for R
2247
2248 06/20/2006: wuzzeb (John Lenz)
2249             [Chicken]
2250             Minor fixes to get apply_strings.i testsuite to pass
2251             Remove integers_runme.scm from the testsuite, because SWIG and Chicken does
2252             handle overflows.
2253
2254 06/19/2005: olly
2255             [php] Add support for generating PHP5 class wrappers for C++
2256             classes (use "swig -php5").
2257
2258 06/17/2006: olly
2259             [php] Added some missing keywords to the PHP4 keyword list, and
2260             fixed __LINE__ and __FILE__ which were in the wrong category.
2261             Also added all the keywords new in PHP5, and added comments
2262             noting the PHP4 keywords which aren't keywords in PHP5.
2263
2264 06/17/2006: olly
2265             [php] Don't segfault if PHP Null is passed as this pointer (e.g.
2266             Class_method(Null)) - give a PHP Error instead.
2267
2268 06/15/2006: mutandiz
2269             [allegrocl]
2270             Add initial support for std::list container class.
2271             Fix a few bugs in helper functions.
2272
2273 05/13/2006: wsfulton
2274             [Java] Replace JNIEXPORT with SWIGEXPORT, thereby enabling the possibility
2275             of using gcc -fvisibility=hidden for potentially smaller faster loading wrappers.
2276
2277 05/13/2006: wsfulton
2278             Fix for Makefiles for autoconf-2.60 beta
2279
2280 05/13/2006: wsfulton
2281             Vladimir Menshakov patch for compiling wrappers with python-2.5 alpha.
2282
2283 05/12/2006: wsfulton
2284             Fix buffer overflow error when using large %feature(docstring) reported
2285             by Joseph Winston.
2286
2287 05/12/2006: wsfulton
2288             [Perl] Operator overload fix from Daniel Moore.
2289
2290 05/25/2006: mutandiz
2291             [allegrocl]
2292             Fix bug in generation of CLOS type declarations for unions
2293             and equivalent types.
2294
2295 05/24/2006: mutandiz
2296             [allegrocl]
2297             Don't require a full class definition to generate a CLOS wrapper.
2298
2299 05/20/2006: olly
2300             [php] GCC Visibility support now works with PHP.
2301
2302 05/19/2006: olly
2303             [php] Removed support for -dlname (use -module instead).  Fixed
2304             naming of PHP extension module to be consistent with PHP
2305             conventions (no "php_" prefix on Unix; on PHP >= 4.3.0, handle Unix
2306             platforms which use something other than ".so" as the extension.)
2307
2308 05/13/2006: wsfulton
2309             [C#] Director support added
2310
2311 05/07/2006: olly
2312             [php] Don't segfault if PHP Null is passed where a C++ reference
2313             is wanted.
2314
2315 05/05/2006: olly
2316             [php] Fix wrappers generated for global 'char' variables to not
2317             include a terminating zero byte in the PHP string.
2318
2319 05/03/2006: wsfulton
2320             Modify typemaps so that char * can be applied to unsigned char * or signed char *
2321             types and visa versa.
2322
2323 05/03/2006: efuzzyone
2324             [cffi]Thanks to Luke J Crook for this idea.
2325              - a struct/enum/union is replaced with :pointer only if
2326                that slot is actually a pointer to that type. So,: 
2327                     struct a_struct { int x; } and
2328                     struct b_struct { a_struct struct_1; }; 
2329                will be converted as:
2330                    (cffi:defcstruct b_struct
2331                            (struct_1 a_struct))
2332              - Other minor fixes in lispifying names.
2333
2334 05/02/2006: wsfulton
2335             Fix possible redefinition of _CRT_SECURE_NO_DEPRECATE for VC++.
2336
2337 04/14/2006: efuzzyone
2338             [cffi]
2339             Thanks to Thomas Weidner for the patch.
2340             - when feature export is set (export 'foo) is 
2341               generated for every symbol
2342             - when feature inline is set (declaim (inline foo)) is 
2343               generated before every function definition
2344             - when feature intern_function is set 
2345               #.(value-of-intern-function "name" "nodeType" package)
2346               is emitted instead of the plain symbol. A sample swig-lispify 
2347               is provided.
2348             - every symbol is prefixed by it's package.
2349
2350 04/13/2006: efuzzyone
2351             [cffi]
2352             Fixed the generation of wrappers for global variables. 
2353             Added the option [no]swig-lisp which turns on/off generation 
2354             of code for swig helper lisp macro, functions, etc.
2355
2356 Version 1.3.29 (March 21, 2006)
2357 ===============================
2358
2359 04/05/2006: mutandiz
2360             [allegrocl]
2361             Fix output typemap of char so it produces a character instead
2362             of an integer. Also adds input/output typemaps for 'char *'.
2363
2364             add command-line argument -isolate to generate an interface
2365             file that won't interfere with other SWIG generated files that
2366             may be used in the same application.
2367
2368 03/20/2005: mutandiz
2369             [allegrocl]
2370             More tweaks to INPUT/OUTPUT typemaps for bool.
2371
2372             Fix constantWrapper for char and string literals.
2373
2374             find-definition keybindings should work in ELI/SLIME.
2375             Output (in-package <module-name>) to lisp wrapper
2376             instead of (in-package #.*swig-module-name*).
2377
2378             slight rework of multiple return values.
2379
2380             doc updates.
2381
2382 03/17/2005: mutandiz
2383             [allegrocl]
2384             mangle names of constants generated via constantWrapper.
2385             
2386             When using OUTPUT typemaps and the function has a non-void
2387             return value, it should be first in the values-list, followed
2388             by the OUTPUT mapped values.
2389
2390             Fix bug with boolean parameters, which needed to be
2391             passed in as int values, rather than T or NIL.
2392
2393 03/15/2006: mutandiz
2394             [allegrocl]
2395             Generate wrappers for constants when in C++ or -cwrap mode.
2396             Make -cwrap the default, since it is most correct. Users
2397             can use the -nocwrap option to avoid the creation of a .cxx
2398             file when interfacing to C code.
2399
2400             When in -nocwrap mode, improve the handling of converting
2401             infix literals to prefix notation for lisp. This is very
2402             basic and not likely to be improved upon since this only
2403             applies to the -nocwrap case. Literals we can't figure out
2404             will result in a warning and be included in the generated
2405             code.
2406
2407             validIdentifier now more closely approximates what may be
2408             a legal common lisp symbol.
2409
2410             Fix typemap error in allegrocl.swg
2411             
2412 03/12/2006: mutandiz
2413             [allegrocl]
2414             fix up INPUT/OUTPUT typemaps for bool.
2415             Generate c++ style wrapper functions for struct/union members
2416             when -cwrap option specified.
2417
2418 03/10/2006: mutandiz
2419             [allegrocl]
2420             Fix bug in C wrapper generation introduced by last allegrocl
2421             commit.
2422
2423 03/10/2006: wsfulton
2424             [Java]
2425             Commit #1447337 - Delete LocalRefs at the end of director methods to fix potential leak
2426
2427 03/10/2006: wsfulton
2428             Fix #1444949 - configure does not honor --program-prefix.
2429             Removed non-standard configure option --with-release-suffix. Fix the autoconf standard
2430             options --program-prefix and --program-suffix which were being shown in the help,
2431             but were being ignored. Use --program-suffix instead of --with-release-suffix now.
2432
2433 03/10/2006: wsfulton
2434             [Java]
2435             Fix #1446319 with patch from andreasth - more than one wstring parameter in director methods
2436
2437 03/07/2006: mkoeppe
2438             [Guile] 
2439             Fix for module names containing a "-" in non-"shadow" mode.
2440             Patch from Aaron VanDevender (#1441474).
2441
2442 03/04/2006: mmatus
2443             - Add -O to the main program, which now enables -fastdispatch
2444             
2445             [Python]
2446
2447             - Add the -fastinit option to enable faster __init__
2448               methods. Setting 'this' as 'self.this.append(this)' in the python
2449               code confuses PyLucene. Now the initialization is done in the
2450               the C++ side, as reported by Andi and Robin.
2451
2452             - Add the -fastquery option to enable faster SWIG_TypeQuery via a
2453               python dict cache, as proposed by Andi Vajda
2454
2455             - Avoid to call PyObject_GetAttr inside SWIG_Python_GetSwigThis,
2456               since this confuses PyLucene, as reported by Andi Vajda.
2457             
2458 03/02/2006: wsfulton
2459             [Java]
2460             Removed extra (void *) cast when casting pointers to and from jlong as this
2461             was suppressing gcc's "dereferencing type-punned pointer will break strict-aliasing rules"
2462             warning. This warning could be ignored in versions of gcc prior to 4.0, but now the
2463             warning is useful as gcc -O2 and higher optimisation levels includes -fstrict-aliasing which
2464             generates code that doesn't work with these casts. The assignment is simply never made.
2465             Please use -fno-strict-aliasing to both suppress the warning and fix the bad assembly
2466             code generated. Note that the warning is only generated by the C compiler, but not
2467             the C++ compiler, yet the C++ compiler will also generate broken code. Alternatively use 
2468             -Wno-strict-aliasing to suppress the warning for gcc-3.x. The typemaps affected
2469             are the "in" and "out" typemaps in java.swg and arrays_java.swg. Users ought to fix
2470             their own typemaps to do the same. Note that removal of the void * cast simply prevents
2471             suppression of the warning for the C compiler and nothing else. Typical change:
2472
2473             From:
2474               %typemap(in) SWIGTYPE * %{ $1 = *($&1_ltype)(void *)&$input; %}
2475             To:
2476               %typemap(in) SWIGTYPE * %{ $1 = *($&1_ltype)&$input; %}
2477
2478             From:
2479               %typemap(out) SWIGTYPE * %{ *($&1_ltype)(void *)&$result = $1; %} 
2480             To:
2481               %typemap(out) SWIGTYPE * %{ *($&1_ltype)&$result = $1; %} 
2482
2483 03/02/2006: mkoeppe
2484             [Guile -scm]
2485             Add typemaps for "long long"; whether the generated code compiles, however, depends
2486             on the version and configuration of Guile.
2487
2488 03/02/2006: wsfulton
2489             [C#]
2490             Add support for inner exceptions. If any of the delegates are called which construct
2491             a pending exception and there is already a pending exception, it will create the new
2492             exception with the pending exception as an inner exception.
2493
2494 03/02/2006: wsfulton
2495             [Php]
2496             Added support for Php5 exceptions if compiling against Php5 (patch from Olly Betts).
2497
2498 03/01/2006: mmatus
2499             Use the GCC visibility attribute in SWIGEXPORT.
2500
2501             Now you can compile (with gcc 3.4 or later) using
2502             CFLAGS="-fvisibility=hidden".
2503             
2504             Check the difference for the 'std_containers.i' python 
2505             test case:
2506  
2507             Sizes:
2508
2509               3305432 _std_containers.so
2510               2383992 _std_containers.so.hidden
2511
2512             Exported symbols (nm -D <file>.so | wc -l):
2513
2514               6146 _std_containers.so 
2515               174  _std_containers.so.hidden 
2516
2517             Excecution times:
2518
2519               real 0m0.050s user 0m0.039s sys 0m0.005s   _std_containers.so
2520               real 0m0.039s user 0m0.026s sys 0m0.007s   _std_containers.so.hidden
2521
2522             Read http://gcc.gnu.org/wiki/Visibility for more details.
2523
2524
2525 02/27/2006: mutandiz
2526             [allegrocl]
2527             Add support for INPUT, OUTPUT, and INOUT typemaps.
2528             For OUTPUT variables, the lisp wrapper returns multiple
2529             values.
2530
2531 02/26/2006: mmatus
2532
2533             [Ruby] add argcargv.i library file.
2534             
2535             Use it as follow:
2536
2537                 %include argcargv.i
2538                                                                                  
2539                 %apply (int ARGC, char **ARGV) { (size_t argc, const char **argv) } 
2540                                                                                  
2541                 %inline {                               
2542                   int mainApp(size_t argc, const char **argv)   
2543                   {                                             
2544                     return argc;                                        
2545                   }
2546                 }                                                       
2547                                                                 
2548             then in the ruby side:                                      
2549                                                                         
2550                 args = ["asdf", "asdf2"]                                
2551                 n = mainApp(args);
2552         
2553
2554             This is the similar to the python version Lib/python/argcargv.i
2555
2556 02/24/2006: mgossage
2557
2558             Small update Lua documents on troubleshooting problems
2559             
2560 02/22/2006: mmatus 
2561
2562             Fix all the errors reported for 1.3.28.
2563             - fix bug #1158178
2564             - fix bug #1060789
2565             - fix bug #1263457
2566             - fix 'const  char*&' typemap in the UTL, reported by Geoff Hutchison
2567             - fixes for python 2.1 and the runtime library
2568             - fix copyctor + template bug #1432125
2569             - fix [ 1432152 ] %rename friend operators in namespace
2570             - fix gcc warning reported by R. Bernstein
2571             - avoid assert when finding a recursive scope inheritance,
2572               emit a warning in the worst case, reported by Nitro 
2573             - fix premature object deletion reported by Paul in tcl3d
2574             - fix warning reported by Nitro in VC7
2575             - more fixes for old Solaris compiler
2576             - fix for python 2.3 and gc_refs issue reported by Luigi
2577             - fix fastproxy for methods using kwargs
2578             - fix overload + protected member issue reported by Colin McDonald
2579             - fix seterrormsg as reported by Colin McDonald
2580             - fix directors, now the test-suite runs again using -directors
2581             - fix for friend operator and Visual studio and bug 1432152
2582             - fix bug #1435090
2583             - fix using + %extend as reported by William
2584             - fix bug #1094964
2585             - fix for Py_NotImplemented as reported by Olly and Amaury
2586             - fix nested namespace issue reported by Charlie
2587
2588             and also:
2589             
2590             - allow director protected members by default
2591             - delete extra new lines in swigmacros[UTL]
2592             - cosmetic for generated python code
2593             - add the factory.i library for UTL
2594             - add swigregister proxy method and move __repr__ to a
2595               single global module  [python]
2596
2597 02/22/2006: mmatus 
2598
2599             When using directors, now swig will emit all the virtual
2600             protected methods by default. 
2601
2602             In previous releases, you needed to use the 'dirprot'
2603             option to acheive the same.
2604
2605             If you want, you can disable the new default behaviour,
2606             use the 'nodirprot' option: 
2607
2608                swig -nodirprot ...
2609
2610             and/or the %nodirector feature for specific methods, i.e.:
2611
2612                %nodirector Foo::bar;
2613
2614                struct Foo {
2615                  virtual ~Foo();
2616
2617                protected:
2618                  virtual void bar();
2619                };
2620             
2621
2622             As before, pure abstract protected members are allways
2623             emitted, independent of the 'dirprot/nodirprot' options.
2624
2625
2626 02/22/2006: mmatus
2627             Add the factory.i library for languages using the UTL (python,tcl,ruby,perl).
2628             
2629             factory.i implements a more natural wrap for factory methods. 
2630
2631             For example, if you have:                                                       
2632                                                                             
2633             ----  geometry.h --------                                       
2634                  struct Geometry {                                          
2635                    enum GeomType{                                                   
2636                      POINT,                                                 
2637                      CIRCLE                                                 
2638                    };                                                       
2639                                                                             
2640                    virtual ~Geometry() {}                                   
2641                    virtual int draw() = 0;                                  
2642                                                                             
2643                  //                                                         
2644                  // Factory method for all the Geometry objects             
2645                  //                                                         
2646                    static Geometry *create(GeomType i);                     
2647                  };                                                         
2648                                                                                     
2649                  struct Point : Geometry  {                                 
2650                    int draw() { return 1; }                                 
2651                    double width() { return 1.0; }                           
2652                  };                                                         
2653                                                                                     
2654                  struct Circle : Geometry  {                                
2655                    int draw() { return 2; }                                 
2656                    double radius() { return 1.5; }                          
2657                  };                                                         
2658                                                                                     
2659                  //                                                         
2660                  // Factory method for all the Geometry objects             
2661                  //                                                         
2662                  Geometry *Geometry::create(GeomType type) {                
2663                    switch (type) {                                          
2664                    case POINT: return new Point();                          
2665                    case CIRCLE: return new Circle();                        
2666                    default: return 0;                                       
2667                    }                                                        
2668                  }                                                          
2669             ----  geometry.h --------                                       
2670                                                                             
2671                                                                             
2672             You can use the %factory with the Geometry::create method as follows:
2673                                                                             
2674               %newobject Geometry::create;                                  
2675               %factory(Geometry *Geometry::create, Point, Circle);          
2676               %include "geometry.h"                                         
2677                                                                             
2678             and Geometry::create will return a 'Point' or 'Circle' instance   
2679             instead of the plain 'Geometry' type. For example, in python:           
2680                                                                             
2681               circle = Geometry.create(Geometry.CIRCLE)                     
2682               r = circle.radius()                                                   
2683                                                                             
2684             where 'circle' now is a Circle proxy instance.                          
2685
2686
2687 02/17/2006: mkoeppe
2688             [MzScheme] Typemaps for all integral types now accept the full range of integral
2689             values, and they signal an error when a value outside the valid range is passed.
2690             [Guile] Typemaps for all integral types now signal an error when a value outside
2691             the valid range is passed.
2692
2693 02/13/2006: mgossage
2694             [Documents] updated the extending documents to give a skeleton swigging code
2695             with a few typemaps.
2696             [Lua] added an extra typemap for void* [in], so a function which requires a void*
2697             can take any kind of pointer
2698
2699 Version 1.3.28 (February 12, 2006)
2700 ==================================
2701
2702 02/11/2006: mmatus
2703             Fix many issues with line counting and error reports.
2704
2705 02/11/2006: mmatus
2706             [Python] Better static data member support, if you have
2707             
2708                 struct Foo {
2709                   static int bar;
2710                 };
2711
2712             then now is valid to access the static data member, ie:
2713
2714                 f = Foo()
2715                 f.bar = 3
2716
2717             just as in C++.
2718
2719
2720 02/11/2006: wsfulton
2721             [Perl]
2722             Fixed code generation to work again with old versions of Perl
2723             (5.004 and later tested)
2724
2725 02/04/2006: mmatus
2726             [Python] Add the %extend_smart_pointer() directive to extend
2727             SWIG smart pointer support in python. 
2728
2729             For example, if you have a smart pointer as:
2730             
2731               template <class Type> class RCPtr {
2732               public:
2733                 ...
2734                 RCPtr(Type *p);
2735                 Type * operator->() const;
2736                 ...
2737               };
2738               
2739             you use the %extend_smart_pointer directive as:
2740             
2741               %extend_smart_pointer(RCPtr<A>);
2742               %template(RCPtr_A)  RCPtr<A>;
2743             
2744             then, if you have something like:
2745
2746               RCPtr<A> make_ptr();
2747               int foo(A *);
2748
2749             you can do the following:
2750
2751               a = make_ptr();
2752               b = foo(a);
2753
2754             ie, swig will accept a RCPtr<A> object where a 'A *' is
2755             expected.
2756
2757             Also, when using vectors
2758             
2759               %extend_smart_pointer(RCPtr<A>);
2760               %template(RCPtr_A) RCPtr<A>;
2761               %template(vector_A) std::vector<RCPtr<A> >;
2762                 
2763             you can type
2764
2765               a = A();
2766               v = vector_A(2)
2767               v[0] = a
2768
2769             ie, an 'A *' object is accepted, via implicit conversion, 
2770             where a RCPtr<A> object is expected. Additionally
2771
2772               x = v[0]
2773
2774             returns (and sets 'x' as) a copy of v[0], making reference
2775             counting possible and consistent.
2776
2777             %extend_smart_pointer is just a collections of new/old
2778             tricks, including %typemaps and the new %implicitconv
2779             directive.
2780
2781 02/02/2006: mgossage
2782             bugfix #1356577, changed double=>lua_number in a few places.
2783             added the std::pair wrapping
2784
2785 01/30/2006: wsfulton
2786             std::string and std::wstring member variables and global variables now use
2787             %naturalvar by default, meaning they will now be wrapped as expected in all languages.
2788             Previously these were wrapped as a pointer rather than a target language string.
2789             It is no longer necessary to add the following workaround to wrap these as strings:
2790
2791                 %apply const std::string & { std::string *}
2792
2793             *** POTENTIAL INCOMPATIBILITY  ***
2794
2795 01/28/2006: mkoeppe
2796             [Guile -scm] 
2797             Add typemaps for handling of member function pointers.
2798
2799 01/24/2006: mmatus
2800             - Better support for the %naturalvar directive, now it
2801               works with the scripting languages as well as
2802               Java/C#.
2803               
2804               Now, it can also be applied to class types:
2805
2806                 %naturalvar std::string;
2807                 %include <std_string.i>
2808               
2809               that will tell swig to use the the 'natural' wrapping
2810               mechanism to all std::string global and member
2811               variables.
2812
2813             - Add support for the %allowexcept feature along the
2814               scripting languages, which allows the %exception feature
2815               to be applied to the variable access methods. Also, add
2816               the %exceptionvar directive to specify a distintic
2817               exception mechanism only for variables.
2818               
2819             
2820             - Add more docs for the %delobject directive to mark a method as a
2821               destructor, 'disowning' the first argument. For example:
2822
2823                 %newobject create_foo;
2824                 %delobject destroy_foo;
2825
2826                 Foo *create_foo() { return new Foo(); }
2827                 void destroy_foo(Foo *foo) { delete foo; }
2828
2829               or in a member method as:
2830
2831                 %delobject Foo::destroy;
2832
2833                 class Foo {
2834                 public:
2835                   void destroy() { delete this;}
2836
2837                 private:
2838                   ~Foo();
2839                };
2840
2841
2842 01/24/2006: mgossage
2843             [Lua]
2844             - Removed the type swig_lua_command_info & replace with luaL_reg
2845               (which then broke the code), fixed this
2846             - added an additional cast in the typemaps for enum's
2847               due to the issue that VC.Net will not allow casting of
2848               a double to an enum directly. Therefore cast to int then to enum
2849               (thanks to Jason Rego for this observation)
2850
2851 01/16/2006: mmatus (Change disabled... will be back in CVS soon)
2852             Add initial support for regexp via the external library
2853             RxSpencer. SWIG doesn't require this library to compile
2854             and/or run. But if you specify --with-rxspencer, and the
2855             library is found during installation, then swig will use
2856             it in three places:
2857
2858             - In %renames rules, via the new rxsmatch rules, for example:
2859                   
2860                   %rename("%(lowercase)",rxsmatch$name="GSL_.*") "";
2861                   %rename("%(lowercase)",rxsmatch$nodeType="enum GSL_.*") "";
2862                  
2863               rxsmatch is similar to the match rule, it just uses
2864               the RxSpencer regexp library to decide if there is a
2865               match with the provided regexp. As with the match
2866               rule, you can also use the negate rule notrxsmatch.
2867
2868             - In the %rename target name via the rxstarget option, for example:
2869                          
2870                   %rename("%(lowercase)",rxstarget=1) "GSL_.*";
2871
2872                 where the target name "GSL.*" is now understood as a
2873                 regexp to be matched.  
2874                  
2875             - In the new encoder "rxspencer", which looks like:
2876
2877                   %(rxspencer:[regexp][replace])s
2878
2879                 where "regexp" is the regular expression and "replace"
2880                 is a string used as a replacement, where the @0,@1,...,@9
2881                 pseudo arguments are used to represent the
2882                 corresponding matching items in the reg expression.
2883
2884                 For example:
2885                               
2886                 %(rxspencer:[GSL.*][@0])s       <- Hello    -> 
2887                 %(rxspencer:[GSL.*][@0])s       <- GSLHello -> GSLHello
2888                 %(rxspencer:[GSL(.*)][@1])s     <- GSLHello -> Hello
2889                 %(rxspencer:[GSL(.*)][gsl@1])s  <- GSLHello -> gslHello
2890
2891                 Another example could be:
2892
2893                 %rename("%(lowercase)s",sourcefmt="%(rxspencer:[GSL_(.*)][@1])s",%$isfunction) "";
2894
2895                 which take out the prefix "GSL_" and returns all the
2896                 function names in lower cases, as following:
2897
2898                     void GSL_Hello();   ->   hello();
2899                     void GSL_Hi();      ->   hi();
2900                     const int GSL_MAX;  ->   GSL_MAX;  // no change, is not a function
2901         
2902             We use the RxSpencer as an initial test bed to
2903             implemention while we decide which library will be
2904             finally added to swig.
2905
2906             You can obtain the RxSpencer library from 
2907             
2908               http://arglist.com/regex (Unix)
2909
2910             or
2911              
2912               http://gnuwin32.sourceforge.net/packages.html (Windows)
2913
2914             Once installed, use "man rxspencer" to get more info
2915             about the regexp format, or just google rxspencer.
2916
2917             Since now you can enable the rxsmatch rules (see above),
2918             the simple or '|' support for the match rules
2919             (01/12/2006: mmatus) is disabled. Still, if you have
2920             problems with the rxspencer library, you can re-enable
2921             the simple 'match or' support using
2922             -DSWIG_USE_SIMPLE_MATCHOR.
2923           
2924
2925 01/16/2006: mmatus
2926             Change the %rename predicates to use the prefix '%$', as in:
2927             
2928               %rename("%(utitle)s",%$isfunction,%$ismember) ""; 
2929                 
2930             to avoid clashings with other swig macros/directives.
2931
2932 01/14/2006: cfisavage
2933             [Ruby]
2934             Added support for Ruby bang! methods via a new %bang feature.
2935             Bang methods end in exclamation points and indicate that the
2936             object being processed will be modified in-place as 
2937             opposed to being copied.
2938
2939 01/12/2006: cfisavage
2940             [Ruby]
2941             Updated the Ruby module to automatically convert
2942             method names to lower_case_with_underscores using the
2943             new %rename functionality.
2944
2945 01/12/2006: mmatus
2946             - Add aliases for 'case' encoders used with %rename/%namewarn
2947
2948               %(uppercase)s   hello_world -> HELLO_WORLD
2949               %(lowercase)s   HelloWorld  -> helloworld
2950               %(camelcase)s   hello_world -> HelloWorld
2951               %(undercase)s   HelloWorld  -> hello_world
2952
2953
2954 01/12/2006: mmatus
2955             - Add the -dump_parse_module and -dump_parse_top options,
2956             which are similar to -dump_module and -dump_top, but they
2957             dump the node trees just after parsing, showing only the 
2958             attributes visible at the parsing stage, and not the added
2959             later in typemap.cxx, allocate.cxx, lang.cxx or elsewhere.
2960             
2961             Besides debugging porpuses, these options are very useful
2962             if you plan to use %rename in an "advance way", since it
2963             shows only and all the node's attributes you can use
2964             inside the match rules.
2965
2966
2967 01/12/2006: mmatus
2968             - Add predicates to %rename, so, you don't need to
2969               remember, for example, how to match a member function.
2970
2971               Now it is easy, for example to use the 'utitle' encoder 
2972               in all the member methods, you type:
2973
2974                 %rename("%(utitle)s",%isfunction,%ismember) "";
2975
2976               or to ignore all the enumitems in a given class:
2977
2978                 %rename("$ignore", %isenumitem, %classname="MyClass") "";  
2979
2980               Available predicates are (see swig.swg):
2981
2982                 %isenum         
2983                 %isenumitem     
2984                 %isaccess       
2985                 %isclass        
2986                 %isextend       
2987                 %isextend       
2988                 %isconstructor  
2989                 %isdestructor   
2990                 %isnamespace    
2991                 %istemplate     
2992                 %isconstant     
2993                                         
2994                 %isunion        
2995                 %isfunction     
2996                 %isvariable     
2997                 %isimmutable    
2998                                         
2999                 %isstatic       
3000                 %isfriend       
3001                 %istypedef      
3002                 %isvirtual      
3003                 %isexplicit     
3004                 %isextern       
3005                                         
3006                 %ismember       
3007                 %isglobal 
3008                 %innamespace
3009
3010                 %ispublic    
3011                 %isprotected 
3012                 %isprivate   
3013                                      
3014                 %classname   
3015
3016               These predicates correspond to specific 'match'
3017               declarations, which sometimes are not as evident as the
3018               predicates names.
3019
3020
3021             - Add the or '|' operation in %rename match, for
3022               example to capitalize all the constants (%constant or
3023               const cdecl):
3024
3025                  %rename("%(upper)s",match="cdecl|constant",%isimmutable) "";
3026                 
3027
3028
3029 01/12/2006: mgossage
3030             -   Partial fixed of errors under C89, bug #1356574
3031                 (converted C++ style comments to C style)
3032             -   Added patches from neomantra@users.sf.net #1379988 and #1388343
3033                 missing a 'return' statement for error conditions
3034                 also updated the %init block bug #1356586
3035                  
3036 01/10/2006: mmatus
3037             - Add the 'utitle' encoder, as an example of how to add
3038               your own encoder. I added the encoder method in misc.c 
3039               but developers can add others, the same way, inside any
3040               target language.
3041               
3042               Well, 'utitle' is the reverse of 'ctitle', ie:
3043
3044                  %rename("%(ctitle)s") camel_case;  -> CamelCase;
3045                  %rename("%(utitle)s") CamelCase;   -> camel_case;
3046                  
3047
3048 01/10/2006: cfisavage
3049             [Ruby]
3050             Updated Ruby Exception handling.  Classes that are specified in throws clauses, 
3051             or are marked as %exceptionclass, are now inherited from rb_eRuntimeError. 
3052             This allows instances of these classes to be returned to Ruby as exceptions. 
3053             Thus if a C++ method throws an instance of MyException, the calling Ruby 
3054             method will get back a MyException object.  To see an example, 
3055             look at ruby/examples/exception_class.
3056
3057 01/10/2006: mmatus
3058             
3059             - Add the %catches directive, which complements the %exception
3060             directive in a more automatic way. For example, if you have
3061
3062                 int foo() throw(E1);
3063
3064             swig generates the proper try/catch code to dispatch E1.
3065             
3066             But if you have:
3067
3068
3069                   int barfoo(int i) {
3070                     if (i == 1) {
3071                        throw E1();
3072                     } else {
3073                       throw E2();
3074                     }
3075                     return 0;
3076                   }
3077
3078             ie, where there is no explicit exception specification in the decl, you 
3079             end up doing:
3080                   
3081                %exception barfoo {                      
3082                  try {                          
3083                    $action                      
3084                  } catch(E1) {  ... }                             
3085                  } catch(E2) {  ... }                             
3086                }                                
3087             
3088             which is very tedious. Well, the %catches directive defines
3089             the list of exceptions to catch, and from swig:
3090         
3091                %catches(E1,E2) barfoo(int i);
3092                int barfoo(int i);
3093
3094             is equivalent to 
3095
3096                int barfoo(int i) throw(E1,E2);
3097
3098             Note, however, that the %catches list doesn't have to
3099             correspond to the C++ exception specification. For example, if you
3100             have:
3101
3102                 struct E {};
3103                 struct E1 : E {};
3104                 struct E2 : E {};
3105
3106                 int barfoo(int i) throw(E1,E2);
3107
3108             you can define
3109                 
3110                 %catches(E) barfoo(int i);
3111         
3112             and swig will generate an action code equivalent to
3113
3114                  try {                          
3115                    $action                      
3116                  } catch(E &_e) { 
3117                    <raise _e>;
3118                  }      
3119
3120             Of course, you still have to satisfy the C++ restrictions,
3121             and the catches list must be compatible (not the same)
3122             as the original list of types in the exception specification.
3123
3124             Also, you can now specify that you want to catch the
3125             unknown exception '...', for example:
3126
3127                %catches(E1,E2,...) barfoo(int);
3128
3129             In any case, the %catches directive will emit the
3130             code to convert into the target language error/exception
3131             using the 'throws' typemap.
3132
3133             For the '...' case to work, you need to
3134             write the proper typemap in your target language. In the
3135             UTL, this looks like:
3136
3137               %typemap(throws) (...) {
3138                 SWIG_exception(SWIG_RuntimeError,"unknown exception");
3139               }
3140
3141 01/09/2006: mutandiz
3142             [Allegrocl]
3143
3144             Fixes a number of SEGVs primarily in the handling of
3145             various anonymous types. Found in a pass through the
3146             swig test-suite. Still more to do here, but this is a
3147             good checkpoint.
3148
3149             Adds -cwrap and -nocwrap as an allegrocl specific
3150             command-line argument. Controls generating of a C
3151             wrapper file when wrapping C code. By default only a
3152             lisp file is created for C code wrapping.
3153
3154             Doc updates for the command-line arguments and fixes as
3155             pointed out on swig-devel
3156
3157 01/05/2006: wsfulton
3158             [Java] Fix unsigned long long and const unsigned long long & typemaps
3159             - Bug #1398394  with patch from Dries Decock
3160
3161 01/06/2006: mmatus
3162             Add 'named' warning codes, now in addition to:
3163             
3164               %warnfilter(813);
3165            
3166             you can use
3167
3168               %warnfilter(SWIGWARN_JAVA_MULTIPLE_INHERITANCE);
3169
3170             just use the same code name found in  Source/Include/swigwarn.h 
3171             plus the 'SWIG' prefix.
3172
3173             If a developer adds a new warning code, the Lib/swigwarn.swg file
3174             will be generated when running the top level make.
3175
3176 01/05/2006: cfisavage
3177             [Ruby]
3178             Reimplemented object tracking for Ruby.  The new implementation works
3179             by expanding the swig_class structure for Ruby by adding a trackObjects
3180             field.  This field can be set/unset via %trackobjects as explained
3181             in the Ruby documentation.  The new implementation is more robust
3182             and takes less code to implement.
3183                 
3184 01/05/2006: wsfulton
3185             Fix for %extend and static const integral types, eg:
3186
3187               class Foo {
3188                 public:
3189                 %extend {
3190                     static const int bar = 42;
3191                 }
3192               }; 
3193
3194 12/30/2005: mmatus
3195
3196           - Add info for old and new debug options:
3197               
3198             -dump_top       - Print information of the entire node tree, including system nodes    
3199             -dump_module    - Print information of the module node tree, avoiding system nodes     
3200             -dump_classes   - Print information about the classes found in the interface               
3201             -dump_typedef   - Print information about the types and typedefs found in the interface
3202             -dump_tags      - Print information about the tags found in the interface          
3203             -debug_typemap  - Print information for debugging typemaps                         
3204             -debug_template - Print information for debugging templates                         
3205
3206           - Add the fakeversion. If you have a project that uses
3207             configure/setup.py, or another automatic building system
3208             and requires a specific swig version, let say 1.3.22 
3209             you can use:
3210
3211                SWIG_FEATURES="-fakeversion 1.3.22"
3212
3213              or
3214  
3215                swig -fakeversion 1.3.22
3216
3217              and then swig -version will report 1.3.22 instead of the
3218              current version.
3219
3220              Typical use would be
3221
3222                SWIG_FEATURES="-fakeversion 1.3.22" ./configure       
3223
3224 12/30/2005: mmatus
3225
3226           - Add option/format support to %rename and %namewarn. 
3227             Now %namewarn can force renaming, for example:
3228
3229               %namewarn("314: import is a keyword",rename="_%s") "import";
3230             
3231             and rename can also support format forms:
3232
3233                %rename("swig_%s") import;
3234
3235             Now, since the format is processed via swig Printf, you
3236             can use encoders as follows:
3237
3238                %rename("%(title)s")  import;     -> Import
3239                %rename("%(upper)s")  import;     -> IMPORT
3240                %rename("%(lower)s")  Import;     -> import
3241                %rename("%(ctitle)s") camel_case; -> CamelCase
3242                
3243             This will allow us to add more encoders, as the 
3244             expected one for regular expressions. 
3245
3246           - Add the above 'ctitle' encoder, which does the camel case:
3247
3248                 camel_case -> CamelCase
3249   
3250           - Also, while we get the regexp support, add the 'command' encoder,
3251             you can use it as follows
3252
3253                %rename("%(command:sed -e 's/\([a-z]\)/\U\\1/' <<< )s") import; 
3254
3255             then swig will popen the command
3256             
3257                 "sed -e 's/\([a-z]\)/\U\\1/' <<< import"
3258                 
3259             see below for anonymous renames for better examples.                
3260
3261           - The rename directive now also allows:
3262
3263             - simple match: only apply the rename if a type match
3264               happen, for example
3265
3266                  %rename(%(title)s,match="enumitem") hello;
3267
3268                  enum Hello {
3269                    hi, hello  ->  hi, Hello  
3270                  };
3271                  int hello()  ->  hello; 
3272
3273             - extended match: only apply the rename if the 'extended attribute' match
3274               occurred, for example: 
3275
3276                  // same as simple match                
3277                  %rename(%(title)s,match$nodeType="enumitem") hello; 
3278
3279                  enum Hello {
3280                    hi, hello  ->  hi, Hello  
3281                  };
3282
3283                Note that the symbol '$' is used to define the attribute name in
3284                a 'recursive' way, for example:
3285
3286                  // match only hello in 'enum Hello'
3287                  %rename(%(title)s,match$parentNode$type="enum Hello") hello; 
3288
3289                  enum Hello {
3290                    hi, hello  ->  hi, Hello   // match
3291                  };
3292
3293                  enum Hi {
3294                    hi, hello  ->  hi, hello   // no match
3295                  };
3296
3297                here, for Hello::hi, the "parentNode" is "Hello", and its "type"
3298                is "enum Hello".
3299                
3300                
3301             - Anonymous renames: you can use 'anonymous' rename directives, for example: 
3302
3303                  // rename all the enum items in Hello
3304                  %rename(%(title)s,match$parentNode$type="enum Hello") ""; 
3305
3306                  enum Hello {
3307                    hi, hello  ->  Hi, Hello   // match both
3308                  };
3309
3310                  enum Hi {
3311                    hi, hello  ->  hi, hello   // no match
3312                  };
3313                  
3314                  // rename all the enum items 
3315                  %rename(%(title)s,match$nodeType="enumitem") ""; 
3316
3317                  // rename all the items in given command (sloooow, but...)
3318                  %rename(%(command:<my external cmd>)s) ""; 
3319
3320         
3321               Anonymous renames with commands can be very powerful, since you
3322               can 'outsource' all the renaming mechanism (or part of it) to an
3323               external program:
3324               
3325                 // Uppercase all (and only) the names that start with 'i'
3326                 %rename("%(command:awk '/^i/{print toupper($1)}' <<<)s") "";   
3327                
3328                 int imported() -> IMPORTED;
3329                 int hello()    -> hello
3330
3331               Note that if the 'command' encoder returns an empty string, swig
3332               understands that no rename is necessary.
3333
3334               Also note that %rename 'passes' the matched name. For example, in
3335               this case
3336
3337                 namespace ns1 {
3338                   int foo();
3339                 }
3340
3341                 namespace ns2 {
3342                   int bar();
3343                 }
3344
3345               the external program only receives "foo" and "bar". If needed,
3346               however, you can request the 'fullname' 
3347                 
3348                 %rename("%(command:awk 'awk '/ns1::/{l=split($1,a,"::"); print toupper(a[l])}'' <<<)s",fullname=1) "";   
3349                 
3350                 ns1::foo -> FOO
3351                 ns2::bar -> bar 
3352         
3353             - Mixing encoders and matching: of course, you can do mix commands
3354               and match fields, for example:
3355
3356                 %rename("%(<my encoder for fncs>)",match="cdecl") "";
3357                 %rename("%(<my encoder for enums>)",match="enumitem") "";
3358                 %rename("%(<my encoder for enums inside a class>)",match="enumitem",
3359                         match$parentNode$parentNode$nodeType="class") "";
3360                 
3361               Use "swig -dump_parse_module" to see the attribute names you can use to
3362               match a specific case.
3363         
3364             - 'sourcefmt' and 'targetfmt': sometimes you need to
3365               process the 'source' name before comparing, for example
3366
3367                 %namewarn("314: empty is a keyword",sourcefmt="%(lower)s") "empty";
3368
3369               then if you have
3370
3371                 int Empty();  // "Empty" is the source 
3372                 
3373               you will get the keyword warning since 'Empty' will be
3374               lower cased, via the sourcefmt="%(lower)s" option,
3375               before been compared to the 'target' "empty".
3376
3377               There is an additional 'targetfmt' option to process the
3378               'target' before comparing.
3379
3380             - complementing 'match': you can use 'notmatch', for example
3381               
3382                 %namewarn("314: empty is a keyword",sourcefmt="%(lower)s",notmatch="namespace") "empty";
3383
3384               here, the name warning will be applied to all the symbols except namespaces.
3385             
3386         
3387 12/30/2005: mmatus
3388
3389           - Add initial support for gcj and Java -> <target language> mechanism.
3390
3391             See examples in:  
3392           
3393                 Examples/python/java
3394                 Examples/ruby/java
3395                 Examples/tcl/java
3396
3397             to see how to use gcj+swig to export java classes into
3398             python/ruby/tcl.
3399             
3400             The idea is to put all the common code for gcj inside
3401
3402                   Lib/gcj
3403
3404             and localize specific types such as jstring, as can be found
3405             in
3406
3407                  Lib/python/jstring.i
3408                  Lib/ruby/jstring.i
3409                  Lib/tcl/jstring.i
3410
3411             Using the UTL, this is very easy, and the perl version for
3412             jstring.i will be next.
3413                             
3414
3415 12/29/2005: mmatus
3416           - Add the copyctor feature/directive/option to enable the automatic
3417             generation of copy constructors. Use as in:
3418
3419               %copyctor A;
3420
3421               struct A {
3422
3423               };
3424
3425             then this will work
3426
3427               a1 = A();
3428               a2 = A(a1);
3429
3430             Also, since it is a feature, if you just type
3431
3432               %copyctor;
3433
3434             that will  enable the automatic generation for all the
3435             classes. It is also equivalent to
3436
3437                swig -copyctor -c++ ...
3438
3439             Notes: 
3440
3441             1.- The feature only works in C++ mode.
3442
3443             2.- The automatic creation of the copy constructor will
3444                 usually produce overloading. Hence, if the target
3445                 language doesn't support overloading, a special name
3446                 will be used (A_copy).
3447             
3448             3.- For the overloading reasons above, it is probably not
3449                 a good idea to use the flag when, for example, you are
3450                 using keywords in Python.
3451
3452             4.- The copyctor automatic mechanism follows more or less
3453                 the same rules as the default constructor mechanism,
3454                 i.e., a copy constructor will not be added if the
3455                 class is abstract or if there is a pertinent non-public 
3456                 copy ctor in the class or its hierarchy.
3457
3458                 Hence, it might be necessary for you to complete the
3459                 class declaration with the proper non-public copy ctor
3460                 to avoid a wrong constructor addition.
3461                 
3462           - Fix features/rename for templates ctor/dtor and other
3463             things around while adding the copyctor mechanism.
3464             
3465
3466 12/27/2005: mmatus
3467           - Add the 'match' option to typemaps. Assume you have:
3468
3469               %typemap(in) SWIGTYPE * (int res) {..}
3470               %typemap(freearg) SWIGTYPE * { if (res$argnum) ...}
3471
3472             then if you do
3473  
3474               %typemap(in) A * {...}
3475
3476             swig will 'overload the 'in' typemap, but the 'freearg' 
3477             typemap will be also applied, even when this is wrong. The old
3478             solutions is to write:
3479
3480               %typemap(in) A * {...}
3481               %typemap(freeag) A * "";
3482
3483             overload 'freearg' with an empty definition.
3484
3485             The problem is, however, there is no way to know you need
3486             to do that until you start getting broken C++ code, or
3487             worse, broken runtime code.
3488
3489             The same applies to the infamous 'typecheck' typemap,
3490             which always confuses people, since the first thing you do
3491             is to just write the 'in' typemap.
3492
3493             The 'match' option solves the problem, and if instead you write:
3494
3495               %typemap(in) SWIGTYPE * (int res) {..}
3496               %typemap(freearg,match="in") SWIGTYPE * { if (res$argnum) ...}
3497               %typemap(typecheck,match="in",precedence...) SWIGTYPE * {...}
3498             
3499             it will tell swig to apply the 'freearg/typecheck'
3500             typemaps only if they 'match' the type of the 'in'
3501             typemap. The same can be done with other typemaps as:
3502
3503               %typemap(directorout) SWIGTYPE * {...}
3504               %typemap(directorfree,match="directorout") SWIGTYPE * {...}
3505             
3506
3507 12/27/2005: mmatus
3508           - Add the 'naturalvar' option/mode/feature to treat member
3509             variables in a more natural way, ie, similar to the global
3510             variable behavior.
3511
3512             You can use it in a global way via the command line
3513
3514               swig -naturalvar ...
3515
3516             or the module mode option
3517  
3518               %module(naturalvar=1)
3519
3520             both forms make swig treat all the member variables in the
3521             same way it treats global variables. 
3522
3523             Also, you can use it in a case by case approach for
3524             specific member variables using the directive form:
3525
3526               %naturalvar Bar::s;
3527             
3528             Then, in the following case for example:
3529
3530                std::string s;
3531                struct Bar {
3532                  std::string s;
3533                };
3534
3535             you can do:  
3536
3537                b = Bar()
3538                b.s ="hello"
3539                cvar.s = "hello"
3540                
3541                if (b.s != cvar.s):
3542                   raise RuntimeError
3543
3544                   
3545             This is valid for all the languages, and the
3546             implementation is based on forcing the use of the 
3547             const SWIGTYPE& (C++)/SWIGTYPE (C) typemaps for the
3548             get/set methods instead of the SWIGTYPE * typemaps.
3549             Hence, for 'naturalvar' to work, each target language
3550             must implement 'typemap(in/out) const Type&' properly.
3551
3552             The 'naturalvar' option replaces or makes workarounds such  as:
3553             
3554                 %apply const std::string & { std::string *}
3555
3556             unnecessary.
3557
3558             Note1: If your interface has other kinds of workarounds to
3559             deal with the old 'unnatural' way to deal with member
3560             variables (returning/expecting pointers), the
3561             'naturalvar' option could break them.
3562             
3563             Note2: the option has no effect on unnamed types, such
3564             as unnamed nested unions.
3565             
3566           
3567 12/27/2005: mmatus
3568           - Add more 'expressive' result states for the typemap
3569             libraries.
3570
3571             In the past, for scripting languages, you would do checking something like:
3572
3573               if (ConvertPtr(obj,&vptr,ty,flags) != -1) {
3574                 // success
3575               } else {
3576                 // error
3577               }
3578
3579             Now the result state can carry more information,
3580             including:
3581
3582               - Error state: like the old -1/0, but with error codes from swigerrors.swg.
3583
3584                  int res = ConvertPtr(obj,&vptr,ty,flags);
3585                  if (SWIG_IsOK(res)) {
3586                    // success code
3587                  } else {
3588                    SWIG_Error(res); // res carries the error code
3589                  }
3590
3591               - Cast rank: when returning a simple successful
3592                 conversion, you just return SWIG_OK, but if you need
3593                 to do a 'cast', you can add the casting rank, ie:
3594                 
3595                   if (PyFloat_Check(obj)) {
3596                     value = PyFloat_AsDouble(obj);
3597                     return SWIG_OK;
3598                   } else if (PyInt_Check(obj)) {
3599                     value = (double) PyInt_AsLong(obj);
3600                     return SWIG_AddCast(SWIG_OK);                   
3601                   }
3602                 
3603                 later, the casting rank is used to properly dispatch
3604                 the overloaded function, for example. This of course
3605                 requires your language to support and use the new
3606                 dispatch cast/rank mechanism (Now mainly supported in
3607                 perl and python, and easily expandable to ruby and tcl).
3608               
3609           - [UTL] Add support for the new 'expressive' result states.
3610
3611 12/27/2005: mmatus
3612           - Add support for the C++ implicit conversion mechanism, which
3613             required some modifications in parser.y (to recognize
3614             'explicit') and overload.cxx (to replace $implicitconv as
3615             needed).
3616             
3617             Still, real support in each target language requires each
3618             target language to be modified. Python provides an example,
3619             see below.
3620
3621
3622           - Add support for native C++ implicit conversions, ie, if you
3623             have
3624
3625                 %implicitconv A;
3626
3627                 struct A {
3628                    int ii;
3629                    A() {ii = 1;}
3630                    A(int) {ii = 2;}
3631                    A(double) {ii = 3;}
3632                    explicit A(char *s) {ii = 4;}
3633                 };
3634                 
3635                 int get(const A& a) {return a.ii;}
3636
3637             you can call:
3638
3639                 a = A()
3640                 ai = A(1)
3641                 ad = A(1.0)
3642                 as = A("hello")
3643                 
3644                 # old forms
3645                 get(a)  -> 1
3646                 get(ai) -> 2
3647                 get(ad) -> 3
3648                 get(as) -> 4
3649                 
3650                 #implicit conversions
3651                 get(1)       -> 2
3652                 get(1.0)     -> 3
3653                 get("hello") -> Error, explicit constructor
3654
3655             Also, as in C++, now implicit conversions are supported in
3656             variable assigments, and if you have:
3657
3658               A ga;
3659               struct Bar {
3660                 A a;
3661               };
3662
3663             you can do:
3664
3665               cvar.ga = A(1)
3666               cvar.ga = 1
3667               cvar.ga = 1.0
3668               cvar.ga = A("hello") 
3669               cvar.ga = "hello" -> error, explicit constructor
3670
3671               b = Bar()
3672               b.a = A("hello")
3673               b.a = 1
3674               b.a = 1.0
3675               b.a = "hello" -> error, explicit constructor
3676
3677             Note that the last case, assigning a member var directly, 
3678             also requires the 'naturalvar' option.
3679
3680             This support now makes the old '%implicit' macro, which
3681             was found in 'implicit.i' and it was fragile in many ways,
3682             obsolete, and you should use the new '%implicitconv'
3683             directive instead.
3684
3685             Note that we follow the C++ conventions, ie, in the
3686             following the implicit conversion is allowed:
3687
3688                 int get(A a) {return a.ii;}
3689                 int get(const A& a) {return a.ii;}
3690             
3691             but not in these cases:
3692
3693                 int get(A *a) {return a->ii;}
3694                 int get(A& a) {return a.ii;}
3695                 
3696             Also, it works for director methods that return a by value
3697             result, ie, the following will work:
3698
3699                 virtual A get_a() = 0;
3700
3701                 def get_a(self):
3702                    return 1
3703
3704             but not in this case:
3705
3706                 virtual const A& get_a() = 0;
3707                 virtual A& get_a() = 0;
3708                 virtual A* get_a() = 0;
3709             
3710           Notes:
3711
3712           - the implicitconv mechanism is implemented by directly
3713             calling/dispatching the python constructor, triggering a
3714             call to the __init__method. Hence, if you expanded the
3715             __init__ method, like in:
3716
3717                 class A:
3718                    def __init__(self,args):
3719                       <swig code>
3720                       <my code here>
3721
3722             then 'my code' will also be executed.
3723             
3724           - Since the %implicitconv directive is a SWIG feature, if you type:
3725             
3726                %implicitconv;  
3727
3728             that will enable implicit conversion for all the classes in
3729             your module.
3730
3731             But if you are worried about performance, maybe that will be
3732             too much, especially if you have overloaded methods, since
3733             to resolve the dispatching problem, python will efectively
3734             try to call all the implicit constructors as needed.
3735
3736           - For the same reason, it is highly recommended that you use
3737             the new 'castmode' when mixing implicit conversion and
3738             overloading.
3739
3740          - [python] The %implicit directive is declared obsolete, and
3741            you should use %implicitconv instead. If you include
3742            the implicit.i file, a warning will remind you of this.
3743
3744            Note: Since %implicit is fragile, just replacing it by
3745            %implicitconv could lead to different behavior. Hence, we
3746            don't automatically switch from to the other, and the user
3747            must migrate to the new %implicitconv directive manually.
3748
3749
3750 12/26/2005: wsfulton
3751             [C#]
3752             Modify std::vector wrappers to use std::vector::value_type as this is
3753             closer to the real STL declarations for some methods, eg for push_back().
3754             Fixes some compilation errors for some compilers eg when the templated
3755             type is a pointer.
3756
3757             [Java]
3758             std::vector improvements - a few more methods are wrapped and specializations are
3759             no longer required. The specialize_std_vector macro is no longer needed (a
3760             warning is issued if an attempt is made to use it).
3761
3762 12/26/2005: wsfulton
3763             [Java, C#]
3764             Add in pointer reference typemaps. This also enables one to easily wrap
3765             std::vector<T> where T is a pointer.
3766
3767 12/24/2005: efuzzyone
3768             [CFFI] The cffi module for SWIG:
3769               - Fully supports C, but provides limited supports for C++, in
3770                particular C++ support for templates and overloading needs to
3771                be worked upon. 
3772
3773 12/23/2005: mmatus
3774             [python] Add the castmode that allows the python
3775             type casting to occur.
3776
3777             For example, if you have 'int foo(int)', now
3778             
3779               class Ai():
3780                  def __init__(self,x): 
3781                     self.x = x
3782                  def __int__(self): 
3783                     return self.x
3784
3785               foo(1)   // Ok
3786               foo(1.0) // Ok
3787               foo(1.3) // Error
3788               a = Ai(4)
3789               foo(ai)  // Ok
3790
3791             The castmode, which can be enabled either with the
3792             '-castmode' option or the %module("castmode") option, uses
3793             the new cast/rank dispatch mechanism. Hence, now if you
3794             have 'int foo(int); int foo(double);', the following works
3795             as expected:
3796
3797               foo(1)   -> foo(int)
3798               foo(1.0) -> foo(double)
3799               ai = Ai(4)
3800               foo(ai)  -> foo(int)
3801
3802             Note1: the 'castmode' could disrupt some specialized
3803             typemaps. In particular, the "implicit.i" library seems to
3804             have problem with the castmode. But besides that one, the
3805             entire test-suite compiles fine with and without the
3806             castmode.
3807
3808             Note2: the cast mode can't be combined with the fast
3809             dispatch mode, ie, the -fastdispatch option has no effect
3810             when the cast mode is selected. The penalties, however,
3811             are minimum since the cast dispatch code is already based
3812             on the same fast dispatch mechanism.
3813
3814             See the file overload_dispatch_cast_runme.py file for
3815             new cases and examples.
3816
3817 12/22/2005: mmatus
3818             Add the cast and rank mechanism to dispatch overloading
3819             functions. The UTF supports it now, but for each language
3820             it must be decided how to implement and/or when to use it.
3821
3822             [perl] Now perl uses the new cast and rank dispatch
3823             mechanism, which solves all the past problems known 
3824             in perl, such as the old '+ 1' problem:
3825
3826                 int foo(int);
3827             
3828                 $n = 1
3829                 $n = $n + 1
3830                 $r = foo(n)
3831
3832             also works:
3833
3834                  foo(1);
3835                  foo("1");
3836                  foo(1.0);
3837                  foo("1.0");
3838
3839              but fails
3840
3841                  foo("l");
3842
3843              and when overloading  foo(int) and foo(double);
3844
3845                  foo(1) -> foo(int)
3846                  foo(1.0) -> foo(double)
3847                  foo("1") -> foo(int)
3848                  foo("1.0") -> foo(double)
3849                  foo("l") -> error
3850                  foo($n) -> foo(int)  for good perl versions
3851                  foo($n) -> foo(double)  for old bad perl versions
3852
3853              when overloading foo(int), foo(char*) and foo(double):
3854
3855                  foo(1) -> foo(int)
3856                  foo(1.0) -> foo(double)
3857                  foo("1") -> foo(char*)
3858                  foo("1.0") -> foo(char*)
3859                  foo("l") -> foo(char*)
3860
3861              Note: In perl the old dispatch mechanism was broken,
3862              so, we don't provide an option to enable the old one
3863              since, again, it was really really broken.
3864
3865              See 'overload_simple_runme.pl' for more cases and tests.
3866
3867              PS: all the old known issues are declared resolved, any
3868              new "problem" that could be discovered is declared, 
3869              a priori, as "features" of the new dispatch mechanism
3870              (until we find another solution at least).
3871              
3872              
3873             *** POTENTIAL INCOMPATIBILITY  ***
3874
3875             As with the introduction of the UTF, some things could
3876             now start to work as expected, and people used to deal or
3877             workaround previous bugs related to the dispatch
3878             mechanism, could see now a difference in perl behavior.
3879
3880 12/21/2005: mmatus
3881           - The '-nodefault' flag (pragma and feature) now generates
3882             a warning, and recommends to use the explicit
3883             -nodefaultctor and  -nodefaultdtor options.
3884             
3885             The reason to split the 'nodefault' behavior is that, in
3886             general, ignoring the default destructor generates memory
3887             leaks in the target language. Hence, is too risky just to
3888             disable both the default constructor and destructor
3889             at the same time.
3890
3891             If you need to disable the default destructor, it is
3892             also recommended you use the directive form:
3893
3894                %nodefaultdtor  MyVerySpecialClass;
3895
3896             for specific classes, and always avoid using the global
3897             -nodefault and -nodefaultdtor options.
3898             
3899 12/21/2005: wsfulton
3900             [Java, C#]
3901             Fix incorrect code generation when the intermediary classname is changed
3902             in the module directive from its default. For example:
3903
3904               %module(jniclassname="myimclassnewname") "mymodule" // Java
3905               %module(imclassname="myimclassnewname") "mymodule" // C#
3906
3907             Add in new special variable $imclassname. See docs.
3908
3909 12/17/2005: mmatus
3910           [Python]
3911           - Add the -aliasobj0/-noaliasobj0 options to use with
3912             -fastunpack and/or -O and old typemaps that use 'obj0'
3913             directly.
3914
3915             So, if you compile your code using -O and get errors about
3916             the undeclared 'obj0' variable, run again using 
3917
3918                 swig -O -aliasobj0 -python ....
3919             
3920             For new typemaps, never use 'obj0' directly, if needed,
3921             use the '$self' name that will be properly  expanded to
3922             'obj0' (nofastunpack) or 'swig_obj[0]' (fastunpack). 
3923   
3924             If you have no idea what I am talking about, better, that
3925             means you have no typemap with this problem.
3926
3927
3928 12/14/2005: mmatus       
3929           [Python]
3930           - Add the -fastunpack/-nofastunpack options to enable/disable
3931             the use of the internal UnpackTuple method, instead of
3932             calling the one from the python C API.
3933
3934             The option -O now also implies -fastunpack.
3935             
3936
3937 12/11/2005: mmatus 
3938           [Python]
3939           - Add the -proxydel/-noproxydel options to enable/disable
3940             the generation of proxy/shadow __del__ methods, even
3941             when now they are redundant, since they are empty.
3942             However, old interfaces could rely on calling them.
3943
3944             The default behavior is to generate the __del__ methods
3945             as in 1.3.27 or older swig versions.
3946
3947             The option -O now also implies -noproxydel.
3948
3949 12/10/2005: mmatus 
3950           [UTF]
3951           - Fix unneccessary calls to SWIG_TypeQuery for 'char *'
3952             and 'wchar_t *', problem found by Clay Culver while
3953             profiling the PyOgre project.
3954
3955           
3956           [Python] 
3957           - Add the -dirvtable/-nodirvtable to enable/disable
3958             a pseudo virtual table used for directors, avoiding
3959             the need to resolve the python method at each call.
3960             
3961           - Add the -safecstrings/-nosafecstrings options to
3962             enable/disable the use of safe conversions from PyString
3963             to char *. Python requires you to never change the internal
3964             buffer directly, and hence 'safectrings' warranties that
3965             but returning a copy of the internal python string buffer.
3966
3967             The default, as in previous releases, is to return a
3968             pointer to the buffer (nosafecstrings), so, it is the user's
3969             responsibility to avoid its modification.
3970             
3971           - Add the -O option to enable all the optimization options
3972             at once, initially equivalent to
3973
3974             -modern -fastdispatch -dirvtable -nosafecstrings -fvirtual
3975
3976 12/08/2005: mmatus 
3977
3978           - Add the -fastdispatch option (fastdispatch feature). This
3979             enables the "fast dispatch" mechanism for overloaded
3980             methods provided by Salvador Fandi~no Garc'ia (#930586).
3981
3982             The resulting code is smaller and faster since less type
3983             checking is performed. However, the error messages you
3984             get when the overloading is not resolved could be
3985             different from what the traditional method returns.
3986
3987             With the old method you always get an error such as 
3988
3989                "No matching function for overloaded ..."
3990
3991             with the new method you can also get errors such as
3992
3993                "Type error in argument 1 of type ..."
3994
3995             See bug report #930586 for more details.
3996             
3997             So, this optimization must be explicitly enabled by users.
3998
3999             The new mechanism can be used as:
4000
4001               swig -fastdispatch
4002
4003             or using the feature form
4004
4005               %feature("fastdispatch") method;
4006             or
4007               %fastdispatch method;
4008             
4009
4010 12/06/2005: mmatus 
4011
4012           - Several memory and speed improvements, specially for
4013             templates. Now swig is up to 20 faster than before for
4014             large template interfaces, such as the std_containers.i
4015             and template_matrix.i files in the python test-suite.
4016
4017             Memory footprint is also reduced in consideration of small
4018             pcs/architectures.
4019
4020           - add commandline options -cpperraswarn and -nocpperraswarn" to force
4021             the swig preprocessor to treat the #error directive as a #warning.
4022             
4023             the pragmas
4024
4025                #pragma SWIG cpperraswarn=1
4026                #pragma SWIG cpperraswarn=0
4027                
4028             are equivalent to the command line options, respectively.
4029              
4030
4031 12/06/2005: mmatus
4032             [Python] The generated code is now more portable, especially
4033             for Windows. Following 
4034
4035                  http://www.python.org/doc/faq/windows.html
4036
4037             Py_None is never accessed as a structure, plus other
4038             tricks mentioned there.
4039
4040 12/06/2005: mmatus
4041             [Python] Added initial support for threads based in the
4042             proposal by Joseph Winston.
4043
4044             The user interface is as follows:
4045
4046             1.- the module thread support is enable via the "threads" module
4047                 option, i.e.
4048
4049                   %module("threads"=1)
4050
4051             2.- Equivalent to that, is the new '-threads' swig option
4052
4053                   swig -threads -python ...
4054
4055             3.- You can partially disable thread support for a given
4056                 method using:
4057
4058                   %feature("nothread") method;
4059                 or
4060                   %nothread method;
4061
4062                 also, you can disable sections of the thread support, 
4063                 for example
4064
4065                   %feature("nothreadblock") method;
4066                 or
4067                   %nothreadblock method;
4068
4069                   %feature("nothreadallow") method;
4070                 or
4071                   %nothreadallow method;
4072
4073                 the first disables the C++/python thread protection, and the
4074                 second disables the python/C++ thread protection. 
4075
4076             4.- The current thread support is based in the PyGIL
4077                 extension present in python version 2.3 or later, but
4078                 you can provide the thread code for older versions by
4079                 defining the macros in pythreads.swg.
4080
4081                 If you get a working implementation for older versions,
4082                 please send us a patch.
4083
4084             For the curious about performance, here are some numbers
4085             for the profiletest.i test, which is used to check the speed
4086             of the wrapped code:
4087
4088                 nothread           9.6s  (no thread code)
4089                 nothreadblock     12.2s  (only 'allow' code)
4090                 nothreadallow     13.6s  (only 'block' code)
4091                 full thread       15.5s  ('allow' + 'block' code)
4092             
4093             i.e., full thread code decreases the wrapping performance by
4094             around 60%. If that is important to your application, you
4095             can tune each method using the different 'nothread',
4096             'nothreadblock' or 'nothreadallow' features as
4097             needed. Note that for some methods deactivating the
4098             'thread block' or 'thread allow' code is not an option,
4099             so, be careful.
4100             
4101
4102 11/26/2005: wsfulton
4103             SWIG library files use system angle brackets everywhere for %include, eg
4104               %include "std_common.i"
4105             becomes
4106               %include <std_common.i>
4107
4108 11/26/2005: wsfulton
4109             [Java, C#]
4110             Typesafe enums and proper enums have an extra constructor so that enum item values that
4111             are initialised by another enum item value can be wrapped without having to use %javaconstvalue/
4112             %csconstvalue for when using %javaconst(1)/%csconst(1). Suggestion by
4113             Bob Marinier/Douglas Pearson.
4114             For example:
4115
4116               typedef enum
4117               {
4118                  xyz,
4119                  last = xyz
4120               } repeat;
4121
4122 11/21/2005: mmatus
4123             [ruby + python]
4124
4125             Fixes for directors + pointers. This is an ugly problem without an easy
4126             solution. Before we identified this case as problematic:
4127
4128                   virtual const MyClass& my_method();
4129
4130             but it turns out that all the cases where a pointer, array or
4131             reference is returned, are problematic, even for 
4132             primitive types (as int, double, char*, etc).
4133
4134             To try to fix the issue, a new typemap was added,
4135             'directorfree', which is used to 'free' the resources
4136             allocated during the 'directorout' phase. At the same
4137             time, a primitive garbage collector engine was added to
4138             deal with orphaned addresses, when needed.
4139             
4140             The situation is much better now, but still it is possible to have
4141             memory exhaustation if recursion is used.
4142
4143             So, still you need to avoid returning pointers, arrays or
4144             references when using director methods.
4145
4146             - Added stdint.i - typemaps for latest C99 integral types found in stdint.h.
4147             
4148 11/14/2005: wsfulton
4149             More types added to windows.i, eg UINT8, WORD, BYTE etc. 
4150             Including windows.i will also enable SWIG to parse the __declspec Microsoft
4151             extension, eg __declspec(dllimport). Also other Windows calling conventions
4152             such as __stdcall.
4153
4154 11/10/2005: wsfulton
4155             New library file for Windows - windows.i. This file will contain useful type
4156             information for users who include windows.h. Initial support is for the
4157             non ISO integral types: __int8, __int16, __int32, __int64 and unsigned versions.
4158             The unsigned versions previously could not be parsed by SWIG.  SF #872013.
4159
4160 11/09/2005: wsfulton
4161             [Java, C#] Portability warning for files which will overwrite each other on case
4162             insensitive file systems such as FAT32/NTFS. This will occur, for example, when two
4163             class names are the same barring case. The warning is issued on all platforms and
4164             can be suppressed with the usual warning suppression techniques. SF bug #1084507.
4165
4166 11/09/2005: wsfulton
4167             ./configure --with-python --with-ruby --with-perl5 etc enable these languages,
4168             ie the --with-xxxx options, where no path is specified, work the same as if 
4169             the option was not specified at all. Based on patches #1335042 #1329048 #1329047.
4170
4171 11/09/2005: dancy
4172
4173             [Allegrocl]
4174             Add C++ support to the Allegrocl module. Further
4175             enhances the C support as well. Some of the
4176             features:
4177
4178             - MUCH better generation of foreign types based on
4179             the C/C++ types for use in defining the FFI on
4180             the lisp side. We don't pass everything as a (* :void)
4181             any longer.
4182
4183             - Uses typemaps for better control of type conversions
4184             and code generation in the generated lisp and c++ wrapper
4185             code.
4186
4187             - CLOS wrapping of pointers returned from foreign space
4188             makes it easier to differentiate pointers in user code.
4189             The wrapping objects can be passed directly to FF calls.
4190
4191             - Defun wrapping of FF calls, allowing for more lispy
4192             interface. Conversion, GCing, of lisp objects to 
4193             foreign objects can be done in the wrapping defun via
4194             the use of typemaps.
4195             
4196             - overload dispatching implemented on the lisp side
4197             using generic functions.
4198
4199             - Templates and synonymous types supported.
4200
4201 11/07/2005: mmatus
4202
4203             [Python] Adding proper support for multi-inheritance in
4204             the python side, ie, if you have two C++ wrapped class, Foo
4205             and Bar, now:
4206
4207                class MyPythonClass(Foo,Bar):
4208                   ....
4209
4210             will properly work, even with directors, and the
4211             deallocation of Foo.this and Bar.this will follow
4212             correctly. Before, a class could only have one 'this'
4213             instance (unlike C++), only the last base class was
4214             properly deleted, or detected with directors.
4215
4216             Now 'self.this' can be a list, which will contain the C++
4217             instance pointers for all the base classes.
4218             
4219             Also, swig.this is responsible for deallocating the C++
4220             instance(s), and the __del__ method is not emitted unless
4221             the user preppend/append some code to it.
4222
4223           - Swig can now detect memory leaks, ie, if you still
4224             don't use proxy/shadow classes, and type something like
4225             
4226                  import _example
4227                  f = _example.new_Foo()
4228
4229             and forget to call _example.delete_Foo(f), then swig will
4230             tell you that there is a memory leak.
4231
4232             Otherwise, if you always use the proxy classes, you probably
4233             you will never ever see this warning unless there is
4234             something wrong inside the swig wrapping code.
4235                
4236         
4237             *** POTENTIAL INCOMPATIBILITY ***
4238             
4239             If you overloaded the __del__ method, and call the base
4240             one  without a try block, as in
4241
4242                    class MyClass(SwigClass):
4243
4244                       def __del__(self):
4245                           <your code here>
4246                           SwigClass.__del__(self)
4247                           
4248             python could complain that the method SwigClass.__del__ is
4249             undefined. Try to use instead:
4250             
4251                       def __del__(self):
4252                           <your code here>
4253                           try: SwigClass.__del__(self)
4254                           except: pass
4255
4256             or simply             
4257
4258                       def __del__(self):
4259                           <your code here>
4260
4261 11/02/2005: mmatus
4262
4263             [Python] Adding more fun to STL/STD containers, now you
4264             can do
4265
4266                %template(pyset) std::set<PyObject *>;           
4267                %template(pyvector) std::vector<PyObject *>;     
4268                %template() std::pair<PyObject *,PyObject *>;    
4269                %template(pyvector) std::map<PyObject *,PyObject *>;
4270                ....
4271
4272             The same  applies to std::list, std::deque, std::multiset, etc.
4273
4274             Then, at the python side you can do now:
4275
4276                # C++ std::vector as native python sequence
4277                v = pyvector([1,"hello",(1,2)])
4278                print v[1]
4279                >> 'hello'
4280                print v[2]
4281                >> (1,2)
4282                                                    
4283                # C++ std::set as native python sequence
4284                s = pyset()                         
4285                s.insert((1,2))             
4286                s.insert(1)                         
4287                s.insert("hello")
4288                sum=()
4289                for i in s:
4290                  sum +=(i,)
4291                print sum
4292                >>> (1, 'hello', (1, 2))
4293                                            
4294                # C++ std::map as native python sequence
4295                m = pymap()                         
4296                m["foo"] = "hello"                  
4297                m[1] = (1,2)
4298                pm = {}
4299                for k in m:                 
4300                  pm[k] = m[k]
4301                print pm
4302                >>> {1: (1, 2), 'foo': 'hello'}
4303
4304             ie, the STD/STL containers work as real native python
4305             container, with arbitrary item types and so.
4306
4307             But since normal C++ containers do not properly ref/unref
4308             their items, you should use the safer versions:
4309             
4310               %template(pyset) std::set<swig::PyObject_ptr>;
4311               %template(pyvector) std::vector<swig::PyObject_ptr>;
4312               %template() std::pair<swig::PyObject_ptr, swig::PyObject_ptr>;
4313               %template(pyvector) std::map<swig::PyObject_ptr,swig::PyObject_ptr>;
4314               ....
4315
4316             where swig::PyObject_ptr is a PyObject * envelope class provided
4317             to safely incref/decref the python object. 
4318             
4319             So, now you can use all the STL/STD containers as native
4320             Python containers. 
4321
4322             Note 1: std::map, std::set and the other 'ordered'
4323             containers will properly use PyObject_Compare for sorting,
4324             when needed.
4325
4326             Note 2: all the STL/STD containers have a limit size of
4327             SIZE_MAX, ie, you can have manage containers larger than
4328             INT_MAX, the python limit.
4329             
4330               
4331 11/02/2005: mmatus
4332
4333             [Python]
4334             - add 'iterator()' method for all sequences and additionally
4335               'key_iterator()' for maps.
4336
4337               'iterator()' will always return the native C++ iterator.
4338               Additionally, in maps, 'key_iterator()' will return a python
4339               iterator using only the map keys.
4340               
4341               In general the sequence method __iter__ will call
4342               'iterator()', returning the native C++ iterator, but in
4343               maps it will call 'key_iterator()', maintaining
4344               backward compatibility.
4345
4346               Hence, for std::maps, you can play then with the native
4347               C++ iterator, which value is a (key, value) pair, by
4348               calling map.iterator(), as with map.begin(), map.end(), etc.
4349
4350               The difference is that map.iterator() returns a safe
4351               'closed' iterator, while map.begin() and map.end() are
4352               'open' iterators.
4353
4354               A 'closed' iterator knows the begin and the end of the
4355               sequence, and it never can seg. fault. An 'open'
4356               iterator, as in C++, can seg. fault at the C++ side.
4357
4358                  # a closed iterator is safe in the following example.
4359                  # the next() method will throw a StopIteration
4360                  # exception as needed
4361         
4362                  i = seq.iterator()
4363                  try:
4364                       while True:
4365                         sum += i.next()
4366                  except: pass
4367                  
4368                  # an open iterator always need to be checked,
4369                  # or it will crash at the C++ side
4370
4371                  current = seq.begin()
4372                  end = seq.end()
4373                  while (current != end):
4374                     sum += current.next()
4375               
4376               
4377             [Python]
4378             - Finally, when we call 
4379
4380                 f = Foo()
4381
4382               the construction is 'one-way'. Before construction  was done
4383               something like
4384
4385                   Foo() (python) -> _new_Foo() (C++) 
4386                   new_Foo() (C++) -> FooPtr() (python) 
4387                   FooPtr() (python) -> Foo() (python)
4388
4389               and returning a pointer was done like
4390
4391                   NewPointerObj() (C++) -> FooPtr() (python)
4392                   FooPtr(python) -> Foo() (python)
4393                                   
4394
4395               ie, we when going back and forward between the C++ and
4396               python side.
4397
4398               Now since there is no FooPtr the construction process is
4399
4400                   Foo() (python) -> _new_Foo() (C++)
4401                   _new_Foo() (C++) -> NewPointerObj() (C++) (no shadow class)
4402
4403               and returning a pointer is done
4404
4405                   NewPointerObj() (C++) (with shadow class) -> NewInstaceObj() (C++)
4406
4407               where NewInstanceObj creates a new instance without
4408               calling __init__ and it doesn't go 'back' to python, is
4409               'pure' C API.
4410
4411              - With this change, and the other ones in the
4412                PySwigObject type, which now carries the thisown and
4413                swig_type_info pointer, the generated code should be as
4414                fast as boost::Python and/or the other python wrappers
4415                based in pure Python/C API calls.
4416
4417                As a reference, the profiletest_runme.py example, which
4418                does a simple call function many times, such as this code:
4419
4420                     import profiletest       
4421                                              
4422                     a = profiletest.A()      
4423                     b = profiletest.B()      
4424                     for i in range(0,1000000)
4425                       a = b.fn(a)            
4426
4427
4428                where fn is defined as 'A* B::fn(A *a) {return a;}',
4429                produces  the following times
4430
4431                                nomodern    modern
4432                  swig-1.3.26    19.70s      5.98s
4433                  swig-CVS        0.99s      0.98s
4434                
4435
4436                Clearly, there is a large improvement for the python
4437                'nomodern' mode. Still, the 'modern' mode is around
4438                6 times faster than before. For the same test, but
4439                using the non-shadow version of the module, we get
4440
4441                                _profiletest (non-shadow)
4442                  swig-1.3.26     0.80s 
4443                  swig-CVS        0.60s 
4444
4445                Hence, now for practical purposes, the proxy overhead
4446                is insignificant.
4447
4448                Note that the performance numbers we are showing is for
4449                a simple module (two types) and a simple function (one
4450                argument). For real situations, for modules with many
4451                more types and/or functions with many more parameters,
4452                you will see even better results.
4453                
4454                               
4455 10/31/2005: mmatus
4456             [Python]
4457
4458             - Finally, no more ClassPtr proxy classes. You will see
4459               only a clean Class proxy class in the .py file.
4460
4461             - No more 'real' thisown attribute either, the PySwigObject now
4462               carries the ownership info.
4463
4464               You can also do something like
4465
4466                   print self.this.own() 
4467                   >>> True
4468                   
4469                   self.this.disown()
4470                   self.this.own(0)
4471                   print self.this.own() 
4472                   >>> False               
4473
4474                   self.this.acquire()
4475                   self.this.own(1)
4476                   print self.this.own() 
4477                   >>> True
4478
4479               Still the old way,
4480               
4481                   print self.thisown
4482                   >>> True
4483
4484                   self.thisown = 0
4485                   print self.thisown
4486                   >>> False               
4487
4488                   self.thisown = 1
4489                   print self.thisown
4490                   >>> True
4491
4492               is supported, and python dispatches the proper method
4493               calls as needed.            
4494                
4495
4496             - Support for iterators in STL/STD containers, for example, if you have
4497
4498                     %template<set_string> std::set<std::string>;
4499                   
4500                you can use the C++ iterators as:  
4501
4502                      s = set_string()
4503                                      
4504                      s.append("c")   
4505                      s.append("a")   
4506                      s.append("b")
4507
4508                      b = s.begin()      
4509                      e = s.end()        
4510                      sum = ""           
4511                      while (b != e):    
4512                          sum += b.next()        
4513                      print sum
4514
4515                      >>> "abc" 
4516
4517                 advance the iterator as in C++
4518
4519                      current = s.begin()      
4520                      current += 1
4521                      print current.value()
4522                      >>> "b"
4523                      
4524                 now using the reverse operators
4525
4526                      b = s.rbegin()      
4527                      e = s.rend()        
4528                      sum = ""           
4529                      while (b != e):    
4530                          sum += b.next()        
4531                      print sum
4532
4533                      >>> "cba" 
4534
4535                 or the 'previous' method
4536
4537                      b = s.begin()      
4538                      e = s.end()        
4539                      sum = ""           
4540                      while (b != e):    
4541                          sum += e.previous()
4542                      print sum
4543
4544                      >>> "cba" 
4545
4546                 or just as in a python fashion
4547
4548                      for i in s:
4549                          sum += i        
4550                            
4551                 Note 1: Iterators in C++ are very powerful, but
4552                 dangerous too. And in python you can shoot yourself in the foot
4553                 just like in C++, so, be careful.
4554                 
4555                 Note 2: the iterators are 'light', ie, they do not
4556                 convert sequence elements until you request to do so, via
4557                 next(), value() or previous(). If you just increment/decrement one
4558                 no conversion is performed, for example:
4559
4560                       
4561                      b = s.begin()      
4562                      b += 1
4563                      b.incr()
4564                      b.incr(2)
4565                      b.decr(2)
4566                      b.decr()
4567                      b -= 1
4568
4569                  only the iterator is modified, and not value wrapper
4570                  is generated. Other typical C++ operations are also 
4571                  available, such as:
4572
4573                      print s.end() - s.begin()
4574                      >>> 3
4575                      f = s.begin() + 1
4576                      print f.value()
4577                      >>> "b"
4578                      l = s.end() - 1
4579                      print l.value()
4580                      >>> "c"
4581                  
4582                  etc.  Of course, the 'find', 'insert', 'erase', and
4583                  so on methods also supports iterators now, ie:
4584
4585                       i = s.begin()
4586                       i += 1
4587                       s.erase(i)
4588                       for i in s:
4589                          sum += i
4590                       print sum
4591                       >>> "ac"
4592                       
4593             *** POTENTIAL INCOMPATIBILITY ***
4594
4595             There is no more 'thisown' attribute. If you use it, python
4596             will translate the following code as follows:
4597
4598                 if (self.thisown):   ==>   if (self.this.own()):
4599                 self.thisown = 1     ==>   self.this.own(1)
4600                 self.thisown = 0     ==>   self.this.own(0)
4601
4602             Still, maybe in some unusual cases the translation will not be
4603             100% correct, so if you have a problem, please report it
4604             and/or use the new 'self.this.own()' accessor.
4605             
4606             
4607             *** POTENTIAL INCOMPATIBILITY ***
4608             
4609             There is no more ClassPtr classes in the python code. Hence,
4610             if in the past you needed to resort to some kind of trickery
4611             with them, or overcome their presence, it is no longer
4612             required, but the extra code you added could now break
4613             things.
4614
4615             If needed, you can use the option -classptr, i.e.,
4616
4617                swig -classptr -python ...
4618
4619             to generate the old ClassPtr classes.
4620
4621
4622 10/30/2005: mkoeppe 
4623             [Guile] Make declared and defined linkage of SWIG_init consistent.  
4624             Reported by Steven G. Johnson (SF patch 1315498).
4625
4626 10/26/2005: mmatus
4627
4628           - Added the attribute.i file to the global library director.
4629             Now it can be used from other languages that do not use
4630             the unified typemap library as well.
4631
4632             So, if you have something like:
4633
4634                %include attribute.i
4635
4636                %attribute(A, int, a, get_a, set_a);
4637                                                   
4638                struct A                           
4639                {                                  
4640                  int get_a() const;               
4641                  void set_a(int aa);              
4642                };                                 
4643
4644                %attribute_ref(B, int, c);
4645                                         
4646                struct B                 
4647                {                        
4648                  int& c();              
4649                }; 
4650
4651             then in the target language the 'A.a' and 'B.c' attributes will
4652             be visible, ie, you can access them as plain variables:
4653
4654                f   = A()
4655                f.a = 3
4656                g   = B()
4657                g.c = 3 
4658            
4659                h   = f.a + g.c
4660
4661             and the proper get/set methods will be dispatched. See
4662             attribute.i for more info.
4663    
4664           - More cleanups around and adding more test-cases. The
4665             DISOWN typemap now is tested and working in all the
4666             languages that use the unified typemap library, ie, tcl,
4667             ruby, perl and python.
4668             
4669
4670 10/25/2005: mmatus
4671
4672             - Perl, complete the DISOWN typemap.
4673             
4674             - added the attribute.i file to the unified typemap
4675               library (before was only usable from python).
4676
4677             - unify the names for the setter and getter methods in
4678               perl,tcl,ruby and python, so, the attribute.i library
4679               can work across them.
4680               
4681             - see the li_attribute.i test-case or the library file
4682
4683                 Lib/typemaps/attribute.swg
4684
4685               for more info about how to use it.
4686
4687  
4688               
4689
4690 10/24/2005: mmatus
4691
4692             - Perl now uses the unified typemap library.
4693
4694             - Changes in ruby to use the $track option in typemaps.
4695
4696             - Changes in the unified typemap library to follow the
4697               convention that all macros that are not used in the
4698               C/C++ side starts with %, such as
4699
4700                    %delete
4701                    %new_array
4702
4703               etc.
4704               
4705             - Documenting fragments, see fragments.swg.
4706
4707             - Cleaner way to use the unified typemap library, include
4708               just <typemaps/swigtypes.swg>.
4709
4710               Check some of the supported languages: perl, tcl, ruby,
4711               python.
4712
4713               Always start with the head file, such as
4714
4715                  python/python.swg
4716                  tcl/tcl8.swg
4717                  ruby/ruby.swg
4718                  perl5/perl5.swg
4719
4720               and the principal file that invokes the unified library, such as
4721
4722                  python/pytypemaps.swg      
4723                  tcl/tcltypemaps.swg        
4724                  ruby/rubytypemaps.swg      
4725                  perl/perltypemaps.swg      
4726             
4727               The file that provide the specialization for each
4728               language are the one that provides the basic types:
4729
4730                  python/pyprimtypes.swg 
4731                  ruby/rubyprimtypes.swg 
4732                  tcl/tclprimtypes.swg   
4733                  perl5/perlprimtypes.swg
4734
4735               and the string manipulation:       
4736             
4737                  python/pystrings.swg   
4738                  ruby/rubystrings.swg   
4739                  tcl/tclstrings.swg     
4740                  perl5/perlstrings.swg
4741
4742                  
4743               The rest of the files, such as carray.i, are mostly one 
4744               line files that include the proper typemap library
4745               version.
4746
4747             *** POTENTIAL INCOMPATIBILITY in Perl ***
4748
4749             Some missing/wrong typemaps could start working properly,
4750             and change the old expected behavior in Perl.
4751
4752 10/23/2005: wuzzeb
4753             Chicken:
4754               + pointers to member functions finally work properly
4755               + add test of member function pointers to cpp_basic.i
4756
4757 10/20/2005: dancy
4758             [allegrocl] Added C++ support. Large update, many changes. See
4759             newly added Allegro Common Lisp section in lisp.html
4760
4761 10/20/2005: mmatus
4762             Ruby, Tcl, Python:
4763
4764             - Uniform way to fail (label fail:), now finally
4765               SWIG_exception works across the three languages and all
4766               the typemaps.
4767
4768             - Add proper cleanup code to ruby
4769
4770             - More valgrind fixes
4771
4772             - Simplify the inline use, it seems a small interface of
4773               20,000 lines (plus many many templates) can break 
4774               gcc -O3 easily.
4775
4776             - Finalize the typemaps library. All the old  *.i files
4777               (carray.i, cpointer.i, exception.i) had been implemented
4778               in the new typemaps library.
4779             
4780
4781 10/19/2005: wuzzeb
4782             Update the Runtime Typemap documentation in Typemaps.html
4783
4784 10/18/2005: wuzzeb
4785             Chicken:
4786               - Correctly handle %ignored classes
4787               - Correctly convert long, long long, unsigned long, etc
4788                 to chicken primitives. (Thanks to Felix Winkelmann)
4789               - Using argout parameters when the return value was a
4790                 wrapped pointer caused a memory corruption.  The chicken
4791                 garbage collector moved a pointer out from under us.
4792                 This is now fixed by running all the proxy creation
4793                 functions as continuations after the wrapper function
4794                 returns.  As part of this, we no longer need the
4795                 chickenfastproxy flag on output typemaps.
4796               - using -proxy and -nocollection together works now
4797                 Before, it was not exporting the destructor in the proxy
4798                 wrapper.
4799
4800 10/18/2005: mmatus
4801             
4802             Added the Unified Typemap Library (UTL). It unifies the typemaps for
4803
4804                 python, ruby, tcl
4805
4806             and in the process, fixes several problems in each of the three
4807             languages to work in a "canonical" way now established in
4808             the typemap library
4809             
4810                SWIG/Lib/typempas
4811
4812             The current status of the unification is that everything
4813             compiles and runs inside the test-suite and examples
4814             directories. And for the first time we have three
4815             languages than pass the primitive_types.i case.
4816
4817             Also, we have a uniform way to treat the errors, for example
4818             if you do something like
4819
4820               >>> from primitive_types import *
4821               >>> print val_uchar(10)
4822               10
4823               >>> print val_uchar(1000)
4824               Traceback (most recent call last):                      
4825                 File "<stdin>", line 1, in ?                        
4826               OverflowError: in argument 1 of type 'unsigned char'
4827
4828             you get the same exception in all the three languages.
4829             
4830             And well, many more good things will come from this
4831             unification, for example, proper support of the STL/STD classes
4832             for all the languages, and hopefully, we can keep
4833             adding other languages.
4834
4835             The hardest part, writing a common typemap library
4836             that suites the three different languages, is done,
4837             and adding another language should now be easy. 
4838
4839             Still the global unification is not complete, the STL/STD 
4840             part is next, and probably as well as adding one or two more
4841             languages.
4842
4843             If you are curious, look at the python, ruby and/or tcl
4844             directories to see what is needed to support the new
4845             common typemaps library.  Still, the final way to
4846             integrate a new language could change as we move to
4847             integrate the STD/STL.
4848
4849             *** POTENTIAL INCOMPATIBILITY in Ruby/Tcl ***
4850
4851             Some missing/wrong typemaps could start working properly,
4852             and change the old behavior, specially in ruby and tcl.
4853
4854 Version 1.3.27 (October 15, 2005)
4855 =================================
4856
4857 10/15/2005: wsfulton
4858             [Java] Fix for typesafe enum wrapping so that it is possible to
4859             overload a method with 2 different enum types.
4860
4861 10/15/2005: wsfulton
4862             Fix for %feature("immutable","0") attempting to generate setters
4863             for constants.
4864
4865             Restored %immutable and %makedefault to clear the feature as it
4866             behaved in SWIG-1.3.25 and earlier.
4867
4868 10/14/2005: mmatus
4869             Fix bug in anonymous typedef structures which was leading to
4870             strange behaviour.
4871
4872 10/13/2005: mmatus
4873             Several minor changes:
4874             
4875             - Improve the wchar_t type support
4876             - Add a warning for when you define the 'in' typemap but
4877               you don't define the 'typecheck' one. Very common mistake.
4878             - Add proper default rule for function pointers, now you
4879               can define a typemap such as:
4880
4881               %typemap(in) SWIGTYPE ((*)(ANY)) {...}
4882
4883               That will apply to all the pointer to functions. The
4884               rule in C++ also apply to the function 'reference', ie,
4885               in both cases
4886
4887                 typedef  int (*fptr)(int a);
4888                 typedef  int (func)(int a);
4889
4890               This was needed since it seems to be 'illegal' in C++ to
4891               do something like:
4892
4893                  void *ptr = static_cast<void *>(fptr);
4894
4895               and probably, as for member functions, it is not
4896               warrantied that the pointer sizes will match.
4897
4898             - Add the #error/#warning directives to swig's cpp.
4899
4900             - Add the noblock option for typemaps, which is used as
4901               follows: supposed you a typemap, like this
4902
4903               
4904               %typemap(in,noblock=1) Hello {                       
4905                  ....
4906               }
4907
4908               then the typemap will be inserted without the block
4909               imposed by the brackets, similar to
4910
4911                %typemap(in) Hello "...";
4912
4913               So, why you don't just use the quote style?, because:
4914               
4915                  1.- The quote style doesn't get preprocessed, for example
4916               
4917                       %typemap(in) Hello "$1= SWIG_macro($1);";
4918               
4919                      here, SWIG_macro doesn't get expanded
4920
4921                  2.- Inside a quote typemap, you have to use 
4922                      quotes carefully
4923
4924                       %typemap(in) Hello "$1 = \"hello\" ";
4925
4926                  3.- You can't make emacs and/or other editors
4927                      to indent inside a string!. 
4928
4929
4930               So, why do you want to remove the block?, because an extra
4931               block when not needed (no local variables in it):
4932
4933                   1.- makes the code harder to read
4934                   2.- makes the code larger
4935                   3.- or in short, for the same reason we have the quote style.
4936
4937 Version 1.3.26 (October 9, 2005)
4938 ================================
4939
4940 10/08/2005: wsfulton
4941             [Php] Added 'throws' typemaps.
4942
4943 10/08/2005: wsfulton
4944             Fixes for languages that don't support multiple inheritance. The
4945             first non-ignored class in the public base class list is used for inheritance.
4946             by the proxy class. Previously, if the first class in the list was ignored, then
4947             the proxy class wouldn't have any base classes.
4948
4949 10/07/2005: mmatus
4950              Update more features to follow new convention, including:
4951
4952                callback
4953                ref/unref
4954                except
4955             
4956              All of them use not only the feature as a flag, but also
4957              as code value. To deal with those features, we use now
4958              GetFlagAttr, which is similar to GetFlag, but instead or
4959              returning 1 or 0, it returns the attr value, if happens
4960              to be different of "0" of course.
4961
4962              Now there are also more uniform directive names for the 
4963              ones based in features, for example, for the old
4964              %newobject directive now we have tree directives defined:
4965              
4966
4967              #define %newobject        %feature("new")
4968              #define %nonewobject      %feature("new","0")
4969              #define %clearnewobject   %feature("new","")
4970
4971              and so on for all the other feature directives.
4972
4973             *** POTENTIAL INCOMPATIBILITY ***
4974
4975 09/30/2005: wsfulton
4976             Subtle change to some features. Previously it was not possible to disable many
4977             features once they had been enabled. This was for most features that behave as
4978             flags. These features now work as follows:
4979
4980               %feature("name")              // enables the feature
4981               %feature("name", "1")         // enables the feature
4982               %feature("name", "0")         // disables the feature
4983               %feature("name", "")          // clears the feature
4984
4985             In fact any non-empty value other than "0" will enable the feature (like C boolean logic).
4986             Previously "1", "0" or any other non-empty value would enable the feature and it would
4987             only be possible to disable the feature by clearing it (assuming there was no global enable).
4988
4989             The following features are affected:
4990
4991               allowexcept
4992               compactdefaultargs
4993               classic                (Python)
4994               cs:const               (C#)
4995               director
4996               exceptionclass         (Python)
4997               ignore
4998               immutable
4999               java:const             (Java)
5000               java:downcast          (Java)
5001               kwargs
5002               modern                 (Python)
5003               new
5004               noautodoc              (Python)
5005               nodefault
5006               nodirector
5007               noref
5008               notabstract
5009               nounref
5010               novaluewrapper
5011               python:maybecall       (Python)
5012               python:nondynamic      (Python)
5013               modula3:multiretval    (Modula3)
5014               predicate              (Ruby)
5015               trackobjects           (Ruby)
5016               valuewrapper
5017
5018             It is now possible, for example to ignore all methods/classes in a header file, except for a
5019             few targetted methods, for example:
5020
5021               %feature("ignore");                                // ignore all methods/classes
5022               %feature("ignore","0") some_function(int, double); // do not ignore this function
5023               %feature("ignore","0") SomeClass;                  // do not ignore this Class
5024               %feature("ignore","0") SomeClass::method;          // do not ignore this method
5025               %include "bigheader.h"
5026
5027             Removed %pythondynamic - it never worked properly. Use %pythonnondynamic instead.
5028             Removed %feature("nokwargs") - it wasn't fully implemented  - use %feature("kwargs","0") instead.
5029
5030             *** POTENTIAL INCOMPATIBILITY ***
5031
5032 09/25/2005: mkoeppe
5033             [Guile] Add "throws" typemaps.
5034
5035 09/24/2005: cfisavage
5036             [Ruby] Adds new %trackobjects functionality that maps C++ objects to
5037             Ruby objects.  This functionality makes it much easier to implement
5038             mark functions for the garbage collector.  For more information
5039             refer to the update documentation and examples.
5040             
5041 09/20/2005: wsfulton
5042             [Perl] Patch 1116431 from Josh Cherry. Fixes non member functions inadvertently
5043             being called instead of member functions.
5044
5045 09/20/2005: wsfulton
5046             [Lua] Patch from Mark Gossage to add support for Lua-5.1, std::string,
5047             std::vector, std::exception and documentation.
5048
5049 09/14/2005: mmatus
5050             [Python] Add -nocppcast. Now the default behavior is to
5051             always use the cppcast operators. Before that was the case
5052             only when you used the -cppcast option.
5053
5054             If this seems to break your code... your welcome!, it
5055             means it was broken before, and you never notice. 
5056
5057             If you thing the error is due to one of the SWIG typemaps,
5058             send us an example.
5059
5060             Use -nocppcast only with very old C++ compilers that
5061             do not support the cppcast operations. 
5062
5063             So, here applies:
5064
5065                 This change doesn't break compatibility, it was broken before.
5066
5067 09/13/2005: wsfulton
5068             [Java] Fix for director methods when a class is passed by value as a
5069             parameter.
5070
5071 09/11/2005: mmatus
5072             Adding the module option to the %import directive. Now you
5073             can use it as
5074
5075                 %import(module="BigModule") foo.i
5076
5077             where subfile could (or not) define the module name via
5078             the %module directive. The module option take precedence
5079             and it has the same effects than having the directive 
5080
5081                 %module BigModule  
5082
5083             inside the imported file foo.i.
5084
5085             You can use the option in mainly two cases:
5086
5087             1.- You used the -module option when you generated the
5088                 module to be imported, and hence the module name in
5089                 the imported %module directive is not really useful.
5090
5091             2.- The module you want to import is very large, and it
5092                 has several .i/.h files. Then, if you just one to
5093                 import a class or so from the module, says 'foo', and
5094                 not the entire module via importing the main
5095                 BigModule.i file, then you just do:
5096
5097                     %import(module="BigModule") foo.h
5098
5099                 or
5100                 
5101                     %import(module="BigModule") foo.i
5102
5103                 where foo.i contains the 'foo' declaration and maybe a
5104                 couple of extra %include directives, as needed.
5105
5106             
5107 09/11/2005: mmatus
5108             Fix bug #1282637, about the -module option not having effect
5109             in places where it was needed.
5110
5111 09/11/2005: wsfulton
5112             When wrapping variables, ensure that none of the typemaps used for the
5113             set wrappers are used when generating the get wrappers. I doubt this was a
5114             problem for any languages except for the recently introduced null attribute
5115             in the out typemap (C# only).
5116
5117 09/08/2005: wsfulton
5118             More descriptive error messages when files fail to open.
5119
5120 09/06/2005: mmatus 
5121
5122             Allow a %define a macro inside another %define macro, for example
5123
5124               %define hello(name, Type)
5125               %define name ## a(Type)
5126               %typemap(in) Type "hello;";
5127               %enddef
5128               %enddef
5129               
5130             To learn how to use this new features in your own typemaps library, see
5131             python/cstring.i, python/cwstring.i and python/cwstrbase.i.     
5132
5133             [Python] Normalize the cstring.i implementation to use fragments, and add
5134             cwstring.i, which implements the same typemaps but for wchar_t strings.
5135
5136             [Python] Bug fixed: 1247477, 1245591, 1249878 and others.
5137
5138 08/18/2005: wsfulton
5139             [Ruby] Implement support for SWIGTYPE* DISOWN typemap (like in Python) for
5140             better control of memory management, eg when adding an object created in Ruby
5141             to a C++ container. Patch #1261692 from Charlie Savage.
5142
5143 08/18/2005: wsfulton
5144             [Tcl] 64 bit platform fixes for the varargs handling in SWIG_GetArgs. This is an
5145             improved fix for bug #1011604 as suggested by Jeremy Lin.
5146
5147 08/18/2005: wsfulton
5148             [Tcl] Bug #1240469 - %newobject support for Tcl. Patch from Bob Marinier.
5149
5150 08/16/2005: wsfulton
5151             [Perl] Bug #1254494 - Fix for global namespace pollution by perl header files
5152             (bool define) prevented STL headers from being used on some systems, eg
5153             Windows with Visual Studio.
5154
5155 08/16/2005: wsfulton
5156             [Java] Bug #1240937 - Redefinition of __int64 typedef for Intel compilers.
5157
5158 08/15/2005: wsfulton
5159             [Xml] Bug #1251832 -  C++ template may generate invalid XML file
5160
5161 08/15/2005: wsfulton
5162             [Lua] Support added for Lua. Patch #1242772 from Mark Gossage.
5163             It supports most C/C++ features (functions, struct, classes, arrays, pointers,
5164             exceptions), as well as lots of documentation and a few test cases & examples.
5165
5166 08/14/2005: wsfulton
5167             [Xml] Fix incorrect xml escaping in base class name when base class is a template.
5168
5169 08/13/2005: efuzzyone
5170             [CLISP] Added support for handling enums. Does not adds the return type declaration
5171             to the function definition, if a function returns void.
5172
5173 08/09/2005: mkoeppe
5174             New language module, Common Lisp with UFFI, from Utz-Uwe Haus.
5175
5176 08/09/2005: mkoeppe
5177             Fix the Lisp s-expression output module; it no longer complains about "unknown targets".
5178
5179 07/27/2005: wsfulton
5180             Modifications to STL wrappers so that it is possible for a user's %exception directive
5181             to be applied to the STL wrapper methods. Previously the following global %exception
5182             directive would not be used on the wrapper methods:
5183
5184                 %exception { 
5185                   try {
5186                     $action
5187                   } catch (...) {
5188                     // handle uncaught exceptions
5189                   }
5190                 }
5191
5192             This has been implemented by replacing %exception directives for specific STL wrapper
5193             methods with an exception specification declared on the wrapper methods. throws typemaps
5194             are now supplied for handling the STL exception specification. These can also be easily
5195             overridden, for example the std::out_of_range exception, which is used a lot in the STL
5196             wrappers, can be customised easily:
5197
5198               %include "std_vector.i"
5199               %typemap(throws) std::out_of_range {
5200                 // custom exception handler
5201               }
5202               %template(VectInt) std::vector<int>;
5203
5204 07/22/2005: efuzzyone
5205             [CLISP] The clisp module for SWIG:
5206               - It can only handle C, clisp currently does not supports ffi bindings to C++.
5207               - It has two options, (a) -extern-all this will generate wrappers for all functions
5208                 and variablestions, (b) -generate-typedef this will generate wrappers "def-c-type"
5209                 wrappers for typedefs
5210               - Can handle pointers to functions, complex types such as n-dimensional arrays of 
5211                 pointers of depth d
5212               - Generates wrappers for constants as well as variables
5213               - Correctly distinguishes between the declaration of variables in structures and functions
5214               - Creates a defpackage "declaration" with the module name as the package name, the created 
5215                 package exports both functions and variables
5216               - tries to guess when should a pointer variable be declared as c-ptr or c-pointer
5217
5218 07/22/2005: wsfulton
5219             [C#] Changes to support C# structs returned by value. The changes required are:
5220               - Using an optional 'null' attribute in the out typemap. If this attribute is specified,
5221                 then it is used for the $null special variable substitution.
5222               - The ctype used in the C/C++ wrappers is no longer initialised to 0 on declaration.
5223             Both of these changes fix the situations where an attempt was made to assign 0 to the
5224             returned struct. Marshalling structs as value types still requires user defined typemaps.
5225             See documentation for an example.
5226
5227 07/22/2005: wsfulton
5228             [C#, Java] Fix SWIG_exception usage to work with compilers that don't support empty macro
5229             arguments. Unfortunately this fix will stop usage of SWIG_exception being used within typemaps
5230             that use "" or %{ %} delimiters, but continues to work with typemaps using {} delimiters.
5231             Please use the SWIG_CSharpSetPendingExceptionArgument or SWIG_JavaThrowException methods instead
5232             as SWIG_exception is really intended as a platform independent macro for the SWIG library writers.
5233
5234 07/16/2005: mkoeppe
5235             [Allegro CL] Use specific foreign types rather than (* :void). 
5236             Use *swig-identifier-converter*.
5237
5238 06/27/2005: wsfulton
5239             Functions declared as 'extern' no longer have an additional function declaration added to the 
5240             wrapper files. There are some cases where SWIG does not get this right, eg bug #1205859 (extern
5241             functions with default arguments declared in a namespace). Also SWIG cannot get non-standard
5242             calling conventions correct, eg Windows calling conventions are usually handled like this:
5243
5244               %{
5245               #define DLLIMPORT __declspec(dllimport)
5246               #define STDCALL __stdcall
5247               %}
5248               #define DLLIMPORT
5249               #define STDCALL
5250               %inline %{
5251               DLLIMPORT extern STDCALL void function(int);
5252               %}
5253
5254             SWIG incorrectly generates:
5255
5256             extern void function(int);
5257
5258             To which there is no solution as SWIG doesn't handle non-standard calling conventions. The extra
5259             'extern' function that SWIG generates is superfluous unless a user has forgotten to add the function
5260             declaration into the wrappers.
5261
5262             The -noextern commandline argument is now redundant and a new commandline argument -addextern can
5263             be used to obtain the original behaviour. This shouldn't be necessary unless the header file
5264             containing the function declaration was inadvertently not added to the wrappers. To fix this
5265             add the function declaration into your wrappers, For example, replace:
5266
5267               extern void foo(int);
5268
5269             with:
5270
5271               %inline %{
5272               extern void foo(int);
5273               %}
5274
5275             *** POTENTIAL INCOMPATIBILITY ***
5276
5277 06/22/2005: wsfulton
5278             [C#, Java, Modula3, Ocaml]
5279             The intermediary function names have been changed when wrapping variables to
5280             match the other language modules so that %extend for a member variable works
5281             uniformly across all language modules, eg:
5282
5283               %extend ExtendMe {
5284                 Var;
5285               };
5286
5287               %{
5288                 void ExtendMe_Var_set(ExtendMe *, double) {...}
5289                 double ExtendMe_Var_get(ExtendMe *) {...}
5290               %}
5291
5292             The methods implementing the get/set used to be:
5293
5294               %{
5295                 void set_ExtendMe_Var(ExtendMe *, double) {...}
5296                 double get_ExtendMe_Var(ExtendMe *) {...}
5297               %}
5298
5299             This also changes the name of variable wrapper functions when using -noproxy.
5300             The original names can be generated with the -oldvarnames commandline option.
5301
5302             *** POTENTIAL INCOMPATIBILITY ***
5303
5304 Version 1.3.25 (June 11, 2005)
5305 ==============================
5306
5307 06/11/2006: mkoeppe
5308             [Guile] Fix handling of anonymous-enum variables.
5309
5310 06/10/2005: mkoeppe
5311             [Guile] Fix for function arguments that are passed by
5312             copy-of-value.  Fix for global "const char *" variables.
5313             Fix testcases arrays_dimensionless, arrays_global.
5314
5315 06/08/2005: wsfulton
5316             Fix for when a base class defines a symbol as a member variable and a derived class defines
5317             the same symbol as a member method.
5318
5319 06/08/2005: wsfulton
5320             [C#] More fixes for virtual/new/override modifiers - when a method has protected access 
5321             in base and public access in derived class.
5322
5323 06/02/2005: wsfulton
5324             Fix #1066363 - Follow convention of release tarball name matching directory name.
5325
5326 06/02/2005: wsfulton
5327             [C#, Java] Fix #1211353 - typesafe enums (and Java proper enums) wrappers when enum value
5328             is negative.
5329
5330 05/27/2005: wsfulton
5331             Modernised and tidied up Windows macros --> SWIGEXPORT, SWIGSTDCALL. They can be overridden
5332             by users via -D compiler directives if need be.
5333
5334 05/26/2005: wsfulton
5335             %csmethodmodifiers can be applied to variables as well as methods now.
5336
5337             In addition to the default 'public' modifier that SWIG generates, %csmethodmodifiers will also
5338             replace the virtual/new/override modifiers that SWIG thinks is appropriate. This feature is
5339             useful for some obscure cases where SWIG might get the modifiers incorrect, for example
5340             with multiple inheritance and overriding a method in the base class.
5341
5342             *** POTENTIAL INCOMPATIBILITY FOR C# MODULE ***
5343
5344 05/25/2005: wsfulton
5345             Added missing constructors to std::pair wrappers (std_pair.i) for all languages.
5346
5347 05/25/2005: wsfulton
5348             [C#] Added std::pair wrappers in std_pair.i
5349
5350 05/25/2005: wsfulton
5351             [C#] The C# 'new' and 'override' modifiers will be generated when a C++ class inherits methods
5352             via a C++ 'using' declaration.
5353
5354 05/25/2005: wsfulton
5355             Fix for exception specifications previously being ignored in classes that inherited methods
5356             from 'using' declarations, eg calls to Derived::bar below will convert C++ exceptions into
5357             a target language exception/error, like it always has done for Base::Bar.
5358
5359             class Base {
5360               virtual bar() throw (std::string);
5361             };
5362             class Derived : public Base {
5363               using Base::bar;
5364             };
5365
5366 05/23/2005: wsfulton
5367             Fixes for detecting virtual methods in %extend for the -fvirtual option and C# override and new
5368             method modifiers.
5369
5370 05/23/2005: wsfulton
5371             [C#] The 'new' modifier is now generated on the proxy method when a method in a derived
5372             class is not polymorphic and the same method exists in the derived class (ie it hides
5373             the base class' non-virtual method).
5374
5375 05/23/2005: wsfulton
5376             [Java, C#] Fixes to detection of covariant return types - when the class hierarchy is more
5377             than 2 classes deep.
5378
5379 05/21/2005: wsfulton
5380             [Java] std::wstring typemaps moved from std_string.i to std_wstring.i
5381
5382 05/21/2005: wsfulton
5383             Fix for crash in DohStrstr, bug #1190921
5384
5385 05/21/2005: wsfulton
5386             [TCL] Fix for methods with similar names when showing list of names on error - bug #1191828.
5387             Patch from Jeroen Dobbelaere.
5388
5389 05/21/2005: wsfulton
5390             [TCL] long long overloading fix - bug #1191835, patch from Jeroen Dobbelaere.
5391
5392 05/21/2005: wsfulton
5393             Fix bug #1196755 to remove debug from swigtcl8.swg.
5394
5395 05/19/2005: wsfulton
5396             [C# and -fvirtual option] Fix for the override key not being generated in the derived class when a
5397             virtual method's return type was a typedef in either the base or derived class. Also ensures the
5398             method is eliminated when using the -fvirtual option. For example, Derived.method now has the C#
5399             override keyword generated:
5400
5401               typedef int* IntegerPtr;
5402
5403               struct Base {
5404                 virtual IntegerPtr method();
5405               };
5406
5407               struct Derived : Base {
5408                 int * method() const;
5409               };
5410
5411             [C#] Fix for the override key being incorrectly generated for virtual methods when a base class
5412             is ignored with %ignore.
5413
5414 05/13/2005: wsfulton
5415             [Java] Fixes to remove "dereferencing type-punned pointer will break strict-aliasing rules"
5416             warnings in C wrappers when compiling C code with 'gcc -Wall -fstrict-aliasing'. Patch from
5417             Michael Cahill. This modifies many of the casts slightly, for example
5418               arg1 = *(DB_ENV **)&jarg1;
5419             to
5420               arg1 = *(DB_ENV **)(void *)&jarg1;
5421
5422 05/12/2005: wsfulton
5423             [C#] Support for C# attributes. C# attributes can be generated:
5424             1) On a C/C++ type basis by specifying an inattributes and/or outattributes typemap attribute
5425                in the imtype or cstype typemaps (for C# return type or C# parameter type attributes).
5426             2) On a wrapped method or variable by specifying a csattributes feature (%feature).
5427             3) On a wrapped proxy class or enum by specifying a csattributes typemap.
5428
5429             Examples are in the C# documentation (CSharp.html).
5430
5431 04/29/2005: wsfulton
5432             New configure option to turn off the default maximum compiler warning as
5433             they couldn't be removed even when overriding CFLAGS and CXXFLAGS with configure
5434             (./configure CFLAGS= CXXFLAGS=). To turn the maximum warnings off, run:  
5435
5436               ./configure --without-maximum-compile-warnings
5437
5438 04/28/2005: wsfulton
5439             Patch from Scott Michel which reworks the Java constructor and finalize/destructor typemaps,
5440             for directors to reduce the number of overall Java typemaps. Added the director_take and 
5441             director_release typemaps to emulate other modules' __disown__ functionality.
5442
5443             *** POTENTIAL INCOMPATIBILITY FOR JAVA DIRECTORS ***
5444
5445 04/28/2005: wsfulton
5446             [C#] Fixed problems due to the over eager garbage collector. Occasionally the
5447             garbage collector would collect a C# proxy class instance while it was being used
5448             in unmanaged code if the object was passed as a parameter to a wrapped function.
5449             Needless to say this caused havoc as the C# proxy class calls the C++ destructor
5450             when it is collected. Proxy classes and type wrapper classes now use a HandleRef,
5451             which holds an IntPtr, instead of a plain IntPtr to marshal the C++ pointer to unmanaged
5452             code. There doesn't appear to be any performance degradation as a result of this
5453             modification.
5454
5455             The changes are in the proxy and type wrapper classes. The swigCPtr is now of type HandleRef
5456             instead of IntPtr and consequently the getCPtr method return type has also changed. The net
5457             effect is that any custom written typemaps might have to be modified to suite. Affected users
5458             should note that the implementation uses the new 'out' attribute in the imtype typemap as the
5459             input type is now a HandleRef and the output type is still an IntPtr.
5460
5461             *** POTENTIAL INCOMPATIBILITY FOR C# MODULE ***
5462
5463 04/28/2005: wsfulton
5464             [C#] Support for asymmetric type marshalling added. Sometimes the output type needs to be
5465             different to the input type. Support for this comes in the form of a new optional 'out'
5466             attribute for the ctype, imtype and cstype typemaps. If this typemap attribute is not
5467             specified, then the type used for both input and output is the type specified in the
5468             typemap, as has always previously been the case. If this typemap attribute is specified,
5469             then the type specified in the attribute is used for output types and the type specified
5470             in the typemap itself is used for the input type. An output type is a return value from
5471             a wrapped method or wrapped constant and an input type is a parameter in a wrapped method.
5472
5473             An example shows that char * could be marshalled in different ways, 
5474
5475               %typemap(imtype, out="IntPtr") char * "string"
5476               char * function(char *);
5477
5478             The output type is thus IntPtr and the input type is string. The resulting intermediary C# code is:
5479
5480               public static extern IntPtr function(string jarg1);
5481
5482 04/22/2005: mkoeppe (Matthias Koeppe)
5483             [Guile] Fix generation of "define-method" for methods of
5484             classes with a constructor.  Reported by Luigi Ballabio.
5485
5486 04/15/2005: wuzzeb (John Lenz)
5487             [Chicken]
5488             For wrapped functions that return multiple values (using argout),
5489             SWIG CHICKEN now returns them as multiple values instead of as
5490             a list.  They can then be accessed using (call-with-values).
5491
5492 04/14/2005: wuzzeb (John Lenz)
5493             [Chicken]
5494             + Added a whole bunch of new _runme scripts into the chicken test
5495             suite.  Also fix some bugs these new scripts turned up.
5496
5497             + Added optimization when returning a wrapped proxy class.  Before,
5498             a minor garbage collection was invoked every time a function returned.
5499
5500             + All the chicken Examples should now run correctly
5501
5502 04/14/2005: wsfulton
5503             [C#] More fixes for typemap matching when wrapping variables, in particular
5504             std::string, so that std::string variables can be easily marshalled with
5505             a C# string property using:
5506
5507               %include "std_string.i"
5508               %apply const std::string & { std::string *variable_name };
5509               std::string variable_name;
5510
5511             (Recall that all class variables are wrapped using pointers)
5512
5513 04/05/2005: wuzzeb (John Lenz)
5514             [Chicken]
5515             + Added Examples/chicken/egg, an example on how to build a chicken
5516               extension library in the form of an egg.  Also updated the
5517               documentation on the different linking options.
5518
5519             + chicken test-suite now has support to check SWIG with the -proxy
5520               argument if there exists a _proxy_runme.ss file.
5521
5522             + More fixes for overloaded functions and -proxy
5523
5524 03/31/2005: wsfulton
5525             Turned on extra template features for all languages which were
5526             previously only available to Python.
5527
5528             This enables typemaps defined within a templated class to be used as
5529             expected. Requires %template on the templated class, %template() will
5530             also pick up the typemaps. Example:
5531
5532               template <typename T> struct Foo {
5533                 ...
5534                 %typemap(in) Foo "in typemap for Foo<T> "
5535                 or
5536                 %typemap(in) Foo<T> "in typemap for Foo<T> "
5537               };
5538               
5539               %template(Foo_i) Foo<int>;
5540               %template() Foo<double>;
5541               
5542             will generate the proper 'in' typemaps wherever Foo<int> and Foo<double>
5543             are used.
5544
5545 03/30/2005: mkoeppe (Matthias Koeppe)
5546             [MzScheme] Patch from Hans Oesterholt for supporting MzScheme 30x.
5547
5548 03/29/2005: wuzzeb (John Lenz)
5549             [Chicken]
5550             + Reallow older versions of chicken (1.40 to 1.89) by passing -nocollection
5551               argument to SWIG
5552             + %import now works correctly with tinyclos.  (declare (uses ...)) will be
5553               exported correctly.
5554             + TinyCLOS proxy classes now work correctly with overloaded functions
5555               and constructors.
5556
5557 03/29/2005: wsfulton
5558             [Java] Patch from Scott Michel for directorout typemaps. Java directors
5559             require the directorout typemaps like the other languages now. The new
5560             typemaps provide fixes for methods where the return type is returned
5561             by reference (this cannot automatically be made thread safe though).
5562
5563 03/22/2005: wsfulton
5564             Enum casting fixes. Visual C++ didn't like the C type casting SWIG produced
5565             when wrapping C++ enum references, as reported by Admire Kandawasvika.
5566
5567 03/21/2005: wsfulton
5568             [Perl] SF #1124490. Fix Perl macro clashes when using Visual Studio's STL string,
5569             so now projects can #include <string>.
5570
5571 03/21/2005: wsfulton
5572             Fixed %varargs which got broken with the recent default argument changes.
5573             Also works for Java and C# for the first time now.
5574
5575 03/17/2005: wuzzeb (John Lenz)
5576             [Chicken] 
5577             + Fix a whole bunch of bugs in the chicken module.  The entire
5578               test suite now compiles, with the exception of the tests that require
5579               std_vector.i, std_deque.i, and so on, which chicken does not have yet.
5580
5581             + Add support for %exception and %typemap(exceptions).  Exceptions are
5582               thrown with a call to (abort) and can be handled by (handle-exceptions)
5583
5584 03/15/2005: wsfulton
5585             [Java] Patch from Scott Michel for directors. Modifications to the typemaps
5586             giving users fine control over memory ownership and lifetime of director classes.
5587             Director classes no longer live forever by default as they are now collectable
5588             by the GC.
5589
5590 03/15/2005: wuzzeb (John Lenz)
5591             [Chicken] Add support for adding finalizers garbage collected objects.
5592             Functions that return new objects should be marked with %newobject and
5593             input arguments which consume (or take ownership) of a pointer should
5594             be marked with the DISOWN typemap.
5595
5596             Also add support for correctly checking the number of arguments passed
5597             to a function, and raising an error if the wrong number are passed.
5598
5599 03/14/2005: wuzzeb (John Lenz)
5600             Add --without-alllang option to configure.in, which is the same as
5601             passing all the --without-python --without-perl5 etc... that Matthias added.
5602
5603 03/09/2005: wsfulton
5604             [Php] Memory leak fix for functions returning classes/structs by value.
5605
5606 03/08/2005: wsfulton
5607             [Perl] Fix for Perl incorrectly taking memory ownership for return types that
5608             are typedefs to a struct/class pointer. Reported by Josh Cherry.
5609
5610 03/07/2005: wsfulton
5611             [C#] Various exception changes for the std::vector wrappers. These now more
5612             accurately mirror the same exceptions that System.Collections.ArrayList throw.
5613
5614 03/07/2005: wsfulton
5615             [C#] Fix undefined behaviour after any of the std::vector methods
5616             throw an exception.
5617
5618 03/07/2005: wsfulton
5619             [C#] When null is passed for a C++ reference or value parameter, the 
5620             exception thrown has been corrected to an ArgumentNullException instead
5621             of NullReferenceException as recommended in the .NET Framework documentation.
5622
5623             The default throws typemaps turn a C++ exception into an ApplicationException,
5624             not a SystemException now.
5625
5626 03/07/2005: wsfulton
5627             [C#] Numerous changes in C# exception handling have been made over the past
5628             few weeks. A summary follows:
5629
5630             The way in which C++ exceptions are mapped to C# exceptions is quite different.
5631             The change is to fix C# exceptions so that the C++ exception stack is correctly
5632             unwound as previously C++ exceptions were being thrown across the C PInvoke layer
5633             into the managed world.
5634
5635             New typemap attributes (canthrow and excode) have been introduced to control the
5636             mapping of C++ to C# exceptions. Essentially a callback into the unmanaged world
5637             is made to set a pending exception. The exception to throw is stored in thread local
5638             storage (so the approach is thread-safe). The typemaps are expected to return
5639             from unmanaged code as soon as the pending exception is set. Any pending exceptions
5640             are checked for and thrown once managed code starts executing. There should
5641             be minimal impact on execution speed during normal behaviour. Full details will be
5642             documented in CSharp.html.
5643
5644             The SWIG_CSharpThrowException() function has been removed and replaced with the
5645             SWIG_CSharpSetPendingExceptionArgument() and SWIG_CSharpSetPendingException()
5646             functions. The original name has been deliberately changed to break old code as
5647             the old approach was somewhat flawed. Any user defined exceptions that follow the
5648             same pattern as the old approach should also be fixed.
5649
5650             Numerous new .NET framework exceptions are now available for easy throwing from 
5651             unmanaged code. The complete list is: 
5652
5653               ApplicationException, ArithmeticException, DivideByZeroException, 
5654               IndexOutOfRangeException, InvalidOperationException, IOException, 
5655               NullReferenceException, OutOfMemoryException, OverflowException, 
5656               SystemException, ArgumentException, ArgumentNullException and
5657               ArgumentOutOfRangeException.
5658
5659             *** POTENTIAL INCOMPATIBILITY FOR C# MODULE ***
5660
5661 05/05/2005: mmatus
5662             
5663             Fix several memory leaks around. Even when we survive  knowning
5664             swig is a memory leak factory, it was a little out of
5665             control. To run std_containers.i in the python test-suite,
5666             swig was using ~260MB, now it uses 'only' ~40MB, which is
5667             the same ammount that g++ uses, so, is not that bad.
5668             In the process, I found a couple of extra Deletes, which
5669             in some cases could trigger seg. faults and/or
5670             DOH/asserts.
5671             
5672             [python] Better support for directors + exception. More
5673             verbose errors and added an unexpected exception handler.
5674
5675             [python] Fix memory leak for the
5676
5677                     std::vector<std::vector<int> > 
5678
5679             case,reported by Bo Peng.
5680
5681             [python] Fix SwigPyObject compare problem reporte by
5682             Cameron Patrick. 
5683
5684             [python] Fix several warnings in the generated code 
5685             for gnu-gcc, Intel and VC7.1  compilers.
5686
5687
5688 02/25/2005: wuzzeb (John Lenz)
5689             Update documentation to use CSS and <div> instead of <blockquote>
5690             I used a script to convert the docs, and it set all the box classes
5691             to be "code".  There are actually 4 different classes,
5692             "shell", "code", "targetlang", and "diagram".  We need to go through
5693             and convert the divs depending on what they contain.
5694
5695 02/23/2005: mmatus
5696
5697             [Python] Added option -nortti to disable the use of native
5698             C++ RTTI with directors (dynamic_cast<> is not used).
5699
5700             Add more code for directors to detect and report errors in
5701             the python side.
5702
5703             Extend the use of SWIGINTERN whenever is possible.
5704
5705             Remove template warnings reported by VC7.1.
5706
5707             Remove warnings reported by gcc/g++. Finally you can
5708             compile using
5709
5710                g++ -W -Wall -c mymodule_wrap.cxx
5711
5712             and no spurious errors will be generated in the wrapper
5713             code.
5714
5715 02/23/2005: wuzzeb (John Lenz)
5716             Added -external-runtime argument.  This argument is used to dump
5717             out all the code needed for external access to the runtime system,
5718             and it replaces including the files directly.  This change adds
5719             two new virtual functions to the Language class, which are used
5720             to find the language specific runtime code.  I also updated
5721             all languages that use the runtime to implement these two functions.
5722
5723 02/22/2005: mmatus 
5724             Fix %template + private error SF#1099976.
5725
5726 02/21/2005: mmatus 
5727
5728             Fix swigrun.swg warnings reported when using "gcc -W -Wall"
5729             (static/inline not used in front of a function
5730             declaration), and add SWIGUNUSED attribute to avoid
5731             unused warnings elsewhere.
5732
5733             Fix unused variable warnings.
5734
5735             [Python] Use new SWIGUNUSED attribute to avoid warnings in
5736             SWIGINTERN methods.
5737
5738             [Python] Fix PyOS_snprintf for python versions < 2.2 (SF #1104919).
5739
5740             [Python] Fix map/multimap to allow empty maps (reported by
5741             Philippe Hetroy).
5742
5743             [Docs] Add some documentation to Python.html and
5744             SWIGPlus.html, including for example the fact that
5745             'friends' are now supported.
5746
5747 02/21/2005: wsfulton
5748             [PHP] Patch from Olly Betts, so that wrappers compile with Zend thread safety enabled.
5749
5750 02/17/2005: wsfulton
5751             Memory leak fix in some of the scripting language modules when using default
5752             arguments in constructors. The scripting language was not taking ownership of the
5753             C++ object memory when any of the constructors that use default arguments was called.
5754
5755 02/16/2005: wsfulton
5756             SF #1115055: Failed make install. Patch from Rob Stone.
5757
5758 02/16/2005: wsfulton
5759             [Java] SF #1123416 from Paul Moore. Correct memory allocation for STRINGARRAY
5760             typemaps in various.i.
5761
5762 02/15/2005: wsfulton
5763             Disabled typemap search changes for now (see entry 19/12/2004). It breaks
5764             old typemaps, lengthens the execution time by about 25% and introduces
5765             inconsistencies.
5766
5767 02/15/2005: wsfulton
5768             swig -help follows other software by printing to stdout instead of stderr now.
5769             swig -version also displays to stdout instead of stderr now.
5770             Behaviour reported by Torsten Landschoff.
5771
5772 02/15/2005: wsfulton
5773             [Ruby] Fix for the less commonly used ordering of %include and #include, so
5774             that the generated code compiles. Bug reported by reported by Max Bowsher.
5775               %include foo.h
5776               %{
5777               #include foo.h
5778               %} 
5779
5780 02/15/2005: wsfulton
5781             [C#, Java] SWIG_exception macro will now return from unmanaged code / native code
5782             as soon as it is called. Fixes possible JVM crashes and other code unexpectedly
5783             being executed. Note SWIG_exception is only occasionally used by SWIG library
5784             writers, and is best avoided by SWIG users.
5785
5786 02/15/2005: wsfulton
5787             [C#, Java] Typemaps can now be targeted at global variable names
5788             and static member variable names. Previously the typemaps for 
5789             the setters were ignored, for example:
5790
5791               %typemap(in) int globalint "..."
5792               int globalint;
5793
5794 02/13/2005: mkoeppe (Matthias Koeppe)
5795             [Guile] Add %typecheck for SWIGTYPE, add %typecheck for ptrdiff_t, fix
5796             typemaps for size_t.
5797
5798             [Pike] Merge patch from Torsten Landschoff for improved Pike configuration.
5799
5800 02/12/2005: mkoeppe (Matthias Koeppe)
5801             New configure switches --without-tcl, --without-python etc. allow to
5802             disable the search for installed languages.
5803
5804 01/31/2005: wuzzeb (John Lenz)
5805             - Add DohSortList to DOH
5806             
5807             - Improve the runtime type system:
5808                + Speed. Type loading is now O(n log n) instead of O(N^2), which
5809                  for large modules is a huge improvement.
5810                + A whole bunch of functions in swigrun.swg no longer need the 
5811                  swig_type_list_handle passed to them.  The only one left is 
5812                  TypeQuery.  This also makes runtime.swg a lot smaller.
5813                + Split up swig_type_info structure into two structures
5814                  (swig_type_info and swig_cast_info)
5815                + Store a pointer to a swig_type_info rather than just the type
5816                  name string in the linked list of casts. First off, this makes
5817                  the guile module a little faster, and second, the
5818                  SWIG_TypeClientData() function is faster too. 
5819                + Add the idea of a module into the type system.  Before, all the
5820                  types were stored in one huge linked list. Now, another level is
5821                  added, and the type system stores a linked list of modules, each
5822                  of which stores an array of types associated with it.
5823                + For more information of how the runtime type system now works,
5824                  please see Doc/Manual/typemaps.html and Doc/Devel/runtime.txt
5825                  
5826             - Update all language modules to use the new type system.  The changes
5827               to each language module are minor.  All languages are now able to
5828               use runtime.swg for external access to the type system.  Before
5829               only python and perl did.
5830
5831             - [guile, mzscheme, ocaml, and php4]  These languages opened up the
5832               init function inside the .cxx code, and any code in the .swg files
5833               in the init section was inside this function.  This was a problem
5834               for swiginit.swg, which needs to be inserted before the SWIG_init
5835               function is opened.  Thus I changed these languages to be like
5836               python or perl, where the init function is declared in the .swg
5837               file.
5838               
5839             - [Ruby] Instead of moving the init function to the .swg file, I
5840               added a new section initbeforefunc, and then added
5841               %insert(initbeforefunc) "swiginit.swg"
5842
5843             - [MzScheme] Fix enums and fix Examples/Makefile.in so that if
5844               multiple -I arguments are specified in the INCLUDES variable, each
5845               gets a ++ccf.
5846
5847             - [Guile GH] Update Guile GH to use the new type system.  See
5848               Doc/Manual/Guile.html for how smobs are now used.
5849
5850 01/11/2005: wsfulton
5851             [C#] New typemap called 'csconstruct'. The code in this typemaps was previously hard
5852             coded and could not be customised by a user. This typemap contains the code that is
5853             generated into a proxy class's constructor.
5854
5855             [Java] New typemap called 'javaconstruct'. The code in this typemaps was previously hard
5856             coded and could not be customised by a user. This typemap contains the code that is
5857             generated into a proxy class's constructor. Another typemap named 'javaconstruct_director'
5858             is used instead when the proxy class is a director class.
5859
5860             [C#, Java] If a C++ class did not have a default constructor, a protected default constructor
5861             was automatically generated by SWIG. This seems is unnecessary and has been removed
5862             and thereby giving the user almost complete control over the generated code along with the
5863             new typemaps above.
5864
5865 19/12/2004: mmatus
5866             [Disabled, see entry 02/15/2004]
5867             - Fix typemap search, now the "out" typemap search is done as follows
5868
5869                  int *Foo::foo(int bar)   ->  int *Foo::foo(int bar)
5870                                           ->  int *Foo::foo
5871                                           ->  int *foo(int bar)
5872                                           ->  int *foo
5873                                           ->  int *
5874
5875                then, now you can be more specific, and define
5876
5877               /* apply only for  'Foo::foo' method */
5878               %typemap(out) int * Foo::foo(int *bar) ...; 
5879
5880               /* apply for all 'foo' functions/methods */
5881               %typemap(out) int * foo(int *bar) ...; 
5882
5883               %inline {
5884                 struct Foo {
5885                    int *foo(int *bar);
5886                 };
5887               }
5888           
5889
5890 15/12/2004: mmatus
5891             - More fixes for templates and template default args.
5892               See template_default.i for scary cases that now are 
5893               supported, besides the already ugly STL/std cases.
5894               
5895             - Cosmetics and more use of 'const' where it was implicit.
5896             - Other fixes for OSS, which is now working again with 1.3.25.
5897         
5898 Version 1.3.24 (December 14, 2004)
5899 ==================================
5900
5901 12/12/2004: wuzzeb (John Lenz)
5902             [Chicken] Fix a bunch of bugs relating to -proxy support
5903               + non-class variables now export properly using -proxy
5904               + static member functions now export properly using -proxy
5905               + member class variables now export properly using -proxy
5906               + added a -nounit argument, which does not export the (declare (unit ...))
5907               + correctly install swigclosprefix.scm
5908               + constants (enums, defines) now correcly export when using -proxy
5909
5910 12/11/2004: wsfulton
5911             configure fix for when more than one version of jni_md.h is found
5912             in the Java include directory (was generating lots of sed error
5913             messages).
5914
5915 12/08/2004: wsfulton
5916             [Java] Fixes to arrays_java.i so that one can apply the array
5917             typemaps to functions taking pointers as input, eg
5918
5919                 %include "arrays_java.i"
5920                 %apply int[] {int*};
5921                 void foo(int *a);
5922
5923 12/05/2004: wsfulton
5924             [Java] Director mods contributed by Scott Michel. New typemaps
5925             directordisconnect and directordisconnect_derived for the 
5926             swigDirectorDisconnect() method. Also fix to get the javapackage
5927             typemap working again.
5928
5929 12/05/2004: mmatus
5930             - Finishing the fixes for templates + default template
5931               args + specializations.
5932
5933             - [Python] Now we use the new templates + default template
5934               args in the std/STL library. That means the internal
5935               swig files are getting uglier since we now support the
5936               original declarations:
5937
5938                 template<class _Tp, class _Alloc = std::allocator< _Tp > >
5939                 class vector {
5940                 ....
5941                 };
5942                      
5943                 template<class _Key, class _Tp, class _Compare = std::less<_Key >,
5944                 class _Alloc = std::allocator<std::pair<const _Key, _Tp > > >
5945                 class map {
5946                 ....
5947                 };
5948  
5949               and the user can use the %template directive as
5950
5951                 %template() std::vector<int>;
5952                 %template() std::vector<int, std::allocator<int> >;
5953                 %template() std::vector<int, MyAllocator<int> >;
5954
5955               Now we are closer to the cleaning/rewriting of the
5956               python std/STL support, such that we recover support for
5957               MSVC++ 6.0, and we can add support for other languages
5958               too.
5959
5960
5961 12/02/2004: wsfulton
5962             [Java] Fix for directors when wrapping methods using a member enum
5963             and typesafe/proper enums enabled.
5964
5965 12/01/2004: mmatus
5966             - Fix typemaps to work with templates and default template
5967               args, ie
5968
5969                template <class A, class B = int>
5970                struct Foo {
5971                };
5972
5973                %typemap(in) Foo<int> *{...}
5974                %typemap(out) Foo<int,int> *{...}
5975
5976                Foo<int> * foo( Foo<int> *f1, Foo<int,int> *f2);
5977
5978               now 'f1', 'f2' and the return value resolve the provided
5979               typemaps properly.
5980
5981               This is highly needed for proper STL support, see new 
5982               std_basic_string.i, std_sstream.i, etc.
5983
5984             - Added std_sstream.i, and fix std_basic_string.i to use
5985               the new typemaps + template def. arg mechanism. Also,
5986               added the needed std_alloc.i. Now, all the containers
5987               can be modified to support std::allocator, like in:
5988               
5989                 template<class T, class A = std::allocator<T > >
5990                 class vector {
5991                 public:
5992                 ....
5993                 };
5994               
5995               This change is only completed by now for basic_string.
5996
5997             - Fix for smart pointers + members + extensions:
5998
5999               %extend Foo {
6000                 int extension(int i, int j) { return i; }
6001                 int extension() { return 1; }
6002               }
6003
6004               %inline %{
6005
6006               class Foo {
6007               public:
6008                 int y;
6009                 static const int z;
6010               };
6011   
6012               class Bar {
6013                 Foo *f;
6014               public:
6015                 Bar(Foo *f) : f(f) { }
6016                 Foo *operator->() {
6017                   return f;
6018                 }
6019               };
6020
6021               now you can 
6022              
6023               f = Foo()
6024               f.y = 3
6025               a = f.z
6026               f->extension()
6027  
6028               b = Bar(f)
6029               b.y = 3
6030               a = b.z
6031               b->extension()
6032
6033             - Other small errors fixes, mostly python.
6034
6035 11/25/2004: wsfulton
6036             [Java] Numerous director bug fixes so that the correct java types
6037             and canonicalized types in the JNI code are emitted. Use of the
6038             $javaclassname special variables in the director typemaps now
6039             consistent with the non-director typemaps. The types used for 
6040             typemap lookups are also corrected in a few places. If you 
6041             previously had your own director typemaps, ensure they are using the
6042             correct C++ type.
6043
6044             *** POTENTIAL INCOMPATIBILITY FOR JAVA DIRECTORS ***
6045
6046 11/25/2004: wsfulton
6047             const enum SWIGTYPE & typemaps added. These wrap const enum references
6048             as if they were passed by value. Const enum references thus work the
6049             same as const reference primitive types such as const double &, 
6050             const int & etc. Typemaps added for Java, C#, Ruby, Tcl, Perl and Pike.
6051
6052 11/25/2004: wsfulton
6053             [Java, C#] New special variable: $*javaclassname, similar to $javaclassname
6054             and $&javaclassname. The new one removes a pointer from the C type before
6055             obtaining the Java class name. One or more of $javaclassname,
6056             $&javaclassname or $*javaclassname may now appear in a typemap. Likewise for
6057             C# using csclassname instead of javaclassname.
6058
6059 11/25/2004: wsfulton
6060             The last vestiges of enums being handled as integers removed from the
6061             internals. The wrapper methods use the enum type rather than an int
6062             now. The net result is added type safety for enums when handled as
6063             pointers, references etc. Previously in situations such as a method
6064             taking a pointer to an enum, a pointer to an int or a pointer to an
6065             enum of some other type could inadvertantly be passed to the method.
6066             This is now fixed as the descriptor for an enum is no longer based on
6067             an int, but the enum type instead. Anonymous enums are still handled
6068             as integers.
6069
6070             The consequence for scripting language users in correct usage of enums
6071             should not be noticeable. There is no change for any of the languages
6072             where enums are passed by value - most of the scripting languages will
6073             still accept an integer for an enum value and the strongly typed
6074             languages still use either typesafe enums, integers or proper enums
6075             depending on what the user configures. For Java and C# users a change
6076             in the typewrapper class name has occurred (for enum pointers,
6077             references etc). For example:
6078
6079               enum Numbers { one=1, two };
6080               enum Numbers* number();
6081
6082             In Java and C# this must now be coded as
6083
6084               SWIGTYPE_p_Numbers n = modulename.number();
6085
6086             rather than
6087
6088               SWIGTYPE_p_int n = modulename.number();
6089
6090             *** POTENTIAL INCOMPATIBILITY ***
6091
6092 11/21/2004: wsfulton/mmatus
6093             Added missing deprecated warning for %name and remove remaining %name
6094             usage in the SWIG libraries.
6095
6096 11/21/04: mmatus
6097             - [Python] Adding the PySwigObject to be used for carrying
6098               the instance C/C++ pointers. This is used instead of
6099               string and PyCObjects.
6100
6101               The new PySwigObject is even safer than PyCObject, and
6102               more friendly than plain strings:
6103
6104               now you can do
6105
6106                 print a.this
6107                 <Swig Object at _00691608_p_A>
6108
6109                 print str(a.this)
6110                 _00691608_p_A
6111
6112                 print long(a.this)
6113                 135686400
6114
6115                 print "%s 0x%x" % (a.this, a.this)
6116                 _00691608_p_A 0x8166900
6117
6118               the last one is very useful when debugging the C/C++
6119               side, since is the pointer value you will usually get
6120               from the debugger.
6121
6122               Also, if you have some old code that uses the string
6123               representation "_00691608_p_A", you can use it now again
6124               using 'str(ptr)', or by calling 'str = PyObject_Str(obj)'
6125               in the C/C++ side.
6126  
6127               This change is mainly for nostalgic swig users that miss
6128               the string representation, but also allows to say again
6129
6130                 if a.this == b.this:
6131                   return "a is b"
6132
6133               and well, since the change were really simple, maybe in
6134               the future we will be able to do
6135    
6136                 next = a.this + 1
6137
6138               or add native python iteration over native C/C++ arrays,
6139               ie, no need to create/copy new tuples when returning and
6140               array or vector.
6141
6142               Also, a PySwigPacked object was adding to carry a member
6143               method pointer, but this is probably a temporal solution
6144               until a more general object for methods is added.
6145
6146               Be aware that to simplify maintaining and compatibility
6147               with other tools, the old string and PyCObjects
6148               representation could disappear very soon, and the
6149               SWIG_COBJECTS_TYPES or SWIG_NO_OBJECT_TYPES macros will
6150               have no effect at compilation time. Still, the three
6151               mechanisms are present in the code just for testing,
6152               debugging and comparison purposes.
6153               
6154 11/21/04: mmatus
6155
6156             - [Python] Adding back support for using the swig runtime code
6157               inside the user code. We just allow the user to include
6158               the minimal code needed to implement the runtime
6159               mechanism statically, just as in done in the swig
6160               modules.
6161               
6162               To use the swig runtime code, for example with python,
6163               the user needs include the following:
6164  
6165                #include <Python.h>         // or using your favorite language
6166                #include <swigrun.swg>
6167                #include <python/pyrun.swg> // or using your favorite language
6168                #include <runtime.swg>
6169
6170               the files swigrun.swg, pyrun.swg and runtime.swg can 
6171               be checked out by using swig -co, or they can simply 
6172               be found by adding the swig lib directory to the
6173               compiler include directory list, for example
6174
6175                SWIGLIB=`swig -swiglib`
6176                c++ -I${SWIGLIB} ..
6177
6178               of better, using the CPPFLAGS, but that depends on your
6179               environment.
6180                
6181               This change can be ported to the other languages too,
6182               you just need to isolate the needed runtime code in
6183               a single file like 'pyrun.swg', and provide the 
6184               SWIG_Runtime_GetTypeList() method. Look at the
6185               Lib/python/pyrun.swg file and the Examples/python/swigrun
6186               example.
6187
6188 11/15/04: mmatus
6189             - Fix mixed_types.i + gcc-3.4, ie, arrays + references +
6190               typedefs
6191
6192             - Fix multidim arrays + typedefs,ie
6193
6194                typedef char character[1];
6195                typedef character word[64];
6196
6197             - Process protected/private bases in the same way before
6198               we process protected/private members, ie, we check
6199               for constructors, operator new, virtual members, etc.
6200    
6201             - Fix Ruby/Java to work (or ignore) multi-inheritance +
6202               directors. Allow other languages to define if it is
6203               supported or not.
6204             
6205             - Now you can run
6206
6207                 SWIG_FEATURES="-directors -dirprot" 
6208                 make check-ruby-test-suite
6209                 make check-python-test-suite
6210                 make check-java-test-suite
6211                 make check-ocaml-test-suite
6212
6213               and you will get only 'real' errors. ruby and python
6214               compile with no errors, java shows some problems. 
6215
6216 Version 1.3.23 (November 11, 2004)
6217 ==================================
6218
6219 11/05/2004: wsfulton
6220             Patch #982753 from Fabrice Salvaire: Adds dependencies generation for
6221             constructing makefiles. New command line options -MF -MD -MMD to work
6222             with the current options -M and -MM. These options are named the same
6223             and work the same as in gcc.
6224
6225 11/05/2004: wsfulton
6226             %ignore/%rename changes for methods with default arguments to mirror
6227             %feature behaviour. See previous entry.
6228
6229                       *** POTENTIAL INCOMPATIBILITY ***
6230
6231 11/04/2004: wsfulton
6232             %feature improvements for fine tuning when wrapping methods with
6233             default arguments. Any %feature targeting a method with default arguments
6234             will apply to all the extra overloaded methods that SWIG generates if the
6235             default arguments are specified in the feature. If the default arguments are
6236             not specified in the feature, then the feature will match that exact
6237             wrapper method only and not the extra overloaded methods that SWIG generates.
6238             For example:
6239
6240               %feature("except") void hello(int i=0, double d=0.0);
6241               void hello(int i=0, double d=0.0);
6242
6243            will apply the feature to all three wrapper methods, that is:
6244
6245               void hello(int i, double d);
6246               void hello(int i);
6247               void hello();
6248
6249            If the default arguments are not specified in the feature:
6250
6251               %feature("except") void hello(int i, double d);
6252               void hello(int i=0, double d=0.0);
6253
6254            then the feature will only apply to this wrapper method:
6255
6256               void hello(int i, double d);
6257
6258            and not these wrapper methods:
6259
6260               void hello(int i);
6261               void hello();
6262
6263            This has been introduced to make %feature more powerful to ease the migration
6264            to new default arguments wrapping approach.
6265
6266                       *** POTENTIAL INCOMPATIBILITY ***
6267
6268            If you previously had a %feature and didn't specify the default arguments,
6269            you will have to add them in now or you can obtain the original behaviour
6270            by using %feature("compactdefaultargs").
6271
6272 11/04/2004: wsfulton
6273             [C#] Typemaps for std::vector added into std_vector.i. The proxy classes
6274             generated are modelled on the .NET ArrayList class. This isn't quite
6275             ready for general consumption yet, but will work with vectors of primitive
6276             types and some classes.
6277
6278 10/3/2004: wuzzeb (John Lenz)
6279             [GUILE] The -scm interface is now the default.  The old GH interface can
6280             still be enabled by passing -gh to SWIG.
6281
6282 10/2/2004: mmatus
6283
6284             - More fixes for namespace + class declarations.
6285               As an extra bonus, we get %template support for static/members class
6286               methods, ie, now you can say:
6287
6288                 namespace space {
6289                  struct A                           
6290                  {                                  
6291                    template <class Y>       
6292                    static void fooT(Y y) { }
6293                  };     
6294                 }                           
6295                                             
6296                 struct B                            
6297                 {                                   
6298                   template <class Y>                
6299                   void barT(Y y) {} 
6300                 };                           
6301
6302                 %template(foo) space::A::fooT<double>;
6303                 %template(foo) space::A::fooT<int>;
6304                 %template(foo) space::A::fooT<char>;
6305                                                                                 
6306                 %template(bar) B::barT<double>;
6307                 %template(bar) B::barT<int>;
6308                 %template(bar) B::barT<char>;
6309
6310               and call
6311
6312                 A.foo(1)
6313                 b = B()
6314                 b.bar(1)
6315               
6316               note the the methods are emitted inside the classes,
6317               and hence, the %template name refers to the 'member'
6318               method name, not a global namespace name.
6319
6320 10/31/2004: mmatus
6321             - Solve namespace + class declarations, as in
6322
6323                namespace foo {
6324                  struct Bar;
6325                  struct Foo {
6326                  };
6327                }
6328
6329                struct foo::Bar : Foo {
6330                };
6331
6332                see namespace_class.i for more examples.
6333
6334             - Fix %template directive to properly use namespaces,
6335               including the case:
6336
6337                    namespace one
6338                    {
6339                        template <typename T>
6340                        struct Ptr {};
6341                    }
6342
6343                    namespace one
6344                    {              
6345                        struct Obj1 {};
6346                        typedef Ptr<Obj1> Obj1_ptr;
6347                        %template(Obj1_ptr) Ptr<Obj1>; 
6348                    }                              
6349                                                   
6350                    namespace two  
6351                    {
6352                        struct Obj2 {};  
6353                        typedef one::Ptr<Obj2> Obj2_ptr;
6354                        %template(Obj2_ptr) one::Ptr<Obj2>;
6355                    }
6356
6357               this is done by using the namespace name 'one' to create
6358               a namespace node to emit the template instantiation,
6359               just as before, but the template parameters are resolved
6360               and qualified in the current namespace ('one' or 'two').
6361               This is same way that typedef works. 
6362
6363               This resolve the smart_pointer_namespace2.i case, and at
6364               the same time, several other ones where before swig was
6365               generating the
6366
6367                 "Can't instantiate template 'xx' inside namespace 'yy'"
6368               
6369               error message. In fact, that error doesn't exist
6370               anymore. You can only get an error if you use a bad
6371               namespace name or so.
6372
6373 10/30/2004: mmatus
6374             - [ruby] Directors fixes:
6375               - enums and std::strings are working now (several
6376                 reports in bug track system)
6377               - added patch 1025861 for director + exceptions
6378                 
6379               *** Attention ***: ruby with directors + protected
6380               members work with version 1.7+. Older versions seems to
6381               have a broken signature for'rb_protect'.
6382                 
6383               If you need to use an old version, look at
6384
6385               http://excruby.sourceforge.net/docs/html/ruby__hacks_8hpp-source.html
6386               for workarounds.
6387               
6388             - [ruby] Fix memory allocation problem in typemap (bug 1037259)
6389
6390             - [tcl] Fix (enums|constants) + namespace option 
6391                     (reported by jason.m.surprise@intel.com).
6392
6393             - [perl] Add patch 962168 for multiple inheretance
6394             
6395             - Fix 'defined' as variable name.
6396
6397 10/29/2004: wsfulton
6398             Seg fault fix for global scope operator used for friend methods:
6399
6400               class B {
6401                 friend void ::globalscope();
6402                 ...
6403               };
6404
6405 10/28/2004:mmatus
6406             - Added module and swig option "templatereduce" to force swig
6407               to reduce any type needed with templates, ie, in these cases
6408
6409                 %module("templatereduce") test
6410
6411                 template <class T> struct A { };
6412
6413                 typedef int Int;
6414                 %template(A_Int) A<Int>  ==>  %template(A_Int) A<int>
6415
6416                 typedef B* Bp;
6417                 %template(A_Bp) A<Bp>  ==>  %template(A_Bp) A<B*>
6418
6419               swig reduces the types Int and Bp to their primitives
6420               int and B*. This is closer to the usual compiler
6421               resolution mechanism, and it is really needed sometimes
6422               when you mix templates + typedefs + specializations.
6423
6424               Don't use it if you don't have any problem already,
6425               since the type reduction can interfere with some
6426               user typemaps, specially if you defined something like
6427
6428                    typedef int Int;
6429                    %typemap(in) Int ...;
6430
6431               in this case, when you use the "templatereduce" option,
6432               swig will ignore the user typemap, since the "typedef int Int"
6433               will take precedence, and the usual "int" typemap will be
6434               applied. 
6435
6436               Note that the previous case is not common, and should be
6437               avoided, ie, is not recommended to use a typedef and a
6438               typemap at the same time, specially if you are going to
6439               use templates + specializations.
6440
6441             - Directors:
6442
6443                 virtual destructor is always emitted now, this doesn't
6444                 cause any harm, and could solve some nasty and
6445                 mysterious errors, like the one mentioned by Scott.
6446
6447                 also the destructor is not in-lined, so, that can solve
6448                 some other mysterious errors when mixing directors +
6449                 imports + embedded applications + some specific compilers.
6450                 
6451 10/27/2004: wsfulton
6452             [C#] typemaps.i library file with INPUT, OUTPUT and INOUT typemaps added.
6453
6454 10/27/2004: wsfulton
6455             [Java] std::wstring typemap fixes in std_string.i from Russell Keith-Magee.
6456
6457 10/25/2004: mmatus 
6458
6459             - Using + namespace is working now (using_namespace.i).
6460
6461             - Derived + nested classes is working now
6462               (deriver_nested.i), but of course, we are still waiting
6463               for the nested class support.
6464             
6465             - Directors:
6466               - unnamed parameters support,
6467
6468               - protected constructor support (automatic and with
6469                 dirprot mode),
6470
6471               - detection of really needed protected declarations
6472                 (members and constructors) now is done automatically.
6473                 Even if you don't use the 'dirprot' mode, swig will
6474                 wrap what is minimally needed (and protected) for the
6475                 code to compile.
6476                 
6477                 what is public, as usual, is always wrapped, and if
6478                 you use the 'dirport'
6479                 
6480
6481             - Final fixes for the OSS to compile with SWIG 1.3.23 (my
6482               very very ugly C++ + templates + everything mounters wrap).
6483
6484 10/25/2004: wsfulton
6485             [C#] New commandline option -dllimport. This enables one to specify
6486             the name of the DLL for the DllImport attribute. Normally this name
6487             comes from the module name, so now it is possible to override this:
6488
6489               swig -csharp -dllimport xyz example.i
6490
6491             will generate for all the wrapped PInvoke methods:
6492
6493               [DllImport("xyz", EntryPoint="...")]
6494               public static extern ...
6495
6496             The wrappers from many different SWIG invocations can thus be compiled
6497             into one DLL.
6498
6499             A new special variable $dllimport can also be used in typemaps, pragmas,
6500             features etc. This will get translated into the value specified by -dllimport
6501             if specified, otherwise the module name.
6502
6503 10/22/2004: wsfulton
6504             [Java] Patch #1049496 from Scott Michel fixes directors methods with 
6505             enums when wrapped with typesafe or proper Java enums.
6506
6507 10/21/2004: wsfulton
6508             Fixes for default arguments in director constructors (Python, Ruby, Ocaml).
6509
6510 10/21/2004: mmatus
6511             - [Python] Add the '-cpluscast' option to enable the 'new'
6512               C++ casting operators, such as 'static_cast', inside the
6513               typemaps. By default swig use the old C cast style, even
6514               when parsing C++.
6515               
6516             - [Python] Add the '-new_vwm' option to enable the new
6517               SwigValueWrapper mode. Now this is mainly for testing
6518               that the typemaps are really safe for any future
6519               solution, but you can use it if you have a very strange
6520               error with default cosntructors missing + %apply +
6521               %typemap, and if everything else fails (see
6522               valuwrapper_opaque.i for alternative and current
6523               solutions). If you are a user that don't know what is
6524               SwigValueWrapper, don't even try it.
6525
6526             - [Python] Add the '-noh' option to be used with directors
6527               and when you prefer to disable the generation of the
6528               director header file. If not used, swig will work as
6529               usual generating both the wrap.cxx and wrap.h files. If
6530               you use it, swig will only generate wrap.cxx.
6531
6532 10/21/2004: wuzzeb (John Lenz)
6533             - If you define SWIG_TYPE_TABLE when compiling a wrapper file,
6534               the runtime types will be stored in the given type table name.
6535               Using this, you can seperate different modules to share their
6536               own type systems.  -DSWIG_TYPE_TABLE=Mytable
6537
6538             - [Python] If you define SWIG_STATIC_RUNTIME then the type information
6539               will be static to this wrapper.  Nothing will be shared with any
6540               other modules
6541
6542             - [Python] If you define SWIG_LINK_RUNTIME, then instead of using
6543               the new way of sharing type information, the wrapper will expect
6544               to be linked against the Lib/linkruntime.c file.  Any modules compiled
6545               with SWIG_LINK_RUNTIME and linked against linkruntime.c will all
6546               share type information.
6547
6548 10/20/2004: mmatus
6549             - [Python] Initial fix for python/import example. Please
6550               update the Makefile (autoconf, configure, etc, expert),
6551               since now probably is only working with g++, icc and a
6552               few other compilers that have the -shared option.
6553
6554               We need to create additional shared libraries for the
6555               virtual destructors. Old and usually forgotten C++
6556               requirement.
6557               
6558               Same fix need to be used in perl, I think.
6559
6560             - [Python] Fix generation of header file for directors,
6561               now directors.swg is also included, so, it can be really
6562               used from C++, and it solves some problem with compiler
6563               that require that, even with the simple swig inclusion.  
6564
6565             - [Python] Reordering the methods and moving some bodies
6566               outside the class declaration. This is needed due to
6567               some gcc-2.96 internal compiler errors. It seems the
6568               PYTHON class is getting too large to been declared and
6569               defined at the same time.
6570
6571             - Add the -oh option to change the output header file name
6572               if needed:
6573
6574                  swig -c++ -python test.i -o test.CC -oh test.HH
6575               
6576               this is mainly needed when using directors, and if the
6577               current default header file name is not good for you,
6578               which is generated as follow:           
6579
6580                  swig -c++ -python test.i             => test_wrap.h
6581                  swig -c++ -python test.i -o test.CC  => test.h
6582
6583
6584 10/20/2004: wsfulton
6585             1) Compact default arguments feature added. This feature allows one
6586               to use the default argument code generation that was used in
6587               SWIG-1.3.22 and earlier versions. It produces more compact wrappers
6588               as only one wrapper method is generated for any method with default
6589               arguments. So the advantage is it generates less code but has the
6590               original limitations, like it it does not work with all default arguments
6591               and default arguments cannot be taken advantage of in the strongly typed
6592               languages (C# and Java). It is implemented via the usual %feature mechanism:
6593
6594                 %feature("compactdefaultargs");
6595
6596             2) Keyword arguments (kwargs) are working again for default arguments
6597                in the languages that support it, ie, Python and Ruby. The new default
6598                argument wrapping approach using overloaded methods cannot support kwargs
6599                so the compact default argument feature is automatically turned on when
6600                kwargs are specified, by %feature("kwargs").
6601
6602             3) Compact default arguments are also automatically turned on when wrapping
6603                C (not C++) code. This is to support the bizarre notion of default arguments
6604                for C code.
6605
6606 10/20/2004: wsfulton
6607             Overloaded templated functions in namespaces also working now.
6608             Templated functions with default arguments in namespaces too.
6609
6610 10/19/2004: mmatus
6611
6612             - Allow to disable the new SwigValueWrapper mechanism,
6613               if you add the following line in your language main.
6614
6615                  /* Turn on safe value wrapper use mode */
6616                  Swig_value_wrapper_mode(1);
6617
6618               
6619               Now is only active in python. All the other languages
6620               are using the old resolution, but they  can also use the
6621               "valuewrapper"/"novaluewrapper" features to fix some
6622               of the old broken cases. Note, however,  that not all 
6623               the broken cases can be solved in that way.
6624
6625               The new mechanism seems to be working fine in perl, ruby
6626               and tcl, but failing in some typemaps in java.
6627
6628               Hence, is upto the language maintainer to test it, and
6629               decide to enable it or not.
6630
6631               Look at the valuewrapper_opaque.i for examples.
6632
6633             - Fix more SwigValueWrapper cases when the new mechanism
6634               is active. Now it also check for local typemap
6635               variables, see valuewrapper_opaque.i for an example when
6636               this is needed. But again, this extra checking will only
6637               be activated when using the new value wrapper mode.
6638
6639             - [Python] Fix variable wrapping of classes with private
6640               assign operators. It should be easy to fix in all the 
6641               other modules, instead of checking
6642
6643                  if (!Getattr(n,"immutable")) ...
6644         
6645               you need to verify
6646
6647                  if (is_assignable(n)) ...
6648
6649               Look at the private_assign.i for an example.
6650
6651 10/18/2004: mmatus
6652             - %features "director"/"nodirector" now work as expected.
6653             - General fixes in %feature to resolve function decl
6654               properly,
6655               
6656                 %feature("hello") foo();
6657                 char foo() ->  f()    // was working
6658                 char *foo() -> f().p  // it wasn't
6659  
6660
6661             - Template + specialization + default template args now is
6662               working, (don't confuse with template + default arg
6663               values, that was solved before), now this ugly case is
6664               working:
6665
6666                 template <class T, class A = Alloc<T> >
6667                 struct Vector
6668                 {
6669                    Vector(T a){}
6670                 };                 
6671
6672                 template <>
6673                 struct Vector<double>
6674                 {
6675                   Vector(){}
6676                   int foo() { return 0; }
6677                 };
6678
6679                 %template(V_c) Vector<char, Alloc<char> >;
6680                 %template(V_i) Vector<int>;    // picks Vector<int,Alloc<int> >
6681                 %template(V_d) Vector<double>; // picks the specialization
6682               
6683               this is needed for automatic STL support (later will
6684               be).
6685
6686             - Fix the template + typedef errors in test-suite, which
6687               probably will fix another group of strange template +
6688               namespaces + typedefs errors.
6689
6690             - %warnfilter is working better now, parser.y tries to use
6691               them when needed.
6692
6693             - **** New default type resolution method (stype.c) ***** 
6694
6695               It preserves the original mixed types, then it goes
6696               'backward' first deleting the qualifier, then the inner
6697               types, for example:
6698                                                                           
6699                  typedef A *Aptr;                                 
6700                  const Aptr&;                                           
6701                  r.q(const).Aptr       -> r.q(const).p.SWIGTYPE         
6702                  r.q(const).p.SWIGTYPE -> r.p.SWIGTYPE                  
6703                  r.p.SWIGTYPE          -> r.SWIGTYPE                    
6704                  r.SWIGTYPE            -> SWIGTYPE                      
6705                                                                         
6706                  enum Hello {};                                         
6707                  const Hello& hi;                                       
6708                  r.q(const).Hello          -> r.q(const).enum SWIGTYPE  
6709                  r.q(const).enum SWIGTYPE  -> r.enum SWIGTYPE           
6710                  r.enum SWIGTYPE           -> r.SWIGTYPE                
6711                  r.SWIGTYPE                -> SWIGTYPE                  
6712                                                                         
6713                  int a[2][4];                                           
6714                  a(2).a(4).int           -> a(ANY).a(ANY).SWIGTYPE      
6715                  a(ANY).a(ANY).SWIGTYPE  -> a(ANY).a().SWIGTYPE         
6716                  a(ANY).a().SWIGTYPE     -> a(ANY).p.SWIGTYPE           
6717                  a(ANY).p.SWIGTYPE       -> a(ANY).SWIGTYPE             
6718                  a(ANY).SWIGTYPE         -> a().SWIGTYPE                
6719                  a().SWIGTYPE            -> p.SWIGTYPE                  
6720                  p.SWIGTYPE              -> SWIGTYPE                    
6721
6722               before it always stops after finding ref/pointer/enum/array/etc.
6723                
6724               Now, then, you can define (use and apply) 'higher' typemaps such as:
6725
6726                 %typemap(in) SWIGTYPE* const&  
6727                 %typemap(out) char FIXSIZE[ANY]
6728                 %typemap(in) SWIGTYPE* const&  
6729                 %typemap(in) const enum SWIGTYPE&
6730                 %typemap(in) SWIGTYPE[ANY][ANY]
6731                 %typemap(in) const char (&)[ANY]
6732                
6733               It is possible with this change that previous typemaps
6734               that were defined (but ignored), now will start to work.
6735
6736               Also, it is necessary check for the '%typemap(varin) SWIGTYPE[]',
6737               before it was usually not defined (but char[] was),
6738               and that can produce some inconsistencies.
6739
6740                       *** POTENTIAL INCOMPATIBILITY ***
6741
6742               This change was needed for STL, since std::vector<enum Hello> 
6743               std::vector<A*>, etc, will always generate methods that
6744               mix const references with the vector type.
6745
6746               Now that is working, all the std::container<T*>
6747               specialization will not be needed anymore, well, in
6748               theory. 
6749
6750               In the practice, everythin is working as before until
6751               the proper mixed types are defined and the libraries
6752               simplified to use them.
6753
6754             - Change the behavior of extern "java"/"fortran"/"etc", 
6755               now swig produces a warning, and use extern "C" instead.
6756               The warning can also be disable with the "-w 313" flag.
6757               (WARN_PARSE_UNDEFINED_EXTERN).
6758
6759             - SwigValueWrapper is now more selective (lang.cxx).
6760
6761             [Perl/Tcl]
6762             - Fix some typemaps (perl/tcl) to work properly with
6763               SwigValueWrapper. This was not a problem with
6764               SwigValueWrapper, but with the typemaps that now are
6765               safe to use with %apply.
6766
6767             [Python]
6768
6769             - Fix %callback/%pythoncallback work now as before after
6770               the def args changes. Also, %callback now is an alias
6771               for %pythoncallback, so, they do the same.
6772
6773             [Python/Ruby]
6774             - %callback is more usable and uniform:
6775
6776                  %callback("%s_cb") foo();  // for both, python/ruby
6777                  %callback("%s_cb");        // for both, python/ruby
6778                  %callback(1) foo();        // only in python.
6779
6780 10/17/2004: arty
6781             [OCAML]
6782             - Tweak to enum typing for soundness in the presence of multiple
6783               modules.
6784             - global functions are now unambiguous in multiple loaded modules.
6785             - Fixed test case code to build multimodule test cases correctly.
6786             - There is no way to share overload resolution across modules
6787               because of soundness issues.  If the user wants to call some
6788               function foo from an arbitrary module bar, they will have to
6789               use Bar._foo to call it correctly.  Later I will fix the 
6790               camlp4 module to do something clever in this case.  
6791             - Promided performance overhaul of class mechanism.
6792             - Removed symbol hack for ocaml-3.07 and below which is not needed
6793               for ocaml-3.08 and above.
6794
6795 10/16/2004: wuzzeb (John Lenz)
6796             [CHICKEN]
6797             - Completly change how chicken.cxx handles CLOS and generic code.
6798               chicken no longer exports -clos.scm and -generic.scm.  The clos
6799               code is exported directly into the module.scm file if -proxy is passed.
6800             - The code now always exports a unit.  Running the test-suite is now
6801               majorly broken, and needs to be fixed.
6802             - CLOS now generates virtual slots for member variables similar to how
6803               GOOPS support works in the guile module.
6804             - chicken no longer prefixes symbols by the module name, and no longer
6805               forces all names to lower case.  It now has -useclassprefix and -closprefix
6806               similar to how guile handles GOOPS names.
6807
6808 10/16/2004: wsfulton
6809             Templated functions with default arguments working with new default argument
6810             wrapping approach. The new approach no longer fails with the following default
6811             argument pattern (previously failed with some primitive types, like 
6812             unsigned primitive types):
6813
6814               template<typename T> int foo(const T& u = T());
6815               %template(foo) foo<unsigned int>;
6816
6817             This relies on the templated function overloading support just added, so all
6818             the combinations of overloading by template parameters and normal parameters
6819             as well as overloading with default parameters works.
6820
6821 10/16/2004: wsfulton
6822             Added support for the large range of templated function overloading that C++
6823             supports.
6824
6825             - Overloaded templated functions, eg
6826
6827               template<typename T> int overload(T t);
6828               template<typename T> int overload(T t, const T &r);
6829
6830             - Fixes where the templated type is not used in the parameter list, eg
6831
6832               template<typename T> void xyz();
6833               template<> void xyz<double>();
6834
6835             - Fixes for overloading of plain functions by a templated function:
6836
6837               void abc(double d);
6838               template<typename T> void abc(T t);
6839
6840             - Overloading by templated parameters fixed:
6841
6842               template<typename T> void foo(T t) {}
6843               template<typename T, typename U> void foo(T t, U u) {}
6844
6845               %template(foo) foo<double, double>;
6846
6847             - All combinations of the above also working including specializations, eg:
6848
6849               void abc(double d);
6850               template<typename T> void abc(T t);
6851               template<> void abc<double>(double t);
6852               template<> void abc(int t);
6853
6854 10/16/2004: wuzzeb (John Lenz)
6855             - Remove the ability to share type information by using c linking.
6856               All type sharing happens through a global variable in the target language.
6857                 + Remove SWIG_NOIMPORT, SWIG_RUNTIME, and related defines.
6858                 + Depreciate -runtime, -noruntime command line options
6859                 + Update test-suite common.mk to correctly build multicpptest
6860                 + Remove reference to precommon.swg
6861                 + Update the guile_gh interface to share data by a global var instead
6862                   of c linkage.
6863
6864             - Remove Advanced.html, since everything in it is now obsolete
6865
6866 10/09/2004: mmatus
6867             - Split the python std/STL C++ library files, now
6868               all the language independent definitions are under
6869               the directory
6870               
6871                 Lib/std
6872
6873               and hence, can be used from other languages.
6874
6875             - Add more documentation to the Python STL, and
6876               clean unnecessary code.
6877
6878             - Add initial C99 complex support, and some fixes
6879               for long double.
6880
6881 10/08/2004: mmatus
6882             - Fix the SwigValueWrapper for opaque types, now it is 
6883               applied for opaque templates and classes, for which we
6884               don't know if there is or not a default constructor, ie
6885
6886                  struct A { 
6887                    A(int);
6888                  };
6889  
6890               Still, if you know that you class has a default
6891               constructor, and for some very very particular reason
6892               you want to avoid the SwigValueWrapper, and you don't
6893               want or can't expose the class to swig, now you can
6894               say
6895
6896                  %feature("novaluewrapper") A;    
6897                  class A;
6898                
6899               or the other way around, if the class has a default
6900               constructor, but you want to use the value wrapper, you
6901               can say
6902
6903                  %feature("valuewrapper") A;
6904                  struct A { 
6905                    A();
6906                    ....
6907                  };   
6908       
6909             - Fix for char > 128, ie
6910
6911                 const char tilde_a = '\341';
6912
6913             - Add patch 1041858 for $lextype, which carries the 
6914               literal type of a symbol. See lextype.i in the
6915               test-suite for more details.
6916
6917                             
6918  
6919
6920 10/07/2004: wsfulton
6921             {Ruby, Java] Fix director + 'empty' throws
6922
6923                     struct A {
6924                       A() throw();
6925                       virtual ~A() throw();
6926                       int foo() throw();
6927                     };
6928
6929
6930 10/06/2004: wuzzeb (John Lenz)
6931             [TCL]
6932             - Fix bug reported by William A. Hoffman propagating clientdata
6933             between modules.  Added clientdata_prop.multicpptest to check for
6934             this bug.  The fix involved the following changes:
6935                 + SwigType_clientdata_collect does not need to check
6936                 types in r_resolved because we only want to propagate clientdata
6937                 to typedefed classes, and r_mangled already takes care of typedefs.
6938
6939                 + SWIG_TypeRegister now copies the clientdata field correctly
6940
6941                 + Move SWIG_Guile_PropagateClientData function from guile module
6942                 into common.swg, because we need to call it from both guile and tcl.
6943
6944                 + Add base_names to swig_class to delay the lookup of bases.  SWIG
6945                 now exports the base names and only when the base swig_class is
6946                 needed is SWIG_TypeQuery(name)->clientdata looked up.
6947
6948             - conversion_ns_template testsuite test was failing because
6949             the name of the wrapped constructor function was not calculated
6950             correctly for structs.  Fixed.
6951
6952 10/06/2004: wsfulton
6953             Fixes for default arguments used in directors - in virtual
6954             methods and director constructors.
6955
6956 10/06/2004: mmatus
6957             Fix the __cplusplus macro, and bug 1041170.
6958             Now it is working as supposed, ie, you can safely use
6959
6960               #ifdef __cplusplus
6961               ...
6962             
6963             all over swig, including inside %defines and %{ %} bodies.
6964
6965             
6966                       *** POTENTIAL INCOMPATIBILITY ***
6967
6968             The old trick of using
6969
6970               #if __cplusplus
6971
6972             doesn't work any more. So, if you have your own typemaps
6973             using that syntax, you will need to migrate them to use
6974             "#ifdef __cplusplus".
6975
6976 10/05/2004: wuzzeb (John Lenz)
6977             - Reorganize how runtime type information is stored and shared
6978             between modules.  For chicken and mzscheme, I removed
6979             the ability to use runtime libraries, while perl, tcl, python, and
6980             ruby default to using the new method but can go back to the old
6981             method by declaring SWIG_ALLOW_RUNTIME.
6982
6983             - line 582 in mzscheme.cxx was generating a segfault on 
6984             imports.multicpptest, so I fixed it.
6985
6986 10/05/2004: wsfulton
6987             Fixes for %extend and overloaded static methods with default
6988             arguments.
6989
6990 10/05/2004: mmatus
6991             - [python] Fix director + method with 'empty' throw, ie
6992
6993                     struct A {
6994                       virtual int foo() throw();
6995                     };
6996                     
6997               other languages should also easy to fix, look for
6998               Getattr(n,"throw") in python.cxx.
6999
7000             - Fix director + destructor with 'empty' throw
7001
7002                     struct A {
7003                       virtual ~A() throw();
7004                     };
7005
7006             - Now SWIG_FEATURES parse all and the same  options you
7007               can pass to swig in the command line.
7008               
7009             - New command line flag: -features <list>, as in
7010
7011                 swig -features autodoc=3,director
7012
7013               ie, any global feature can be initialized from the
7014               command line. This is mainly for testing, but users
7015               can also take advantage of it.
7016
7017 10/04/2004: mmatus
7018             - Properly qualify type in syntax as 'long(2)' or 'Foo()',
7019               this solve old problem with default args, and probably
7020               other problems around. However, the default arg problem
7021               was also already solved by William (see bellow).
7022
7023             - Fix feature_set and feature_get methods. Before
7024               they look from particular to general and keep the first
7025               feature found. This didn't work well with templates.
7026               Now the methods look from general to particular, and
7027               override any found feature.
7028
7029             - Previously a feature could not be applied to constructors
7030               or destructors that weren't explicitly declared in the class.
7031               This is now fixed, for example:
7032
7033                 %feature("featurename") Foo() "..."
7034                 %feature("featurename") ~Foo() "..."
7035                 class Foo {
7036                   // implicit Foo() and ~Foo()
7037                 };
7038
7039             - Fix missing features for default const/dest, by really
7040               'creating' the methods and applying the features.
7041
7042             - Fix return_const_value.i case by adding SwigValueWrapper<const T>
7043               specialization.
7044
7045             - Fix %extend + overload, including overloading actual
7046               class methods. 
7047
7048             - Adding more cases in related files in the test-suite.  
7049
7050 10/04/2004: wsfulton
7051             Changes to the way default arguments are wrapped. Previously a single
7052             method was generated for each method that had default arguments. If
7053             a method had 5 arguments, say, of which 1 had a default argument
7054             then the call to the wrapped method would pass 5 arguments. The default
7055             value was copied into the wrapper method and used if the scripting
7056             language passed just 4 arguments. However, this was flawed as the
7057             default argument sometimes does not have global access, for example
7058             SWIG would generate code that couldn't compile when wrapping:
7059
7060               class Tricky {
7061               public:
7062                 void foo(int val = privatevalue);
7063                 void bar(int val = Tricky::getDefault());
7064               private:
7065                 static int getDefault();
7066                 enum { privatevalue = 200 };
7067               };
7068
7069             Also bugs in resolving symbols generated code that wouldn't compile, for example
7070             (probably fixable though):
7071
7072               namespace Space {
7073                 class Klass {
7074                 };
7075                 Klass constructorcall(const Klass& k = Klass());
7076               }
7077
7078             The approach also does not work for statically typed languages (C# and Java)
7079             as these languages do not allow methods to have variable number of arguments.
7080             Although C# has a mechanism to pass a variable number of arguments they
7081             must be of the same type and are more like varargs.
7082
7083             The new approach solves the above problems and wraps methods with default
7084             arguments as if the method was overloaded. So SWIG will now treat
7085
7086               void foo(int val=0);
7087
7088             as if it had parsed:
7089
7090               void foo(int);
7091               void foo();
7092
7093             The code generated is then exactly the same as if SWIG had parsed the two
7094             overloaded methods. The scripting languages count the arguments passed and call
7095             the appropriate method, just like overloaded methods. C# and Java are now able
7096             to properly wrap methods with default arguments by generating extra methods,
7097             again as if the method was overloaded, so for:
7098
7099               void bar(string s="hello", double d=10.0, int i=0);
7100
7101             the following proxy methods are generated:
7102
7103               void bar(string s, double d, int i);
7104               void bar(string s, double d);
7105               void bar(string s);
7106               void bar();
7107
7108             The new approach comes with a couple of minor knock on effects.
7109
7110             1) SWIG support for default arguments for C (not C++) code no longer works.
7111             Previously you could have this interface:
7112
7113               %{
7114               void foo(int val);
7115               %}
7116               void foo(int val=0);
7117
7118             and call the wrapped method from a scripting language and pass no arguments
7119             whereupon the default of 0 was used. You can get the same behaviour for C
7120             code by using the "default" typemap:
7121
7122               %typemap(default) int val "$1 = 0;";
7123               %{
7124               void foo(int val);
7125               %}
7126               void foo(int val);
7127
7128             or you could of course compile your code as C++ if you want C++ features :) :
7129
7130               %{
7131               void foo(int val=0);
7132               %}
7133               void foo(int val=0);
7134
7135             A couple of SWIG's libraries used this C extension and these have been modified
7136             to use the "default" typemap. The "default" typemap is thus unchanged (and still
7137             is not and is not fully supported by C# and Java, and is likely to remain so).
7138
7139
7140             2) All features (%feature, %rename, %ignore etc) no longer work as if the method
7141             with default arguments is just one method. For example, previously
7142
7143               %ignore foo(int);
7144
7145             would have ignored the method completely. Now it will only ignore foo(int) but
7146             not the extra foo() method. Instead use:
7147
7148               %ignore foo;
7149
7150             to ignore them all. or
7151
7152               %ignore foo(int);
7153               %ignore foo();
7154
7155             This of course allows one to fine tune the wrapping, for example one could use:
7156
7157               %rename(fooint) foo(int);
7158               %rename(foodefaults) foo();
7159               void foo(int val=0);
7160
7161             and call them from any language like so:
7162
7163               fooint(200)
7164               foodefaults()
7165
7166             or for example ignore the extra overloaded method, so the defaults cannot be used:
7167
7168               %ignore foo();
7169               void foo(int val=0);
7170
7171                       *** POTENTIAL INCOMPATIBILITY ***
7172
7173 10/2/2004: mmatus
7174            [Python]
7175            - More cleaning up and uniformation on the Python Lib
7176
7177            - Added Robin's docstring patch, plus some fixes, plus
7178              some extensions, see autodoc.i example in the test-suite,
7179              and try using %feature("autodoc","extended").
7180             
7181              This patch is not a complete solution for the
7182              documentation problem, just enough to inform python about
7183              the parameter list.
7184
7185              The expected swig documentation support is far far away yet.
7186              
7187
7188 10/1/2004: mmatus
7189            - Fix the %callback feature (only used in ruby and python examples,
7190              by now, but it should be generic), now member callbacks
7191              are working again
7192              
7193            - Fix wrapping of functions pointers like
7194
7195                  std::ostream& std::endl(std::ostream&);
7196
7197              ie, the ones that return references or enums.
7198          
7199            [Python] Add the %pythoncallback directive, which is 
7200            an improved version of %callback, ie,
7201
7202              %pythoncallback(1) foo;
7203              %pythoncallback(1) A::bar;
7204              %pythoncallback(1) A::barm;
7205
7206              int foo(int a) {
7207                  return a;
7208              }
7209   
7210              struct A 
7211              {
7212                static int bar(int a);
7213                int barm(int a);
7214
7215              };
7216
7217              int foobar(int a, int (*pf)(int a));
7218
7219            in python you can use
7220
7221              foo(2)
7222              foobar(2,foo)
7223              A.bar(2)
7224              foobar(2,A.bar)
7225           
7226            ie, no additional pointer elements are created, and
7227            the original 'foo' and 'A.bar' can be used as parameters.
7228
7229            In the case of member fucntion however, still you need
7230            to use the special variable Class::<fnc_name>_cb_ptr, ie:
7231
7232              foobarm(3, a, A.barm_cb_ptr)
7233            
7234            we will try to fix this situation also, but later.  
7235
7236            [Python] Add more elements from the STL library, now
7237            you can use
7238
7239              import std
7240              std.cout << "hello " << 123 << std.endl
7241
7242            [Python] Fix in/out return mechanism, now swig will behave
7243            as 1.3.21 but using a python list when needed. The problem
7244            is that the types std::pair,std::vector,etc, use tuples,
7245            and they interfer with the previous inout tuple type.
7246
7247            By using lists we solve the conflicts, swig acts as before,
7248            but returns a list when more than one parameter are using
7249            the OUT typemap. See the new inout.i example in the
7250            test-suite.
7251
7252             *** POTENTIAL INCOMPATIBILITY FOR PYTHON MODULE ***
7253                    
7254            [Python] Much better error messages for bad arguments, now
7255            you always get the argument number where the error occurred.
7256
7257 09/27/2004: wsfulton
7258             Patch from Bill Clarke -
7259             1) Warning emitted when -importall and -includeall is used together,
7260                with -includeall taking precedence.
7261             2) Ensure SWIGIMPORTED is always defined when a file is being
7262                imported with %import. Note that this is not the same as SWIGIMPORT,
7263                which gets defined in all generated wrapper files.
7264
7265 09/26/2004: mmatus
7266
7267             - add %feature("exceptionclass") to identify a class used
7268               as exception. Before swig identified and marked a class
7269               using the "cplus:exceptionclass" attribute. However, the
7270               class needed to appear on an throw() statement.  Now
7271               swig keeps trying to identify the exception classes, as
7272               before, but it also allows the user to mark a class by
7273               using the %feature explicitly. (mostly relevant for
7274               python and chicken)
7275
7276             [Python]
7277
7278             - fix -modern option + exceptions, which mix old class
7279               style with the new one. So, we always need to emit
7280               the "nonmodern" python code.
7281
7282             - add the "python:nondynamic" feature and its handler
7283
7284               now if you have
7285               
7286               %pythonnondynamic(1) A;
7287               
7288               struct A {
7289                int a;
7290                int b;
7291               };
7292
7293               then, in the python side
7294               
7295               aa = A()
7296               
7297               aa.a = 1 # ok
7298               aa.b = 2 # ok
7299               aa.c = 3 # error, the class can not be extended dynamically.
7300
7301             
7302             Since this is a feature, you can use
7303
7304               %pythonnondynamic(1);
7305
7306             or 
7307
7308               %pythondynamic(0); [ Note: %pythondynamic since deprecated ]
7309    
7310             to force all the wrapped classes to be "nondynamic" ones.
7311
7312             The default, as in regular python, is that all the wrapped
7313             classes are dynamics. So, careful with your spelling.
7314
7315 09/14/2004: mmatus 
7316             - Support the -I- option.
7317
7318             - Differentiate between %include <file> and %include "file".
7319               This fix several corner cases.
7320
7321             
7322             [Python] Several patches:
7323
7324             - Normalize the Lib file names: 
7325                 *.swg internal files, 
7326                 *.i   user files.
7327
7328             - Fix Char[ANY] typemaps, so they also delete any extra '\0' chars,
7329               now they behave as before (1.3.21). Still, you can use
7330               the SWIG_PRESERVE_CARRAY_SIZE macro if you need to
7331               preserve the original size (see pystrbase.swg).
7332
7333             - Add the Char FIXSIZE[ANY] typemaps, to preserve the
7334               original C array sizes (see above). Though, you can't
7335               use them yet since %apply and arrays are not working
7336               together.
7337
7338             - Add pyfragments.swg, now the user can add fragments
7339               to override the default ones.
7340
7341 09/10/2004: wsfulton
7342             Patch from Bill Clarke which fixes spurious preprocessor bug which
7343             shows on Solaris and gcc, eg:
7344                 Warning(202): Could not evaluate '!defined(SWIGJAVA) &&
7345                 !(defined(SWIGCSHARP)'
7346             Also fixes a bug where '#if "a" == "b" == 1' wouldn't have worked 
7347
7348 09/10/2004: wsfulton
7349             Restored multiple build directories for the test-suite. Patch from
7350             Bill Clarke.
7351
7352 09/06/2004: wsfulton
7353             Added the missing runtime.dsp Visual Studio project files for the
7354             import examples to work.
7355
7356
7357 Version 1.3.22 (September 4, 2004)
7358 ==================================
7359
7360 09/03/2004: wsfulton
7361             The swig.m4 macro for use with the Autoconf/Automake/Libtool has
7362             been removed and is no longer installed. Please use the new and better
7363             maintained version derived from swig.m4 in the Autoconf macro archive.
7364             See http://www.gnu.org/software/ac-archive/htmldoc/ac_pkg_swig.html and
7365             http://www.gnu.org/software/ac-archive/htmldoc/ac_python_devel.html.
7366
7367 09/01/2004: wsfulton
7368             [Perl] Applied patch #1019669 from Christoph Flamm. Adds support
7369             for %feature("shadow") in the same way as it works in Python. This
7370             enables one to override the generated shadow/proxy methods, including
7371             constructors and destructors. For example:
7372
7373               /* Let's make the constructor of the class Square more verbose */
7374
7375               %feature("shadow") Square(double w)
7376               %{
7377                 sub new {
7378                   my $pkg = shift;
7379                   my $self = examplec::new_Square(@_);
7380                   print STDERR "Constructed an @{[ref($self)]}\n";
7381                   bless $self, $pkg if defined($self);
7382                 }
7383               %}
7384
7385               class Square {
7386               public:
7387                 Square(double w);
7388                 ...
7389               };
7390
7391 08/31/2004: mmatus 
7392             [Python] Incompatibility reported by Bill Clarke (llib@computer.org):
7393             
7394             If you are using Sun Studio 8 (and possibly earlier
7395             versions) to compile the output produced by swig
7396             1.3.22rc1, and you are using C++ and STL templates then
7397             you need to use either "-runtime" or "-noruntime".  If you
7398             use neither of these options then you will probably get
7399             compiler errors when trying to compile the wrapper file;
7400             the error message will be like this: The name
7401             SWIG_Python_ConvertPtr[...] is unusable in static
7402             swigpy::traits_asptr[...]  If you get this error message,
7403             you need to regenerate your wrapper file using 'swig
7404             -runtime' or 'swig -noruntime'.
7405
7406             You shouldn't get this problem with Sun Studio 9.
7407
7408             *** POTENTIAL INCOMPATIBILITY FOR PYTHON MODULE ***
7409             
7410 08/26/2004: wsfulton
7411             [Perl] Applied #932333 from Ikegami Tsutomu. Fixes long long *OUTPUT
7412             and unsigned long long *OUTPUT typemaps in typemaps.i.
7413
7414 08/26/2004: wsfulton
7415             Applied patch #857344 from Art Yerkes. Workaround for autoconf bug when
7416             running 'make install'.
7417
7418 08/26/2004: wsfulton
7419             [Perl] Part of patch #982753 applied. This implements a %perlcode directive.
7420             It allows one to add Perl code to the generated .pm file. Works the same 
7421             as %pythoncode.
7422
7423 08/26/2004: wsfulton
7424             [Java] Fix for directors when wrapping virtual methods with exception
7425             specifications that were not simple types. Previously code was generated that
7426             didn't compile, for example when the exception specification was a pointer.
7427
7428 08/25/2004: wsfulton
7429             [C#] Typemap fix for methods that return char *. The CLR would incorrectly
7430             delete the memory pointed to by char *. Also applied the same correction to
7431             the char array typemaps.
7432
7433 08/24/2004: wsfulton
7434             Fixes for -fmicrosoft error/warning message display: 
7435             - End of file (EOF) warning messages not displaying in correct format
7436             - Some messages containing a file path were displaying a double backslash
7437               instead of a single backslash
7438
7439 08/23/2004: wsfulton
7440             Applied patch #1011604 submitted by Charles Schwieters. Fix for 64 bit tcl
7441             interpreters.
7442
7443 08/23/2004: wsfulton
7444             Fix for bug #875583 - enum forward declarations previously gave a syntax error.
7445
7446 08/23/2004: mkoeppe
7447             [Allegro CL] Use typemaps "ffitype" and "lisptype" to determine the FFI type
7448             specifiers from the C type.  This makes it possible, for instance, to control
7449             whether a C "char" argument takes a Lisp character or a Lisp integer value.
7450             The default (taking Lisp characters) is done by these built-in typemaps:
7451               %typemap(ffitype) char ":char"; %typemap(lisptype) char "character";
7452             If char means an integer instead, use these typemaps:
7453               %typemap(ffitype) char ":char"; %typemap(lisptype) char "integer";
7454
7455 08/22/2004: wsfulton
7456             As discussed in bug #772453, the SWIG library directory is now installed
7457             into a different default directory. The library used to be installed to
7458             /usr/local/lib/swig1.3. It is now in the more usual architecture independent
7459             directory and I have additionally used a version specific subdirectory as
7460             the library will rarely work with older versions of SWIG. This release
7461             will thus use /usr/local/share/swig/1.3.22 by default, which can be
7462             tailored as before using './configure --swiglibdir'.
7463
7464 08/17/2004: mkoeppe
7465             [MzScheme] Add support to create native MzScheme structures from C structures.
7466             To convert a C structure to an MzScheme structure, use the new runtime macro
7467             SWIG_NewStructFromPtr in a typemap.  Patch from Dmitriy Zavin. 
7468
7469 08/12/2004: wsfulton
7470             Patch #837715 from Ben Reser to correctly detect Python lib directory
7471             on 64 bit systems.
7472
7473 08/12/2004: wsfulton
7474             [C# and Java] Prevent memory leaks in the case of early return
7475             from wrapper methods using const std::string & parameters. Modified
7476             Mark Traudt patch #951565.
7477
7478 08/12/2004: wsfulton
7479             Bug #943783 with patch fixes php char * out typemap NULL values.
7480
7481 08/03/2004: Ahmon Dancy  <dancy@dancy>
7482
7483             [allegrocl] Additional case mode fixes.  Also, make sure
7484             foreign types are exported.
7485
7486 07/24/2004: mkoeppe 
7487             [Guile] In -scm mode, SWIG modules now exchange their pointer type
7488             information via the Guile interpreter.  It is no longer necessary to build a
7489             runtime library or to use -noruntime and -runtime etc.
7490             
7491             The module (Swig swigrun) which was introduced in the change of 05/17/2004 is
7492             no longer automatically built.  If you need it, run SWIG on the interface file
7493             swigrun.i. 
7494
7495 07/23/2004: wsfulton
7496             [C#] Bug #917601 Mapping C++ bool fix from Mark Traudt
7497
7498 07/23/2004: wsfulton
7499             RPM fixes for latest CVS version including removal of runtime
7500             library.
7501
7502 07/23/2004: wsfulton
7503             Patch #908955 from Robert H De Vries.
7504             RPM file generation fix for Fedore Core 1 and Redhat AS2.1.
7505
7506 07/12/2004: wsfulton
7507             Patch #864689 from Robin Dunn:
7508
7509             This patch corrects two problems in the XML output of SWIG:
7510              
7511               1. There were often extra '/>\n' in the output.
7512               
7513               2. value attributes were output with '\n' in them but
7514               since that is not technically legal most (all?) XML
7515               parsers will strip them out. Replacing the '\n' with
7516               the '&#10;' entity reference solves this as that is
7517               legal and XML parsers will convert it to a '\n' when
7518               reading the values back in.
7519               
7520               This patch also adds a new global command line option
7521               that will allow the parse tree to be written out in XML
7522               *after* some other language module has been run, in
7523               order to be able to get extra info that the language
7524               module puts in the tree. In this way the XML is a
7525               post-processed version of the tree rather than a
7526               pre-processed version. 
7527  
7528               Command line option is -dump_xml or -xmlout <file>
7529
7530 07/12/2004: wsfulton
7531             [Java] Patch from Scott Michel to fix typesafe enums and proper enums
7532             with directors.
7533
7534 07/12/2004: wsfulton
7535             HTML documentation (makechap.py) file generator missing end of line
7536             patch #908951 from Robert de Vries.
7537
7538 07/08/2004: wsfulton
7539             The deprecated runtime library build has been removed. This also removes
7540             the dependency on Libtool. Libtool is no longer required to build SWIG.
7541             The associated -ldflags SWIG commandline option has also been removed.
7542
7543             The examples and test-suite testcases that used the runtime library have
7544             been updated to use the replacement approach to using SWIG across 
7545             multiple modules, that is they use the -noruntime and -runtime commandline
7546             options, see Modules.html. Effectively they build their own runtime
7547             libraries using -runtime. The examples are import and import_template.
7548             The test cases are in the imports and template_typedef_import directories.
7549
7550             Anyone who wants the original runtime libraries can either run the test-suite
7551             or build the examples and use the appropriate shared object/DLL that is
7552             generated with the -runtime commandline option. For example libimports_runtime.so
7553             (Python calls it lib_imports_runtime.so) is generated after running the 
7554             'make imports.multicpptest' testcase in the Examples/test-suite/<lang>
7555             directory. Or use libruntime.so / runtime.dll after building the import
7556             examples in Examples/<lang>/import.
7557
7558 07/07/2004: mkoeppe
7559             [Allegro CL] Convert character and string literals in constants to 
7560             CL syntax.  Fix FF:DEF-FOREIGN-CALL for mixed-case C functions.
7561
7562 06/27/2004: wsfulton
7563             [Java] New feature for Java exceptions with format %javaexception(exceptionclasses).
7564             This feature is a slight enhancement to %exception and the only difference is the 
7565             addition of the exception classes which are generated into a throws clause.
7566             The 'exceptionclasses' is a comma separated list of classes which will be
7567             added to the associated proxy method's throws clause. The 'exceptionclasses'
7568             are specified like the exception classes in the 'throws' attribute in the
7569             typemaps. This feature should be used for correctly handling checked exceptions
7570             thrown from JNI code. For example:
7571
7572               %javaexception("java.lang.Exception") throwException %{
7573                 ... convert a std::logic_error into a java.lang.Exception using JNI code ...
7574               %}
7575
7576               #include <stdexcept>
7577               void throwException() {
7578                 throw std::logic_error("Logic error!");
7579               }
7580
7581             will generate a method with a throws clause in the module class:
7582
7583               public static void throwException() throws java.lang.Exception { ... }
7584
7585 06/27/2004: wsfulton
7586             [C#] New %csconstvalue(value) feature directive for use with constants and
7587             enums. This works the same way as %javaconstvalue. For C#, this directive
7588             is the only way that one can fix wrapping of C/C++ enums with proper C#
7589             enums if the enum item's initialiser cannot compile as C# code. This is
7590             because Java enums can use a call into C code to initialise the enum item,
7591             whereas in C#, the enum value must be a compile time constant. That is,
7592             using %csconst(0) cannot be used in C# to initialise the C# enum item via
7593             a PINVOKE call.
7594
7595 06/27/2004: wsfulton
7596             [Java] New %javaconstvalue(value) feature directive for use with constants and
7597             enums. Sometimes the use of %javaconst(1) will produce code that won't compile
7598             under Java. If a compile time constant is required, %javaconst(0) is not an
7599             option. The %javaconstvalue directive achieves this goal and the value specified
7600             is generated as Java code to initialise the constant.  For example:
7601
7602               %javaconst(1);
7603               %javaconstvalue(1000) BIG;
7604               %javaconstvalue("new java.math.BigInteger(\"2000\")") LARGE;
7605               %javaconstvalue(10) bar;
7606               %{
7607                 const int bar = 10;
7608               %}
7609               %inline %{
7610                 #define BIG 1000LL
7611                 #define LARGE 2000ULL
7612                 enum Foo { BAR = ::bar };
7613               %}
7614
7615             Generates:
7616
7617               public interface exampleConstants {
7618                 public final static long BIG = 1000;
7619                 public final static java.math.BigInteger LARGE = new java.math.BigInteger("2000");
7620               }
7621               public final class Foo {
7622                 public final static Foo BAR = new Foo("BAR", 10);
7623                 ...
7624               }
7625
7626             Previously, none of BIG, LARGE or BAR would have produced compileable code
7627             when using %javaconst(1).
7628
7629 06/27/2004: wsfulton
7630             %feature enhancements. Features can now take an unlimited number of attributes
7631             in addition to the feature name and feature value. The attributes are optional 
7632             and are much the same as the typemap attributes. For example, the following
7633             specifies two optional attributes, attrib1 and attrib2:
7634
7635              %feature(featurename, attrib1="attribval1", attrib2="attribval2") name "val";
7636              %feature(featurename, val, attrib1="attribval1", attrib2="attribval2") name;
7637
7638 06/27/2004: wsfulton
7639             %feature improvements for the syntax that takes the feature value within the
7640             %feature() brackets. The value specified is no longer restricted to being just
7641             a string. It can be a string or a number. For example, this is now acceptable
7642             syntax:
7643               %feature("featurename",20.0);
7644             whereas previously it would have to have been:
7645               %feature("featurename","20.0");
7646             Useful for features that are implemented as a macro, for example:
7647               #define %somefeature(value)      %feature("somefeature",value)
7648             These will now work accepting either a string or a number:
7649               %somefeature("Fred");
7650               %somefeature(4);
7651
7652 06/06/2004: wuzzeb (John Lenz)
7653             [Chicken, Guile]
7654              - Created the Examples/test-suite/schemerunme directory, which holds all the
7655                runme scripts for guile and chicken (and possibly mzscheme...).  The guile
7656                and chicken _runme files then (load "../schemerunme/foo.scm").
7657              - In chicken module, fix a few bugs invlolving dynamic casts.
7658
7659 06/03/2004: wsfulton
7660             Patch to fix wrapping of templated methods. ISO compliant compilers, like
7661             Comeau and GCC-3.4.0, don't like the template specifier that SWIG was generating
7662             when calling the method. This fix may break some non standard compliant compilers,
7663             for example, Sun workshop compilers prior to version 6.2.p2. Patch submitted
7664             by Bill Clarke.
7665
7666 06/03/2004: wsfulton
7667             [Java, C#] Undocumented special variable $imclassname removed.
7668             New special variable $module is replaced by the module name, as specified
7669             by %module or -module commandline option. $imclassname can be created from $module.
7670
7671 06/03/2004: wsfulton
7672             [C#] Same as for Java below. The new typemaps are named differently, namely,
7673             csbody and csbody_derived. The deprecated typemaps are csgetcptr and
7674             csptrconstructormodifiers.
7675
7676             *** POTENTIAL INCOMPATIBILITY FOR C# MODULE ***
7677
7678 06/03/2004: wsfulton
7679             [Java] Typemap changes for the Java proxy / typewrapper and enum classes. A new
7680             typemap called javabody contains the essential support code for generation into the body
7681             of these classes. There is also a new javabody_derived typemap which is used instead for
7682             wrapped classes that have a wrapped base class. The code is basically, the getCPtr()
7683             method and swigCPtr and swigCMemOwn member variables. These used to be hard coded
7684             with no way to modify the code. The introduction of this typemap makes it possible for
7685             the user to tailor nearly every aspect of the code generation.
7686             The exception now is the code for director classes.
7687
7688             The javagetcptr and javaptrconstructormodifiers typemaps are deprecated and are
7689             no longer used as the code that these generated can be put in the more flexible
7690             javabody and javabody_derived typemaps.
7691
7692             *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
7693
7694             The following macros contributed by Scott Michel may help you upgrade if you have used
7695             the javagetcptr typemap:
7696
7697                 /* Utility macro for manipulating the Java body code method attributes */
7698                 %define SWIGJAVA_ATTRIBS(TYPENAME, CTOR_ATTRIB, GETCPTR_ATTRIB)
7699                 %typemap(javabody) TYPENAME %{
7700                   private long swigCPtr;
7701                   protected boolean swigCMemOwn;
7702
7703                   CTOR_ATTRIB $javaclassname(long cPtr, boolean cMemoryOwn) {
7704                     swigCMemOwn = cMemoryOwn;
7705                     swigCPtr = cPtr;
7706                   }
7707
7708                   GETCPTR_ATTRIB static long getCPtr($javaclassname obj) {
7709                     return (obj == null) ? 0 : obj.swigCPtr;
7710                   }
7711                 %}
7712
7713                 %typemap(javabody_derived) TYPENAME %{
7714                   private long swigCPtr;
7715
7716                   CTOR_ATTRIB $javaclassname(long cPtr, boolean cMemoryOwn) {
7717                     super($moduleJNI.SWIG$javaclassnameUpcast(cPtr), cMemoryOwn);
7718                     swigCPtr = cPtr;
7719                   }
7720
7721                   GETCPTR_ATTRIB static long getCPtr($javaclassname obj) {
7722                     return (obj == null) ? 0 : obj.swigCPtr;
7723                   }
7724                 %}
7725                 %enddef
7726
7727                 /* The default is protected getCPtr, protected constructor */
7728                 SWIGJAVA_ATTRIBS(SWIGTYPE, protected, protected)
7729
7730                 /* Public getCPtr method, protected constructor */
7731                 %define PUBLIC_GETCPTR(TYPENAME)
7732                 SWIGJAVA_ATTRIBS(TYPENAME, protected, public)
7733                 %enddef
7734
7735                 /* Public getCPtr method, public constructor */
7736                 %define PUBLIC_BODYMETHODS(TYPENAME)
7737                 SWIGJAVA_ATTRIBS(TYPENAME, public, public)
7738                 %enddef
7739
7740 06/03/2004: wsfulton
7741             [Java, C#] The contents of the class modifier typemaps and pragmas have changed.
7742             They must now include the class type. Previously 'class' was hard coded.
7743             This change enables flexibility into what type of class is generated,
7744             for example the proxy class could be an interface instead of a class.
7745
7746             For Java this affects the javaclassmodifiers typemap and the jniclassclassmodifiers
7747             and moduleclassmodifiers pragmas.
7748
7749             For C# this affects the csclassmodifiers typemap and the imclassclassmodifiers
7750             and moduleclassmodifiers pragmas.
7751
7752             Unless you have overridden the default versions of these typemaps or pragmas, you
7753             shouldn't be affected. However, if you have, upgrading is easy, for example
7754
7755                 class Foo {};
7756                 %typemap(javaclassmodifiers) Foo "public final"
7757
7758             must now be:
7759
7760                 class Foo {};
7761                 %typemap(javaclassmodifiers) Foo "public final class"
7762
7763
7764             *** POTENTIAL INCOMPATIBILITY FOR C# MODULE ***
7765             *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
7766
7767 05/31/2004: wsfulton
7768             Fix for C++ exception specifications that are references. Problem reported by
7769             Oren Miller. Also improves the generated exception declarations in the
7770             catch handler for pointers - a pointer is used instead of a reference to
7771             a pointer. Added default throws typemaps for SWIGTYPE &, SWIGTYPE * and
7772             SWIGTYPE[ANY] (Java and C#).
7773
7774 05/31/2004: wsfulton
7775             [Java, C#] Some minor typesafe enum improvements, including storing the name of
7776             the enum item. The toSring() / ToString() methods are overridden to return this name.
7777
7778 05/30/2004: wuzzeb (John Lenz)
7779             [Chicken] 
7780              - Update how examples and the test suite are built.
7781              - Symbol names are no longer converted to lower case
7782              - Added union_runme.ss, which was copied and modified from the guile module
7783
7784 05/26/2004: lballabio (Luigi Ballabio)
7785             Committed on behalf of Marcelo (who still has problems with 
7786             the SourceForge CVS.)
7787
7788             Added Python typemaps for FILE* with (Python-only) test.
7789
7790 5/24/2004:  dancy
7791
7792         * Allegro CL module:  Now using some macros (defined in
7793         Lib/allegrocl/allegrocl.swg), swig-defconstant and swig-defun, for
7794         defining constants and foreign functions.  This makes the
7795         generated file a bit neater.    
7796
7797         Now strips a layer of parenthesis from constants.
7798
7799         Uses (* :void) instead of :foreign-address now.
7800
7801 05/20/2004: wsfulton
7802             Unnamed enum global variables are now supported in addition
7803             to the recently added support for unnamed enum member variables.
7804             For example:
7805
7806                 struct Foo {
7807                   enum { enum1, enum2 } MemberInstance;
7808                 };
7809                 enum { enum3, enum4 } GlobalInstance;
7810
7811             The int typemaps are used for wrapping the get/set accessor methods.
7812             If the sizeof an enum is not the same size as an int then setting the
7813             variable will silently do nothing as the casts cannot be easily and portably
7814             generated. If you need to solve this highly obscure situation, write
7815             the assignment using the %exception feature.
7816
7817 05/20/2004: wsfulton
7818             [C#] C# enum wrapping mods. Similar to the Java module, enums can be wrapped using
7819             one of 3 approaches:
7820
7821             1) Proper C# enums - use %include "enums.swg"
7822             2) Typesafe enums - use %include "enumtypesafe.swg"
7823             3) Simple constant integers (original approach) - use %include "enumsimple.swg"
7824
7825             See each of these files for further details. Each of these files use typemaps
7826             and a new feature to control the generated code. The feature is:
7827
7828                 %csenum(wrapapproach);
7829
7830             where wrapapproach should be one of: "proper", "typesafe", "typeunsafe" or "simple".
7831             [No implementation deemed necessary for type unsafe enums].
7832
7833             The default approach is proper C# enums. Anonymous enums are always wrapped by
7834             constant integers. 
7835
7836             *** POTENTIAL INCOMPATIBILITY FOR C# MODULE ***
7837
7838 05/20/2004: wsfulton
7839             [Java] Java enum support added. There are now 4 ways in which enums can be wrapped:
7840
7841             1) Proper Java enums - use %include "enums.swg"
7842             2) Typesafe enums - use %include "enumtypesafe.swg"
7843             3) Type unsafe enums (constant integers) - use %include "enumtypeunsafe.swg"
7844             4) Simple constant integers (original approach) - use %include "enumsimple.swg"
7845
7846             See each of these files for further details. Each of these files use typemaps
7847             and a new feature to control the generated code. The feature is:
7848
7849                 %javaenum(wrapapproach);
7850
7851             where wrapapproach should be one of: "proper", "typesafe", "typeunsafe" or "simple".
7852             The default typemaps will handle enums that may or may not have specified initial
7853             values, for example ten is specified:
7854
7855                 enum Numbers { zero, ten(10) };
7856
7857             However, the amount of generated Java code can be cut down, by modifying these typemaps
7858             if none of the enums have initial values (proper Java enums and typesafe enums approach).
7859             
7860             The default approach is typesafe enums. Anonymous enums are always wrapped by
7861             constant integers. 
7862
7863             *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
7864
7865 05/11/2004: wsfulton
7866             [Java, C#] Fix bug using %rename on enum items and when using
7867             %javaconst(1) / %csconst(1)
7868             For example, the following used to generate code that wouldn't compile:
7869
7870                 %rename(Obj) Object;
7871                 enum Grammar { Subject, Object };
7872
7873 04/28/2004: wsfulton
7874             [Java, C#] Minor fixes when using combinations of the 
7875             javainterfaces, javabase, csinterfaces and csbase typemaps.
7876
7877 05/18/2004: wsfulton
7878             [Java] JVM link failure on some systems fixed when using std_vector.i.
7879             Also adds default vector constructor for use from Java.
7880
7881 05/17/2004: mkoeppe (Matthias Koeppe)
7882
7883             [Guile] New runtime functions SWIG_PointerAddress,
7884             SWIG_PointerType, SWIG_IsPointerOfType, SWIG_IsPointer.
7885
7886             [Guile] In -scm mode, wrap several SWIG runtime functions
7887             and export them into the module (Swig swigrun).  The
7888             runtime module is now built with "module" linkage.
7889
7890             [Guile] GOOPS proxy objects now also print the pointer
7891             address of the C object.
7892
7893 05/14/2004: lyle
7894             Added Kou's patch for the Ruby %import directive so that modules
7895             with "nested" names are handled properly. Consider an interface
7896             file foo.i that has this %module declaration at its top:
7897
7898                 %module "misc::text::foo"
7899
7900             Now consider another interface file spam.i that imports foo.i:
7901
7902                 %import foo.i
7903             
7904             Before this patch, this would result in the following code being
7905             generated for spam_wrap.c:
7906
7907                 rb_require("misc::text::foo");
7908
7909             With this patch, however, you'll get the correct path name
7910             for the call to rb_require(), e.g.
7911
7912                 rb_require("misc/text/foo");
7913
7914             See SourceForge Bug #928299.
7915
7916 05/12/2004: wsfulton
7917             Patch for emitting directors when %feature("director") specified
7918             for a class with no virtual methods, but does have a virtual destructor.
7919             Submitted by Kevin Smith.
7920
7921 05/06/2004: mkoeppe (Matthias Koeppe)
7922             New SWIG runtime function SWIG_TypePrettyName, which 
7923             returns an unmangled type name for a swig_type_info
7924             object. 
7925
7926             [Guile]: Use it for printing pointer objects.
7927
7928 05/03/2004:  dancy (Ahmon Dancy)
7929
7930         * Lib/allegrocl/allegrocl.swg:  Updated comments about identifer
7931         conversion.  
7932
7933         * Sources/Modules/allegrocl.cxx:  Register /dev/null for "header"
7934         target.   Also, disregard "const" qualifiers during type
7935         conversion.  
7936
7937         
7938 05/02/2004: wuzzeb (John Lenz)
7939             [Chicken] Fix bug 782468.
7940             To fix this bug, the runtime code has been rewritten, and
7941             pointers are now represented as a C_SWIG_POINTER_TYPE.
7942
7943             Chicken version > 1.40 is now required!
7944
7945             * Typemap incompatibility:  typemaps no longer use chicken_words.
7946               If a typemap needs some space, it should just call C_alloc
7947
7948             * argout typemaps no longer use the /* if ONE */ construct to
7949               build an output list.  A SWIG_APPEND_VALUE macro, exactly like
7950               guile and mzscheme is now used.
7951
7952 04/25/2004: mkoeppe (Matthias Koeppe)
7953             [Guile] In the generated GOOPS code, don't create methods
7954             that would not specialize any arguments; simply re-export
7955             the primitive functions.  (This is a performance
7956             optimization which reduces load time and execution time.)
7957
7958             [Guile] In -gh mode, fix the "too many initializers" error
7959             which was caused by an incompatible swig_type_info layout.
7960
7961             [Guile] The typemap for FILE * in ports.i now also accepts
7962             a regular FILE * pointer object.  Also a bug with Scheme
7963             file ports that are open for input and output has been
7964             fixed. 
7965
7966 04/25/2004: wsfulton
7967             Change entry 03/21/2004 revoked. The change introduced another
7968             inconsistency (reference typemaps beings used instead of
7969             pointer typemaps for member variables as well as static
7970             member variables and global variables for some languages,
7971             but only for C++ and not C). This would break user's current
7972             typemaps and introduce further inconsistencies. Alternative
7973             solution required and being discussed.
7974
7975 04/10/2004: mmatus (Marcelo Matus) 
7976             
7977             Added the -directors flag. This enables the director
7978             mode for the interface and all the classes that
7979             don't set the "feature:nodirector" explicitly.
7980
7981             You can use this in your module if you want to use the
7982             director feature in all your classes, but it is most
7983             intended for testing purposes, like:
7984
7985               make check-python-test-suite SWIG="../../../swig  -directors"
7986               make check-ruby-test-suite SWIG="../../../swig  -directors"
7987               make check-java-test-suite SWIG="../../../../swig  -directors"
7988
7989             These commands will run the entire test-suite using
7990             directors, and not only the specific 'directors_*'
7991             cases. This should be done from time to time.
7992
7993 04/10/2004: mmatus (Marcelo Matus) 
7994             
7995             [python] Added support for std::wstring and wchar_t,
7996             for compiler and python versions that support them.
7997             
7998             When needed, use 
7999
8000              %inlcude std_string.i      // 'char' strings
8001              %inlcude std_wstring.i     // 'wchar_t; strings
8002             
8003
8004 04/10/2004: mmatus (Marcelo Matus) 
8005             
8006             [python] Fix the default behaviour (seg. fault) when an
8007             inplace operator (+=,-=,...) was wrapped, as reported by
8008             Lucriz (lucriz@sitilandia.it), when the most common
8009             form was used:
8010
8011                    A&  A::operator+=(int i) { ...; return *this; }
8012                   ^^^^                                    ^^^^^^
8013             
8014
8015             ie, an object is returned and its contains the same 'this'
8016             value than the input object, which is deleted after the
8017             operation "a += b", leaving the result with no real
8018             object, but a seg. fault.
8019
8020             To fix it, we needed to introduce a new feature and use an
8021             old one:
8022
8023                %feature("self:disown") A::operator+=;
8024                %feature("new") A::operator+=;
8025             
8026             here, "self:disown" disable the ownership of the 'self'
8027             or input object, and the "new" feature transfers the
8028             ownership to the result object.
8029             
8030             The feature/solution could also be used in other languages
8031             that use gc and implement the inplace operators, or other
8032             operators, in a similar way.
8033
8034             *** POTENTIAL INCOMPATIBILITY FOR Python MODULE ***
8035
8036             If you already are using the inplace operators in python,
8037             and you implemented some kind of workaround to the problem
8038             fixed here, it is possible you could end with 'free'
8039             objects that never get deleted. If that is the case, and
8040             you want to disable the current fix, use:
8041
8042                %feature("self:disown","") A::operator+=;
8043                %feature("new","") A::operator+=;
8044
8045
8046 04/07/2004: cheetah (William Fulton)
8047             [C#] C++ enums are no longer wrapped by integers, they are now wrapped by 
8048             C# enums. For Example, given C++:
8049
8050                 enum AnEnum { foo, bar };
8051                 typedef AnEnum AnEnumeration;
8052                 void something(AnEnum e, AnEnumeration f);
8053
8054             The following is generated:
8055
8056                 public enum AnEnum {
8057                   foo,
8058                   bar
8059                 }
8060                 public static void something(AnEnum e, AnEnum f) {...}
8061
8062             Note that a global enum like AnEnum above is generated into its own
8063             file called AnEnum.cs. Enums defined within a C++ class are defined
8064             within the C# proxy class. Some of the typemaps for modifying C# proxy
8065             classes also work for enums. For example global enums can use
8066
8067                 %typemap(csimports) to add in extra using statements.
8068
8069             Global enums and class enums can use
8070
8071                 %typemap(csclassmodifiers) to make the enum private, public etc.
8072                 %typemap(csbase) to change the underlying enum type (enum base)
8073
8074             If we add this for the above example:
8075
8076                 %typemap(csclassmodifiers) AnEnum "protected"
8077                 %typemap(csbase) AnEnum "long"
8078
8079             the following is generated:
8080             
8081                 protected enum AnEnum : long {
8082                   foo,
8083                   bar
8084                 }
8085
8086             *** POTENTIAL INCOMPATIBILITY FOR C# MODULE ***
8087
8088 04/07/2004: cheetah (William Fulton)
8089             Seg fault fix for empty enums, like
8090                 enum Foo {};
8091
8092 03/21/2004: mmatus
8093             [Note: this change revoked on 04/25/2004]
8094             [Python] Makes the following 'var' cases more uniform:
8095
8096                 std::string ga;
8097  
8098                 struct A {
8099                   static std::string sa;
8100                   std::string ma;
8101                 };
8102
8103
8104             now the three variables (ga, sa, ma) can be assigned as:
8105
8106
8107                   cvar.ga = "hello";
8108                   A.sa = "hello";
8109                   a.ma = "hello";
8110
8111             ie, now 'ma' will also use a std::string typemap 'in' if
8112             defined, before it was only accepting a 'p_std_string'
8113             pointer.  Note, however, that 'ma' will not use the
8114             'varin/varout' typemaps (that probably could be more
8115             natural), but it will pick up the 'in' typemap for const
8116             std::string& (which is easier).
8117
8118             The changes in cwrap.c and lang.cxx will probably fix the
8119             behaviour in other languages that do not overload the
8120             membervarHandler method "too much".
8121  
8122             
8123 03/21/2004: mmatus
8124             [Python] Disabling the default instantiations like:
8125
8126               %template() std::pair<int,int>;
8127
8128             for all the primitive types and STL containers/classes.
8129             They are expensive, specially for pair and map, and the
8130             previous behaviour also requires the user to perform
8131             manual instantiations. Still, if the speed difference is
8132             not important, it can be re-enabled by defining the macro
8133             SWIG_STD_DEFAULT_INSTANTIATION (see std_common.i).
8134
8135             Also, normalizing the INPUT/OUTPUT/INOUT typemaps. Now
8136             they use the same conversors than the rest of the
8137             typemaps, and you can use them for std::pair, std::string
8138             and all the other STL types, like in:
8139
8140               void p_inoutd(std::pair<double, double> *INOUT);
8141
8142             Added the attribute.i and implicit.i files with macros to
8143             transform functions pairs like 'set_x'/'get_x' 
8144             (or 'T& x()'/'const T& x() const') into an attribute,
8145             and allowing the use of implicit constructors in typemaps
8146             (see the files for more details).
8147
8148 03/21/2004: mkoeppe
8149             [Guile] Fix the documentation strings of functions with
8150             anonymous arguments.
8151
8152 03/18/2004: mmatus
8153             [Python] More general std_string.i interface.
8154             Now you can wrap it using
8155
8156               %template(string) std::basic_string<char>;
8157
8158             and use the std::string as a base class:
8159
8160               struct A : std::string {
8161               };
8162
8163             But more important, swig will recognize 
8164             both std::basic_string<char> and std::string as
8165             the same type.
8166
8167 03/16/2004: mmatus
8168             Previously added, but not mentioned before:
8169
8170             - friend declaration support, swig now emits a global
8171               function in the same class scope.
8172
8173             - ref/unref features: to mix ref counting C++ classes
8174               and native script ref counting mechanisms (like in python).
8175             
8176               Use it like:
8177
8178                 %feature("ref")   RCObj "$this->ref();"
8179                 %feature("unref") RCObj "$this->unref();"
8180
8181               And the class RCObj, and all the derived ones, will
8182               perform the right ref/unref calls when a new pointer  
8183               is returned to the target language, or when the target
8184               language attempts to delete the object.
8185               
8186               See the refcount.i file in the test-suite for more
8187               details.
8188
8189             
8190 03/16/2004: mmatus
8191             [Python] Using the new %fragment support, major rewrote 
8192             of the python swig library, including:
8193
8194             - Almost automatic template/typemap instantiation for
8195               the STL components. For example, now you can write:
8196
8197                    %template(vector_i) std::vector<int>;
8198
8199               and a specialized vector_i class is emitted with all
8200               the needed typemaps. No need to use the old
8201               'specialize_vector' macros.
8202
8203               Note you can also define
8204
8205                   %template(matrix_i)   std::vector<std::vector<int> >;
8206                   %template(vector_pii) std::vector<std::pair<int,int> >;
8207
8208             - The empty template instantiation 
8209          
8210                   %template() std::vector<int>;
8211
8212               defines the vector typemaps, but no proxy class. For all the
8213               fundamental types, the empty template instantiation are
8214               defined, so, you can say
8215
8216               %include std_vector
8217
8218               int func(const std::vector<int>& a);
8219               
8220               where the proper typemap is applied to 'a', but no
8221               std::vector<int> proxy is generated.
8222               
8223
8224             - All the STL containers present a more uniform behavior and
8225               more complete interface declaration. The following are 
8226               now supported:
8227
8228                   std::vector<T>
8229                   std::list<T>
8230                   std::deque<T>
8231                   std::set<T>
8232                   std::multiset<T>
8233                   std::map<T>
8234                   std::multimap<T>
8235               
8236               not a container, but also supported:
8237
8238                   std::pair<T,U>
8239
8240               also, more typemaps are defined for all of them,
8241               including varin, varout, typecheck, etc.
8242
8243             - Initial attempt to implement the STL containers
8244               considering allocators, ie:
8245
8246                   std::vector<T,A>                      
8247
8248               it is partially working, but it is just a workaround
8249               while swig improves its template type support.
8250               
8251               
8252              Please test with your particular setup. It seems to be
8253              working with g++ 3.2.2, g++ 2.96, Intel icc and SGI CC
8254              compilers, plus python 1.5.2, 2.0 and 2.3, but since
8255              we are using templates, there is a chance you can find
8256              some problems when using with an old C++ compiler.
8257
8258 03/16/2004: mmatus
8259
8260             - Allowing the empty %template directive, such as
8261
8262                  %template() std::vector<int>;
8263
8264               to process the class "typedef"s and "typemap"s. Before
8265               only the internal "typedef"s were processed.
8266
8267               This makes possible to emit the default in/out
8268               typemaps without the need of wrapping an specialized
8269               vector instance.
8270
8271             - Adding the preprocessor extension #@ which mangles the
8272               following macro argument, like in:
8273
8274                 #define macro(X)  #@X
8275                 macro(int)         -> int
8276                 macro(std::string) -> std_s_s_string
8277                 
8278             - Fragments can now be "type specialized", as the typemaps. The
8279               syntax is as follows
8280  
8281                 %fragment("name","header") 
8282                   { /* a type independent fragment (old syntax) */ }
8283                 %fragment("name" {Type}, "header") 
8284                   { /* the fragment is type dependent */}
8285  
8286               Now fragments can also be used inside templates: 
8287
8288                 template <class T>
8289                 struct A {
8290                    %fragment("incode"{A<T>},"header") {
8291                       /* 'incode' specialized fragment */
8292                    }
8293  
8294                    %typemap(in,fragment="incode"{A<T>}) {
8295                       /*
8296                          here we use the 'type specialized' 
8297                          fragment "incode"{A<T>}
8298                       */
8299                     }
8300                 };
8301                                 
8302
8303 03/11/2004: cheetah (William Fulton)
8304             [Java] Director bug which meant that some virtual functions overridden in
8305             Java were not being called on some operating systems. Bug reported and fixed
8306             by Robert de Vries and Scott Michel.
8307
8308 03/02/2004: mkoeppe (Matthias Koeppe)
8309             [Guile] In -scm mode, don't forget to check the type of string arguments.
8310
8311 02/24/2004: cheetah (William Fulton)
8312             [C#] New commandline option -namespace <name>. This allows one to specify
8313             a C# namespace into which all C# classes are generated.
8314
8315 02/23/2004: mkoeppe (Matthias Koeppe) 
8316             [MzScheme] Use FUNC_NAME rather than a bogus typemap variable for signalling
8317             errors.  Call scheme_wrong_type with a zero-based argument number.  
8318             Reported by Ondrej Pacovsky, SF #902621.
8319
8320             [Guile] Define FUNC_NAME also in the dispatch wrapper for overloaded
8321             functions.  Patch by John Lenz, SF #896255.
8322
8323 02/22/2004: mkoeppe (Matthias Koeppe)
8324             [Guile] In -scm mode, don't try to invoke a null destructor function.
8325
8326 02/20/2004: cheetah (William Fulton)
8327             Fixes so that the SWIG source will compile using the Digital Mars Compiler
8328             (formerly Symantic compiler) on Windows. Submitted by Scott Michel.
8329
8330 02/13/2004: mkoeppe (Matthias Koeppe)
8331             [MzScheme] New command-line argument -noinit.  Use it for building
8332             the runtime library, where we don't want to define the functions
8333             scheme_initialize etc.  Reported by Tim Brown, SF #891754.
8334
8335             [MzScheme] Don't produce invalid C code when invoked with the
8336             -declaremodule option.  Reported by Tim Brown, SF #891108.
8337             
8338             [Guile] Build the runtime library with passive linkage, to rename
8339             the SWIG_init function uniquely.
8340
8341 02/12/2004: cheetah (William Fulton)
8342             [Java, C#] Patch submitted by Bill Hoffman which prevents SWIG from crashing
8343             when a file for the typewrapper class cannot be opened.
8344
8345 02/11/2004: cheetah (William Fulton)
8346             [Java, C#] Overloading changes:
8347               - Methods which are overloaded in const only no longer generate Java
8348                 code that won't compile - the first method parsed is used and a
8349                 warning is displayed. Note that this behaviour is slightly different
8350                 to the scripting languages which always uses the non-const method.
8351               - Warning messages 509 and 512 replaced by new warning number 516, which 
8352                 is more relevant to these statically typed languages as the overloaded
8353                 methods aren't 'shadowed', they are ignored.
8354
8355 01/23/2004: mkoeppe (Matthias Koeppe)
8356             [Guile] Replace the "known_classes" hash table by a node
8357             attribute.  Methods of classes in C++ namespaces now get
8358             the proper specializer in the GOOPS declaration.
8359             Reported by rm@mh-freiburg.de.
8360
8361 01/23/2004: mkoeppe (Matthias Koeppe)
8362             [Guile] Uniquify the argument names in GOOPS shadow method
8363             declarations.  Reported by rm@mh-freiburg.de.
8364
8365 01/21/2004: sunshine (Eric Sunshine)
8366             Revived the NextStep port of SWIG.
8367
8368             Fixed fatal problem in DohStrstr() caused by difference in strstr()
8369             implementation which made %apply become entirely dysfunctional.  On
8370             NextStep, strstr("foo","") evaluates to NULL; whereas, on modern
8371             platforms, it evaluates to "foo".  %apply relies extensively upon
8372             strstr("foo","") evaluating to non-NULL, therefore it failed
8373             catastrophically when faced with NextStep's strstr().
8374
8375             Added `bool' check to configure.in since NextStep's C++ compiler
8376             does not supply this type.  swig.h now fakes up `bool' if needed.
8377
8378             Worked around NextStep C++ compiler bug in which C++ code is
8379             disallowed inside extern "C" functions.  This problem affected all
8380             language modules, since they publish hook functions of the form:
8381                 extern "C" Language *swig_foo(void) { return new FOO(); }
8382             Fixed by creating a C++ wrapper:
8383                 static Language *new_swig_foo() { return new FOO(); }
8384                 extern "C" Language *swig_foo(void) { return new_swig_foo(); }
8385
8386             Ensured that Swig_copy_string() is used in place of strdup() since
8387             NextStep does not supply strdup().
8388
8389             Fixed detection of Ruby library name and location in configure.in.
8390             Problem 1: Assumed that library always resided in Ruby's "archdir",
8391             which was correct for Ruby 1.6.x, but which is incorrect for Ruby
8392             1.8.x, in which case the library normally resides in Ruby's
8393             "libdir".  Problem 2: Assumed that the library could always be
8394             linked via "-l"+RUBY_INSTALL_NAME (where RUBY_INSTALL_NAME
8395             typically is "ruby"), however this failed for platforms, such as
8396             NextStep, which do not support shared libraries.  In this case, the
8397             static library name in 1.8.x is libruby-static.a, thus
8398             -lruby-static is required.  The new logic works correctly for
8399             static and shared libraries for 1.6.x and 1.8.x.
8400
8401             Fixed detection of Perl CFLAGS in configure.in for NextStep.
8402             Detection code extracted CFLAGS from Perl's %Config hash but
8403             neglected to add a newline to the value before passing it through
8404             `sed'.  NextStep's ancient `sed' discards input which is not
8405             terminated with a newline, thus Perl CFLAGS always evaluated to the
8406             empty string.
8407
8408 01/16/2004: cheetah (William Fulton)
8409             Tidy up in the exception handling code that is generated when
8410             C++ exception specifications are wrapped with the throws typemap.
8411             This redundant code is no longer generated:
8412
8413                 catch(...) {
8414                     throw; 
8415                 }
8416
8417 01/12/2004: wsfulton on behalf of mmatus (marcelo matus) 
8418             if a method uses %exception and the method requires the use
8419             of the throws typemap, the code in a throws typemap will be
8420             generated inside the try body. For example:
8421
8422               %exception method {
8423                 try {
8424                   // method action 
8425                   $action
8426                 } catch (int i) {
8427                   // method int catch handler
8428                 } catch (...) {
8429                   // method generic catch handler
8430                 }
8431               }
8432               %typemap(throws) Except %{
8433                 // throws typemap Except catch handler
8434               %}
8435
8436               %inline %{
8437               class Except {};
8438               void method(int i) throw (Except);
8439
8440             Will generate:
8441
8442               {
8443                   try {
8444                       // method action 
8445                       try {
8446                           method(arg1);
8447                       }
8448                       catch(Except &_e) {
8449                           // throws typemap Except catch handler
8450                           
8451                       }
8452                       
8453                   } catch (int i) {
8454                       // method int catch handler
8455                   } catch (...) {
8456                       // method generic catch handler
8457                   }
8458               }
8459
8460
8461             As can be seen, the inner try catch block is for the throws typemaps.
8462             Previously, this was reversed so that the inner try catch block
8463             was the %exception code. In the example above, it would have been
8464             impossible to catch Except as the catch all (...) would catch the
8465             exception instead.
8466
8467 Version 1.3.21 (January 11, 2004)
8468 =================================
8469
8470 01/10/2004: cheetah (William Fulton)
8471             The output format for both warnings and errors can be selected for
8472             integration with your favourite IDE/editor. Editors and IDEs can usually
8473             parse error messages and if in the appropriate format will easily take you 
8474             directly to the source of the error. The standard format is used by 
8475             default except on Windows where the Microsoft format is used by default.
8476             These can be overridden using command line options, for example:
8477
8478                 $ swig -python -Fstandard example.i
8479                 example.i:4: Syntax error in input.
8480                 $ swig -python -Fmicrosoft example.i
8481                 example.i(4): Syntax error in input.
8482
8483 01/09/2004: beazley
8484             Fixed [ 871909 ] simple namespace problem.
8485             This was a problem using anonymous structures in a namespace.
8486             For example:
8487
8488                 namespace ns {
8489                    typedef struct  {
8490                       int n;
8491                    } S;
8492                 };
8493
8494             Reported by Josh Cherry.
8495
8496 01/09/2004: beazley
8497             Fixed some broken Perl examples.
8498
8499 12/28/2003: cheetah (William Fulton)
8500             [Java and C#] Fixes for wrapping covariant (polymorphic) return types.
8501             For example:
8502
8503                 struct Base {
8504                   virtual ~Base();
8505                   virtual Base* copy() const = 0;
8506                 };
8507                 struct Derived : Base {
8508                   virtual Derived* copy() const;
8509                 };
8510
8511             The Derived::copy proxy method returns Base not Derived. A warning is issued
8512             about this. Previously the pointer used by the proxy class was incorrectly
8513             treated as a Base* instead of a Derived*.
8514
8515 12/18/2003: cheetah (William Fulton)
8516             Fix so that Windows paths are displayed correctly when reporting errors.
8517             An error previously would have been shown something like:
8518
8519               .?xample.i:14: Syntax error in input.
8520
8521             instead of:
8522
8523               .\example.i:14: Syntax error in input.
8524
8525
8526 Version 1.3.20 (December 17, 2003)
8527 ==================================
8528
8529 12/17/2003: beazley
8530             Last minute modifications.   Perl5 module now generates shadow classes
8531             by default like all of the other modules.  PHP4 wrappers no longer
8532             include "config.h". 
8533
8534 12/14/2003: beazley
8535             Weakened warning message related to constructor names so that an
8536             unusual nested-class wrapping technique would work again (apparently
8537             it worked in some older SWIG releases).   For example:
8538
8539                class Scope {
8540                    class ClassA;
8541                    class ClassB;
8542                };
8543                class Scope::ClassA {
8544                ...
8545                };
8546                class Scope::ClassB {
8547                ...
8548                }
8549
8550             Note:  There is still some odd interaction with the SWIG symbol
8551             table/type system that will need to be looked at in a future release.
8552             Reported by Gustavo Niemeyer.
8553
8554
8555 12/11/2003: cheetah (William Fulton)
8556             [Java] Protected class methods are wrapped as protected Java methods 
8557             when using the dirprot director feature. This can be changed using
8558             %javamethodmodifiers to something else should the need arise, for
8559             example, private or package access.
8560
8561 12/11/2003: cheetah (William Fulton)
8562             [Java, C#] 
8563             %javamethodmodifiers (Java) and %csmethodmodifiers (C#) operate slightly 
8564             differently. Previously this feature had to be present to set the method
8565             modifiers. Now it is only used if it exists for the method being wrapped.
8566             The default is "public" as previous however, when wrapping protected
8567             director methods it is "protected". This change will not affect existing
8568             use of the %javamethodmodifiers or %csmethodmodifiers.
8569
8570 12/11/2003: mmatus (Marcelo Matus)
8571
8572             This fix some recurring reports about keywords not been
8573             properly identified and warned, and it solves the problem
8574             of how to add a test file to the test-suite such that it
8575             doesn't use any keyword of all the supported languages
8576             (and doing it without compiling the test for all the
8577             supported languages, thing that is not always possible,
8578             and without requiring you to know all the supported
8579             language keywords, thing that is always impossible).
8580
8581             So these are the changes globally speaking:
8582
8583             - Uniform the definition of the keyword warnings through
8584               the supported languages: all the languages has now a
8585               separate file that defines the keywords or bad names:
8586
8587                   python/pythonkw.swg
8588                   chicken/chickenkw.swg
8589                   ....
8590
8591             - Added keyword list for most of the languages that didn't
8592               have one (using the new separated file).
8593                             
8594             - Added the "All keywords" warning support: -Wallkw option.
8595
8596               This option allows you to include all the known keywords
8597               for all the supported languages, and can be used as:
8598
8599                  swig -Wallkw ....
8600             
8601               This will help to the process of adding a test-suite
8602               file that can be compiled in all the swig supported
8603               languages, and it will be also helpful for users who
8604               want to create multi-language libraries.
8605             
8606             And these are the detailed changes (mostly file addition):
8607
8608             - For the languages that already have some sort of keyword
8609               warning list, move it to an external languagekw.swg
8610               file, ie:
8611             
8612                  move keywords from python.swg -> pythonkw.swg
8613                  move keywords from chicken.swg -> chickenkw.swg
8614                  move keywords from tcl8.swg -> tclkw.swg
8615  
8616               and re-include languagekw.swg from language.swg.
8617             
8618             - For the language that didn't have a keyword list, and
8619               for the ones that I could find a list, add the
8620               languagekw.swg file, ie:
8621
8622                  csharp/csharpkw.swg
8623                  java/javakw.swg
8624                  php4/phpkw.swg
8625                  pike/pikekw.swg         
8626                  ruby/rubykw.swg
8627
8628
8629               also add a line in language.swg to include
8630               languagekw.swg, but now it is commented!!!, like in
8631               java.swg:
8632
8633                   /* java keywords */
8634                   /* please test and activate */
8635                   //%include "javakw.swg"
8636
8637               ie, there will be no change in how swig runs normally
8638               until the language maintainer test and uncomment that
8639               line.
8640               
8641               So, please check each languagekw.swg file (I left the
8642               link to the keyword list source for checking), and after
8643               testing, uncomment the %include line.
8644
8645             - Added the file allkw.swg, which includes all the
8646               languagekw.swg files.
8647
8648               For the languages that has no languagekw.swg file right
8649               now, and if they need one, add the file into the
8650               language directory, and add the corresponding include
8651               line into the allkw.swg file.
8652               
8653             - Added the -Wallkw that includes the allkw.swg file.
8654               Note that the old -lallkw.swg option couldn't be used
8655               since it include the file after it would be needed.
8656
8657
8658             Hopefully, the -Wallkw option will be added to the default
8659             rules in the related test-suite Makefiles, so, when
8660             creating a new test, or adding a new swig library file
8661             (like _std_deque.i), swig will warn you if you are using a
8662             bad name, considering all the language where it needs to
8663             run.
8664             
8665             Right now you can test it by using:
8666
8667                make check-python-test-suite SWIG="swig -Wallkw"
8668
8669             or using your favorite target language, it doesn't matter.
8670
8671             And yes, there are several examples that are using
8672             reserved keywords, specially from csharp.
8673           
8674             *** Remember ****: the new keyword warning lists are not
8675             included by default in any of language that before didn't
8676             have one. To enable the keyword warnings as the default
8677             behavior, the inclusion of the languagekw.swg file has to
8678             be uncommented at each language.swg file.
8679
8680             So, all the language maintainers, please check the
8681             keywords list. 
8682
8683             Also, you can add buit-in names, and not only keywords, like
8684             'True/False' in python.  Remember that you can be more
8685             specific and refer only to member names, like *::configure
8686             or *::cget (see an example in the tcl8/tcl8kw.swg file),
8687             or only global names, like ::range (see an example in the
8688             python/pythonkw.swg file.
8689
8690             Just to be consistent, use the following codes:
8691
8692             - Use code 314 for keyword and/or fatal bad names.
8693             - Use code 321 for buit-in and/or not fatal bad names.
8694            
8695             so, they can't be disabled/enabled independently (see
8696             python/pyhtonkw.swg for examples).
8697
8698             **** And don't add any new test file without checking it
8699             with the -Wallkw option!! (that includes me) *****.
8700           
8701
8702 12/11/2003: cheetah (William Fulton)
8703             SF bug #854634
8704             Added support for accepting the Unix directory separator '/' on 
8705             Windows and the Mac in addition to the native one ( '\' on 
8706             Windows). This can be used in %import, %include and commandline 
8707             options taking a path, for example -I. On Cygwin, both the Windows
8708             and Unix directory separator can now be used (was '/' only).
8709             
8710 12/10/2003: mmatus (Marcelo Matus)
8711
8712             [python] Implementing the runtime "reprotected" director
8713             members, if you have:
8714     
8715                 %feature("director") B;
8716
8717                 class Bar {
8718                 public:
8719                   virtual ~Bar();
8720                   virtual int hello() { return do_hello();)
8721
8722                 protected:
8723                   virtual int do_hi() {return 0;}
8724                   virtual int do_hello() {return 0;}
8725                 };
8726
8727             then, at the python side
8728
8729                 import my_module
8730
8731                 class Foo(my_module.Bar):
8732                   def do_hello(self):
8733                     return 1
8734                   pass
8735                  
8736                 b = Bar() # Pure C++ Director class
8737                 f = Foo() # C++ Director + python methods
8738
8739                 b.hello() # Ok, and it calls C++ Bar::do_hello()
8740                 f.hello() # Ok, and it calls Python Foo::do_hello()
8741
8742                 b.do_hi() # RuntimeError, do_hi() is protected!!
8743                 f.do_hi() # RuntimeError, do_hi() is protected!!
8744  
8745                 b.do_hello() # RuntimeError, do_hello() is protected!!
8746                 f.do_hello() # Ok, since it its redefined in python.
8747
8748             Here Bar.do_hello is always protected, but Foo.do_hello
8749             is "public", because it is redefined in python. Before,
8750             all the 'do_hello' methods were public.
8751
8752             This seems to be a good compromise between C++ and python
8753             philosophies, ie, all the director protected methods keep
8754             protected at the user side (C++ way) until they are
8755             redefined (python way, were all defined methods are always
8756             public). And this is not only a good compromise, it also
8757             seems to be the only way to do it :).
8758
8759             Now ruby has native director protected members, and python
8760             pure runtime support. I guess these are the two possible
8761             extreme cases. And hopefully, they could be used as
8762             templates to modify the other languages that support
8763             directors, so they can "reprotect" the protected director
8764             members at the target language side.
8765
8766             This finished the director protected support for the 
8767             python language. Ocalm will need to add the
8768             "reprotection" later.
8769
8770 12/10/2003: mmatus (Marcelo Matus)
8771
8772             The following case (reported by Lyle Johnson) was fixed:
8773
8774               %rename(x) Foo::y();
8775  
8776               class Foo { 
8777               public:
8778                 void y();
8779
8780               protected:
8781                 int x;
8782               };
8783
8784            swig warned that the symbol 'x' was already defined, and
8785            the renaming fails. 'x' was not emitted, since it is
8786            protected, but it was kept in the symbol table with too
8787            much information.
8788
8789            Now swig works for all the cases (plain, director and
8790            dirprot) again. This was fixed by allowing the parser.y to
8791            decide much closer what to do with 'x'. Before all the
8792            discarding or generation was resolved at the lang.cxx
8793            stage. Also the changes in parser.y to implement the
8794            director protected mode are now much more encapsulated, and
8795            they get disabled if the mode is not enabled. Before the
8796            deactivation was done at the generation stage (lang.cxx).
8797
8798            By the other hand, if the director mode is enabled, and
8799            %rename is done, reusing a protected member name, there is
8800            a pathological case:
8801
8802              %rename(x) Foo::y();
8803  
8804              class Foo : public A {
8805              public:
8806                void y();
8807
8808              protected:
8809                int x;            /* works */
8810                static  int x;    /* works */
8811                static  void x(); /* works */
8812                typedef void x(); /* works */
8813
8814                virtual void x(); /* always fails, as it should, since
8815                                     Foo::x() will be emitted in the
8816                                     director */
8817
8818                void x(); /* always fails, but sometimes it shouldn't,
8819                             since the Foo::x() will not be emitted if
8820                             it is not virtual */
8821
8822              };
8823
8824            The last case is not always right because at the parser.py
8825            stage it is not possible to decide if the protected member
8826            Foo::x() could or not conflict with the renamed Foo::y(),
8827            since Foo::x() could be virtual by inheritance.
8828
8829            I guess this just an intrinsic limitation, and no much can
8830            be done about it without resorting into larger changes to
8831            postpone, under certain conditions, the multiply symbol
8832            detection (lang.cxx stage).
8833            
8834            So, by now, it is just considered a well known "feature" in
8835            the director protected mode. The good news is that it seems
8836            to be a rare case, and it can be avoided by the user by
8837            hiding 'x' before renaming 'y':
8838
8839              %rename(_x) Foo::x();
8840              %rename(x) Foo::y();
8841            
8842
8843 12/08/2003: mmatus (Marcelo Matus)
8844             The virtual method detections now properly
8845             treats the following cases:
8846
8847              namespace foo { typedef int Int; }
8848              struct A {};
8849              typedef A B;
8850
8851              struct Foo {
8852                virtual ~Foo() {}
8853
8854                virtual Foo* cloner() = 0;
8855                virtual int get_value() = 0;
8856                virtual A* get_class() = 0;
8857                virtual void just_do_it() = 0;
8858              };
8859
8860              struct Bar : Foo
8861              {
8862                Bar* cloner();
8863                foo::Int get_value();
8864                B* get_class();
8865                void just_do_it();
8866              };
8867  
8868             All the Foo and Bar methods are virtual.  A new attribute
8869             "virtual:type" record the base polymorphic type. In the
8870             previous cases we have:
8871
8872                type : Bar       virtual:type : Foo
8873                type : foo::Int  virtual:type : int
8874                type : B         virtual:type : A
8875                type : void      virtual:type : void
8876
8877             This attribute is useful in languages (java+directors)
8878             that could have problems redefining Bar* Bar::cloner().
8879
8880             If you never had code like the above, you will see no
8881             effects. But if you have some code like that, you
8882             will see some effects since some methods that
8883             before were not properly treated as virtual,
8884             will start to act like that. This could enlarge
8885             your director classes.
8886             
8887
8888 12/08/2003: mmatus (Marcelo Matus)
8889             The director protected member support (dirprot)
8890             is disabled by default.
8891             
8892             It can be enable by using '-dirprot' or by adding
8893             the option to the module declaration, like:
8894
8895             %module(directors="1",dirprot="1") my_module
8896
8897             This module option was added to properly compile the
8898             director_protected.i and director_nested.i examples.
8899             
8900             The feature has been tested with python[2.2,2.3] 
8901             and ruby[1.6.7], both at compilation and runtime, and 
8902             java[j2sdk1.4.1_01], but only at compilation (my java
8903             installation doesn't run any of the director examples,
8904             olds nor news).
8905
8906             Please test for ocaml and java.
8907             
8908             The errors reported by William and Scott were fixed,
8909             except for a warning about  SWIG_JavaThrowExecption()
8910             multiply defined. I can't reproduce this error with my
8911             examples. We will wait for Scott to send us a minimal
8912             case.
8913
8914
8915 12/07/2003: mmatus (Marcelo Matus)
8916             The director protected member support has been
8917             completly moved out from python.cxx, and now
8918             resides in the common lang.cxx, emit.cxx and
8919             allocate.cxx files. 
8920
8921             This means it should work for all the other languages
8922             that currently support directors, ie, python, java, ocalm
8923             and ruby.
8924
8925             The change has been tested with python (compilation+runtime)
8926             and java (just compilation).
8927             
8928             Please add runtime tests for the missing languages 
8929             and test it.
8930
8931             The '-nodirprot' option was moved to the principal main,
8932             and can be used from all the languages.
8933
8934 12/07/2003: cheetah (William Fulton)
8935             [Java] Fixed and improved error checking of STRING_OUT typemaps in 
8936             various.i.
8937
8938 12/04/2003: mmatus (Marcelo Matus)
8939
8940             - Now the virtual members with no explicit declarator
8941             are properly identified:
8942             
8943                 struct A  {
8944                  virtual int f() = 0;
8945                 };
8946
8947                 struct B : A {
8948                   int f();
8949                 };
8950
8951             Here, B::f() is virtual, and the director and the
8952             virtual elimination mechanism now recognize that.
8953
8954             - [C#] This fix also fixes the problem where 'override' was not being 
8955             used on any overridden virtual method, so for struct B above, 
8956             this C# code is generated:
8957
8958                 public class B : A {
8959                   ...
8960                   public override int f() {
8961                     ...
8962                   }
8963                   ...
8964                 }
8965
8966             - Initial support for protected virtual methods. They are now
8967             properly emitted when using with director (python only by
8968             now).
8969             
8970                 %feature("director") A;    
8971                 struct A  {
8972                 protected:
8973                  virtual int f1() = 0;
8974                 };
8975
8976                 %feature("director") B;
8977                 struct B : A{
8978                 protected:
8979                   int f1();
8980                   virtual f2();
8981                 };
8982
8983             This can be dissabled by using the '-nodirprot' option.
8984
8985             - The feature 'nodirector' is working now at the top level,
8986             so, it must work for all the languages:
8987
8988                 %feature("director") A;
8989                 %feature("nodirector") A::f2;
8990
8991                 struct A {
8992                  virtual int f1();
8993                  virtual int f2();
8994                 };
8995                 
8996             in this case, only 'f1' is exported to the director class.
8997             
8998             - Added director support for const TYPE& arguments (python).
8999
9000 12/02/2003: cheetah (William Fulton)
9001             [Java] Fix for INOUT and OUTPUT typemaps in typemaps.i for when the JNI type 
9002             is bigger than the C type. For example, unsigned long (32bits on most systems)
9003             is mapped to jlong (64bits). Returned value was incorrect. Bug reported by 
9004             Brian Hawley.
9005
9006 12/02/2003: cheetah (William Fulton)
9007             [C# and Java] Better fix for entry dated 05/11/2003. Fixes the following
9008             typemaps:
9009
9010             Java: javabase, javainterfaces, javaimports, javaclassmodifiers,
9011             javaptrconstructormodifiers, javafinalize, javagetcptr & javacode.
9012             C#: csbase, csinterfaces, csimports, csclassmodifiers,
9013             csptrconstructormodifiers, csfinalize, csgetcptr & cscode.
9014
9015             It also fixes bug in using arrays of C structs with arrays_java.i 
9016             as reported Scott Michel.
9017
9018 12/02/2003: beazley
9019             [Perl] Fixed [ 852119 ] recursive inheritance in output .pm, perl5.
9020             Reported by William Dowling.
9021
9022 12/02/2003: beazley
9023             [Tcl] Fixed [ 755382 ] calling func(const vector<T>& p) evaluates p[0] in interp.
9024             The Tcl type checker was improperly handling the interpreter result when
9025             type violations were supposed to be ignored.
9026             Reported by Flaviu Popp-Nowak.
9027
9028 11/30/2003: cheetah (William Fulton)
9029             Fixed [ 545058 ] configure's --with-tclincl has no effect
9030
9031 11/30/2003: cheetah (William Fulton)
9032             [Java] Fixed [ 766409 ] missing symbol SWIG_JavaThrowException during module load
9033             SWIGs internal functions are all static as there is no need for different SWIG
9034             generated modules to share any code at runtime.
9035
9036 11/30/2003: beazley
9037             [Tcl] Added support for C++ pointers to members.
9038
9039 11/28/2003: cheetah (William Fulton)
9040             Fixed [ 848335 ] Directors: #include wrapper .h file - was incorrectly
9041             adding a directory to the generated #include "foo_wrap.h" statement
9042             in some situations.
9043
9044 11/28/2003: cheetah (William Fulton)
9045             [Java] Fixed [ 849064 ] JAVA : Access modifier for derived class wrong.
9046             The delete() method is always public now. It used to be protected whenever a 
9047             destructor was non public. An UnsupportedOperationException runtime 
9048             exception is thrown instead of making delete() protected now.
9049
9050 11/28/2003: beazley
9051             [Perl5] Added support for C++ pointers to members.
9052
9053 11/28/2003: beazley
9054             Fixed [ 850151 ] PYVERSION with python2.3 in configure of SWIG 1.3.19 (Maybe).
9055
9056 11/28/2003: beazley
9057             Fixed  [ 850666 ] #include extra line added.  
9058             This should fix some problems with getting correct line numbers on
9059             error messages.
9060
9061 11/26/2003: beazley
9062             Fixed another one of Marcelo's evil template bugs (infinite
9063             recursion). [ 849504 ] template and typedef -> inf. recursion.
9064
9065 11/26/2003: beazley
9066             Fixed parsing problem with declarations like this:
9067
9068                  int *x = &somearray[0];
9069
9070 11/25/2003: beazley
9071             Fixed [ 756552 ] missing default argument class scope with "|".
9072             This is really only a band-aid fix for use of class-enums in
9073             expressions.  For example:
9074
9075                   class A {
9076                   public:
9077                      enum Flag { flag1 = 0x1, flag2 = 0x2 };
9078                      void foo(int x = flag1 | flag2);
9079                   };
9080
9081             Note: there are still some (more subtle) cases that are broken,
9082             but hard to fix due to an issue with template expansion. Will
9083             address later.
9084             Reported by Dmitry Mironov.
9085
9086 11/25/2003: beazley
9087             Incorporated [ 840878 ] support for %inline { ... } (PATCH).
9088             This adds support for the following:
9089
9090                   %inline {
9091                       ... some code ...
9092                   }
9093
9094             The difference between this and %inline %{ ... %} is that the
9095             enclosed text is processed by the SWIG preprocessor.   This
9096             allows special macros and other processing to be used in 
9097             conjunction with %inline.
9098             Contributed by Salvador Fandino Garcia.
9099
9100 11/25/2003: beazley
9101             Fixed [ 836903 ] C++ inconsistency (with void arguments).
9102             SWIG was having difficulty with f() vs f(void) in C++ programs.
9103             For instance:
9104
9105                   class A {
9106                   public:
9107                       virtual void f(void) = 0;
9108                   };
9109
9110                   class B {
9111                   public:
9112                       virtual void f();    // Not matched to f(void) correctly
9113                   }; 
9114
9115             The parser now normalizes all declarations of the form f(void) 
9116             in C++ classes to f().  This should fix a variety of subtle 
9117             problems with inheritance, optimizations, overloading, etc.
9118             Problem reported by Partho Bhowmick.
9119  
9120 11/25/2003: beazley
9121             [Perl5] Incorporated [ 841074 ] better croaking (PATCH).  This fixes some problems
9122             with strings and provides some new error functions. 
9123             Contributed by Salvador Fandino Garcia.
9124             
9125 11/25/2003: beazley
9126             Fixed [ 791835 ] Default argument with cast: txt = (char *)"txt" syntax Error.
9127             The parser should now accept things like this:
9128
9129                  void foo(char *s = (char *) "Hello");
9130
9131             Problem reported by Claudius Schnorr.
9132
9133 11/24/2003: beazley
9134             [Tcl] Fixed problem with cross module linking.  Previously modules referred
9135             to base classes through a global variable.   Now, the module looks up base
9136             classes through the type system itself---avoiding the need to link to a global
9137             like before.  Caveat:  modules with base classes must be loaded before
9138             modules with derived classes.
9139  
9140 11/24/2003: mkoeppe (Matthias Koeppe)
9141             [Guile] In -scm mode, use () to represent null pointers,
9142             as it is done in -gh mode.
9143
9144 11/23/2003: mkoeppe (Matthias Koeppe)
9145             Add a generated script "preinst-swig", which can be used
9146             to invoke SWIG before it has been installed.  It arranges
9147             that the runtime libraries from the source directory are
9148             used. 
9149
9150 11/23/2003: mkoeppe (Matthias Koeppe)
9151             [Guile] In -gh mode, don't forget to call SWIG_Guile_Init.
9152             Add a SWIG_contract_assert macro.
9153
9154 11/23/2003: mkoeppe (Matthias Koeppe)
9155             [MzScheme] Update the configure check for the dynext object to work
9156             with MzScheme 205.
9157
9158 11/20/2003: mmatus
9159             Fixed the include/import error reported by Kerim Borchaev,
9160             where two files with names like
9161
9162             'dir1/hello.i'
9163             'dir2/hello.i'
9164             
9165             can not be include at the same time. Swig was including
9166             just the first one, assuming the second one was not a
9167             different one, since it was checking/keeping just the
9168             basename 'hello.i'.
9169
9170 11/19/2003: beazley
9171             Changes to the SWIG runtime library support. 
9172               -  The -c command line option has been renamed to -noruntime
9173               -  New command line option: -runtime.  When supplied, this
9174                  inserts the symbol SWIG_GLOBAL into the wrapper code.  This,
9175                  in turn, makes all of the runtime support functions globally
9176                  visible.
9177                - New library file: swigrun.i.   Used to create modules
9178                  for runtime library (if needed).
9179     
9180 11/18/2003: cheetah (William Fulton)
9181             'make srcrpm' rpmbuild fix - patch from Joe Cooper
9182
9183 11/18/2003: mkoeppe (Matthias Koeppe)
9184             [Guile] Change meaning of configure option --with-guile to
9185             the name of the Guile executable.  The new option --with-guile-prefix 
9186             can be used to specify the tree where Guile is
9187             installed.  (However, usually it suffices to use the
9188             single option --with-guile-config.)  
9189             When running the run tests test-suite, make sure to use the
9190             version of Guile that SWIG was configured for.
9191
9192 11/17/2003: mkoeppe (Matthias Koeppe)
9193             [Guile] Improvements to object-ownership management in 
9194             "-scm" mode.  (They do not apply to the default "-gh" mode.)
9195             * Renamed the smob type that indicates that the object can
9196               be garbage collected from "collected swig" to "collectable
9197               swig", which is more precise.  
9198             * Export the destructor functions again.  It is now
9199               allowed to explicitly call destructors, even for
9200               garbage-collected pointer objects.  A pointer object
9201               that has been passed to a destructor is marked in a
9202               special way using a new smob type, "destroyed swig".
9203               (This helps avoid nasty memory bugs, where references to
9204               dead C objects are still held in Scheme. Moreover, the
9205               garbage collector will not try to free a destroyed
9206               object once more.)
9207             * Destructor-like functions can also mark their arguments 
9208               as destroyed by applying the typemap SWIGTYPE *DESTROYED.
9209               (It calls the function SWIG_Guile_MarkPointerDestroyed.)
9210             * Functions that "consume" their objects (or that "own"
9211               them after the call) can mark their arguments as
9212               not garbage collectable.  This can be done by applying
9213               the typemap SWIGTYPE *CONSUMED.  (It calls the function
9214               SWIG_Guile_MarkPointerNoncollectable.)
9215             * The macro TYPEMAP_POINTER_INPUT_OUTPUT from library
9216               pointer-in-out.i creates additional typemaps 
9217               PTRTYPE *INPUT_CONSUMED, PTRTYPE *INPUT_DESTROYED.
9218               They mark the passed pointer object likewise.
9219               The typemap PTRTYPE *OUTPUT creates a garbage-collectable
9220               pointer object, like %newobject does for a returned 
9221               pointer.  Use the new typemap PTRTYPE *OUTPUT_NONCOLLECTABLE
9222               to create a pointer object that will not be garbage collected.
9223
9224 11/17/2003: mkoeppe (Matthias Koeppe)
9225             [Guile] Handle $input in "freearg" typemaps.
9226             Never qualify GOOPS slot names with the class name. 
9227             Handle optional arguments properly in the GOOPS methods.
9228
9229 11/16/2003: cheetah (William Fulton)
9230             Fixes for installation to work with the upcoming Automake-1.8.
9231             mkinstalldirs was being used by a non-Automake makefile. 
9232             mkinstalldirs is being phased out and so was not being
9233             created by Automake. install-sh used instead.
9234
9235 11/16/2003: cheetah (William Fulton)
9236             [Java] Numerous director improvements, tweaks and bug fixes since 
9237             the initial implementation have been contributed by Scott Michel.
9238
9239 11/12/2003: beazley
9240             [Python] When %feature("shadow") is used to add code to shadow
9241             classes, the special variable $action expands to the name of the
9242             underlying wrapper function that would have been called normally.
9243
9244 11/12/2003: beazley
9245             [Python] When generating proxy class code, SWIG emits a few
9246             default methods for __repr__() and other Python special
9247             methods.  Some of these methods are emitted after all of the
9248             contents of a class. However, this makes it hard to override
9249             the methods using %pythoncode and some other directives that
9250             allow code to be inserted into a class.  These special methods
9251             are now emitted into the code *before* all of the other methods.
9252             Suggested by Eric Jones.
9253  
9254 11/11/2003: beazley
9255             Preprocessor enhancement.   For include statements like this:
9256
9257                   %include "foo/bar.i"
9258
9259             the directory "foo" is now added to the search path while 
9260             processing the contents of bar.i.  Thus, if bar.i includes other
9261             files in the same directory, they will be found. Previously,
9262             you would have to add additional directories using -I to make this
9263             work correctly.  Note: the C preprocessor seems to behave in
9264             an identical manner on many (most? all?) systems.
9265             Suggested by Kerim Borchaev.
9266
9267 11/11/2003: beazley
9268             Configuration changes to make SWIG work on Mac OSX 10.3.x (Panther).
9269             Tested with Python, Tcl, Perl, and Ruby---all of which seem to work.
9270
9271 11/08/2003: cheetah (William Fulton)
9272             [Java] Fixed the typemaps in various.i which were mostly broken.
9273             char **STRING_IN and char **STRING_RET typemaps replaced with 
9274             STRING_ARRAY. float *FLOAT_ARRAY_RETURN typemap removed.
9275
9276 11/08/2003: beazley
9277             [Tcl] Tcl module now emits a safe module initialization function by
9278             default.  It can be removed by running 'swig -nosafe'.
9279
9280 11/04/2003: mkoeppe (Matthias Koeppe)
9281             [Guile] Only use the SCM_ API when the function
9282             `scm_slot_exists_p' exists (needed for GOOPS support).  
9283             This function was renamed during the Guile 1.5 series
9284             from `scm_slots_exists_p'.
9285             Report the right runtime library when invoked with
9286             -scm -ldflags.
9287
9288 11/03/2003: mkoeppe (Matthias Koeppe)
9289             [Chicken] Fix #782052.  The --with-chickencfg configure
9290             option (and others) were not accepted.
9291
9292 11/02/2003: mkoeppe (Matthias Koeppe)
9293             [Guile] Merge new set of GOOPS changes by John Lenz.
9294             GOOPS objects are now manipulated directly by the C code.
9295             Some fixes to typemap-GOOPS interaction.
9296
9297 11/02/2003: mkoeppe (Matthias Koeppe)
9298             [Guile] Remove the file argument to -scmstub and -goops.
9299             The Scheme files are now always called MODULE.scm or
9300             MODULE-primitive.scm, where MODULE is the module name and 
9301             "primitive" can be changed by the -primsuffix option.
9302             The Scheme files are now placed in the directory given by
9303             the -outdir option, or the current directory.
9304             (Patch by John Lenz, slightly modified.)
9305
9306             *** INCOMPATIBILITY [Guile] ***
9307
9308 11/02/2003: mkoeppe (Matthias Koeppe)
9309             Unify the pointer-conversion runtime API.  The standard
9310             functions are:
9311              * SWIG_NewPointerObj (POINTER, TYPE, FLAGS)
9312                 -- Create an scripting object that represents a typed
9313                    pointer. FLAGS are language specific.
9314              * SWIG_ConvertPtr (INPUT, RESULT, TYPE, FLAGS)
9315                 -- Get a pointer from the scripting object INPUT and
9316                    store it in the place RESULT.  When a type mismatch 
9317                    occurs, return nonzero.
9318              * SWIG_MustGetPtr (INPUT, TYPE, ARGNUM, FLAGS)
9319                 -- Get a pointer from the scripting object INPUT and
9320                    return it.  When a type mismatch occurs, throw an
9321                    exception.  If ARGNUM > 0, report it as the 
9322                    argument number that has the type mismatch.
9323             [Guile]:    No changes.
9324             [MzScheme]: No changes.
9325             [Perl]:     Add the function SWIG_NewPointerObj.
9326                         The function SWIG_MakePtr is kept.
9327                         The function SWIG_MustGetPtr is currently not
9328                         supported.
9329             [Python]:   Add the function SWIG_MustGetPtr.
9330             [Ruby]:     Add the function SWIG_MustGetPtr.
9331             [Tcl]:      Remove the "interp" argument of
9332                         SWIG_NewInstanceObj, SWIG_ConvertPtr,
9333                         SWIG_ConvertPacked, and SWIG_ConvertPtrFromString.
9334                         The function SWIG_MustGetPtr is currently 
9335                         not supported.
9336             No changes to Pike because its pointer conversion code did
9337             not look complete.  No changes to PHP4, because I did not
9338             understand its runtime code.  No changes to Chicken
9339             because major changes are expected soon anyway.  No
9340             changes to Java, OCaml, C# because they do not seem to
9341             have a pointer-conversion runtime API.
9342
9343             *** INCOMPATIBILITY [Tcl] ***
9344
9345 11/02/2003: mkoeppe (Matthias Koeppe)
9346             [Perl5, PHP4, Pike, Python, Ruby, Tcl]: Use the
9347             preprocessor to rename external functions of the SWIG
9348             runtime API to follow the naming convention
9349             SWIG_<language>_<function>.  This should allow linking
9350             more than one interpreter into a program.
9351
9352 10/31/2003: cheetah (William Fulton)
9353             [C#] Fix since introducing the exception and std::string delegates.
9354             The fix overcomes linker errors when using more than one SWIG module.
9355             Problem reported by Andreas Schörk.
9356
9357 10/31/2003: beazley
9358             Incorporated patch: [ 823302 ] Incr Tcl support.
9359             Contributed by Alexey Dyachenko.
9360             Note: needs documentation.
9361
9362 10/31/2003: beazley
9363             Incorporated patch: [ 829325 ] new Python Module options and features.
9364             Robin Dunn writes:
9365
9366             This patch makes a number of changes to the SWIG python module.
9367
9368             1. Add -apply option, and change the default code
9369             output to use the foo(*args, **kw) calling syntax
9370             instead of using apply(). If the -apply option is
9371             given then code is generated as before. This is very
9372             similar to Patch #737281 but the new -modern option
9373             makes the second half of that patch unnecessary so it
9374             is not included here.
9375             
9376             2. Add -new_repr option. This is the same as my Patch
9377             #797002 which I will mark as closed since it is no
9378             longer needed. When this new option is used then the
9379             __repr__ methods that are generated for proxy classes
9380             will be more informative and give details about the
9381             python class and the C++ class.
9382             
9383             3. Add %feature("addtofunc"). It allows you to insert
9384             one or more lines of code inside the shadow method or
9385             function that is already generated, instead of
9386             replacing the whole thing like %feature("shadow") does.
9387             For __init__ it goes at the end, for __del__ it goes
9388             at the begining and for all others the code generated
9389             is expanded out to be like
9390             
9391             def Bar(*args, **kwargs):
9392             val = _module.Foo_Bar(*args, **kwargs)
9393             return val
9394             
9395             and the "addtofunc" code is inserted just before the
9396             return statement. If the feature is not used for a
9397             particular method or function then the shorter code is
9398             generated just like before.
9399             
9400             4. A little bit of refactoring to make implementing
9401             addtofunc a little easier.
9402             
9403             5. Added a -modern command-line flag that will cause
9404             SWIG to omit the cruft in the proxy modules that allows
9405             it to work with versions of Python prior to 2.2. The
9406             result is a simpler, cleaner and faster python proxy
9407             module, but one that requires Python 2.2 or greater. 
9408
9409 10/31/2003: beazley 
9410             Incorporated patch: [ 829319 ] XML module tweaks.
9411             This adds a new command line option -xmllite that 
9412             greatly reduces the amount of emitted XML code by
9413             eliminating some fields mostly used in SWIG's
9414             internal processing.  Contributed by Robin Dunn.
9415
9416 10/31/2003: beazley
9417             Incorporated patch: [ 829317 ] Adds DohSplitLines function.
9418             Contributed by Robin Dunn.
9419
9420 10/29/2003: beazley
9421             Fixed [ 827907 ] argout objects not being wrapped properly (PATH).
9422             Patch contributed by Salvador Fandiño García.
9423              
9424 10/29/2003: beazley
9425             Fixed [ 826996 ] perl type checking ignores perl subclasses.
9426             This enhancement makes it so wrapped classes and structs can
9427             be subclassed in Perl and used normally. 
9428             Patch contributed by Salvador Fandiño García.
9429
9430 10/16/2003: cheetah (William Fulton)
9431             [C#] IntPtr marshalled with a void* instead of int in C function 
9432             declarations. The casts thus look more conventional, for example:
9433
9434                 // old
9435                 DllExport double SWIGSTDCALL CSharp_get_Shape_x(int jarg1) {
9436                     ...
9437                     Shape *arg1 = (Shape *) 0 ;
9438                     arg1 = *(Shape **)&jarg1; 
9439                     ...
9440                 }
9441                 // new
9442                 DllExport double SWIGSTDCALL CSharp_get_Shape_x(void * jarg1) {
9443                     ...
9444                     Shape *arg1 = (Shape *) 0 ;
9445                     arg1 = (Shape *)jarg1; 
9446                     ...
9447                 }
9448
9449
9450 10/14/2003: beazley
9451             Fixed a subtle problem with overloaded methods and smart pointers.
9452             If a class has overloaded methods like this:
9453
9454                  class Foo {
9455                  public:
9456                      int bar(int x);
9457                      static int bar(int x, int y);
9458                  };
9459
9460             and the class is used as a smart pointer:
9461
9462                 class FooPtr {
9463                 public:
9464                      Foo *operator->();
9465                 };
9466
9467             The SWIG would try to expose the static member Foo::bar
9468             through FooPtr---resulting bogus wrapper code and a compiler
9469             error.
9470
9471             Due to the way in which overloading is handled, it is
9472             extremely difficult to eliminate the static method in
9473             this case.  Therefore, it is still exposed.  However,
9474             the generated code now compiles and works.
9475
9476 10/05/2003: mkoeppe (Matthias Koeppe)
9477             [Guile, MzScheme, Chicken]: Remove symbol clashes between
9478             the runtime libraries by renaming all extern common.swg
9479             functions with the preprocessor.
9480
9481 10/05/2003: mkoeppe (Matthias Koeppe)
9482             [Guile] Added basic GOOPS support, contributed by John Lenz.
9483             See the documentation for details.
9484             
9485             *** NEW FEATURE ***
9486
9487 10/04/2003: mkoeppe (Matthias Koeppe)
9488             [Guile] New option, -only-setters, which disables
9489             traditional getter and setter procedures for structure slots.
9490
9491 10/03/2003: mkoeppe (Matthias Koeppe)
9492             [Guile] Added run test for reference_global_vars by John Lenz.
9493
9494 09/30/2003: beazley
9495             Partial solution to [ 792180 ] C++ smart-pointer/namespace mixup revisited.
9496             The problem is not easy to fix (at least it doesn't seem so), but is
9497             related to the instantiation of qualified templates inside of other
9498             namespaces.   SWIG now generates an error message in this case rather
9499             than generating broken wrappers.
9500
9501 09/30/2003: beazley
9502             Fixed [ 800012 ] ENTER macro from CORE/scope.h clashes with libc search.h.
9503             Reported by Britton Leo Kerin.
9504
9505 09/30/2003: beazley
9506             Fixed [ 811518 ] Casting ints to doubles (w/ solution?)
9507             Addresses a problem with overloading in the Perl module.
9508             Reported by Gerald Dalley.
9509
9510 09/28/2003: mkoeppe
9511             [Guile with -scm option] Fix typo in generated code for
9512             procedures-with-setters.  Reported by John Lenz.
9513
9514 09/26/2003: beazley
9515             Fixed [ 812528 ] externs not correct when throw is in signature.
9516             Reported by Joseph Winston.
9517             
9518 09/23/2003: cheetah (William Fulton)
9519             SWIG was generating a number of symbols that didn't comply with 
9520             the ISO C/C++ standard, in particular ISO/IEC 14882:1998(E) 17.4.3.1.2
9521             where double underscores are forbidden as well as symbols starting with
9522             an underscore followed by an upper case letter. Most of these have
9523             been rooted out. See new section added to internals.html development
9524             manual 'Symbol Naming Guidelines for Generated C/C++ Code'.
9525
9526 09/23/2003: cheetah (William Fulton)
9527             Director typemap name changes:
9528             inv     => directorin
9529             outv    => directorout
9530             argoutv => directorargout
9531
9532             *** POTENTIAL INCOMPATIBILITY ***
9533
9534 09/19/2003: mrose (Mark Rose)
9535             [Python] Director constructors now default to __disown = 0, 
9536             which is the intended behavior and fixes the director_finalizer 
9537             test case under python.
9538
9539 09/12/2003: cheetah (William Fulton)
9540             [C#] - Typemaps added for std::string and const std::string &.
9541                  - New delegate for creating a C# string given a char *. It
9542                    can be used by calling SWIG_csharp_string_callback as shown
9543                    in the std::string 'out' typemap. Useful if the return type is
9544                    mapped to a C# string and the calling function is responsible 
9545                    for cleaning up memory as the C# garbage collector doesn't
9546                    free the memory created in C/C++ and then returned as a C# string.
9547                  - The exception delegates have moved into an inner class in the
9548                    intermediate class, thereby freeing up the static constructor.
9549
9550 09/11/2003: beazley
9551             (Internals)
9552             Major refactoring of iteration over lists and hashes.  The
9553             DOH library now uses iterators.  They work like this:
9554
9555                 List *l = (some list);
9556
9557                 Iterator i;
9558                 for (i = First(l); i.item; i = Next(i)) {
9559                     // i.item contains the actual list item.
9560                     // i.item is NULL at end of list
9561                     ...
9562                 }
9563
9564                 Hash *h = (some hash);
9565                 Iterator j;
9566                 for (j = First(h); j.item; j = Next(j)) {
9567                     // j.item contains hash table item
9568                     // j.key  contains hash table key
9569                     // Both j.item and j.key are NULL at end
9570                     ...
9571                 }
9572  
9573             The old iteration functions Firstitem(), Nextitem(), Firstkey(),
9574             and Nextkey() are gone.  
9575
9576             The new iterators are simpler, result in better memory use,
9577             and may be faster.  Also, there are no longer any problems
9578             iterating over the same list/hash in multiple places at
9579             the same time.  For example, this is fine:
9580
9581                  Iterator i,j;
9582                  for (i = First(l); i.item; i = Next(i)) {
9583                     for (j = First(l); j.item; j = Next(j)) {
9584                          ...
9585                     }
9586                  }
9587
9588             (This never worked in previous versions).
9589             *** POTENTIAL INCOMPATIBILITY ***.  This will probably break 
9590             third party extensions to SWIG (or give them further encouragement
9591             to join the SWIG CVS-tree :-).
9592
9593 09/10/2003: mkoeppe (Matthias Koeppe)
9594             [Guile] Fix memory leaks in the "list-vector.i" typemaps.
9595
9596 09/09/2003: mkoeppe (Matthias Koeppe)
9597             [Chicken] Use C_mk_bool rather than C_mkbool.  This fixes
9598             the wrapping of boolean values for Chicken 1.10 and newer.
9599             Reported by Dave <hundo@yahoo.com> / Felix Winkelmann
9600             <felix@proxima-mt.de>.
9601
9602 09/05/2003: cheetah (William Fulton)
9603             [Java] Directors implemented for Java. In summary this is a big new feature 
9604             which supports upcalls from C++ to Java. Code is generated to support C++ 
9605             callbacks to call into Java and true polymorphic behaviour for Java classes 
9606             derived from C++ classes. See java.html for details. Contributed by 
9607             Scott Michel.
9608
9609 09/05/2003: Tiger
9610             Created contract example directory at /SWIG/Examples/contract
9611             Added simple contract examples (simple_c & simple_cxx)
9612             Modified contract module's output format
9613
9614             *** NEW FEATURE ***
9615
9616 09/01/2003: cheetah (William Fulton)
9617             Test-suite build improvements:
9618             - Multiple build directories working for the test suite, so it is now
9619               possible to run configure in multiple subdirectories and run the test
9620               suite in each of these sub directories.
9621             - 'make distclean' fixed so it doesn't bomb out on the Examples directory
9622               when using multiple subdiretory builds. Required the following directories
9623               to be moved:
9624                 Examples/GIFPlot/Perl -> Examples/GIFPlot/Perl5
9625                 Examples/GIFPlot/Php  -> Examples/GIFPlot/Php4
9626               These new directories used to be symbolic links to the old directory.
9627               Also the Examples/test-suite/Perl symbolic link has been removed.
9628             - Running the test-suite, other than from the root directory, say
9629               in Examples/test-suite/python will now display all the code being
9630               executed.
9631             - The following 3 C# compilers are detected during configure and work with 
9632               the test-suite: Mono, Portable.NET and Microsoft.
9633
9634 09/01/2003: Tiger
9635             Added inheritance support for design by contract feature.
9636
9637 09/01/2003: beazley
9638             Fixed [ 794914 ] Wrong types in template specialization.
9639             SWIG was not handling arguments correctly in template 
9640             partial specialization.  For example,
9641
9642                 template<class T> class Foo<T *> {
9643                 public:
9644                     T *blah();
9645                 };
9646
9647                 %template(FooInt) Foo<int *>;
9648
9649             in this class, the return type of blah was set to
9650             'int **', but it should really be 'int *'.  This has been
9651             fixed, but it will affect all prior uses of partial
9652             specialization.
9653  
9654 09/01/2003: beazley
9655             Fixed [ 786394 ] Patch for generated perl code does not compile under RedHat9.
9656             Reported by Scott Finneran.
9657
9658 09/01/2003: beazley
9659             Fixed [ 791579 ] (unsigned) long long handled incorrectly (Tcl).
9660             This was an error in the Tcl typemaps.i file. 
9661             Reported by Kjell Wooding.
9662         
9663 09/01/2003: beazley
9664             Fixed [ 797573 ] no way to rename classes coming from C structures.
9665             This problem relates to renaming of anonymous structures with a
9666             typedef.  For example: 
9667
9668                   %rename(Bar) Foo;
9669                   typedef struct {
9670                      ...
9671                   } Foo;
9672
9673             Reported by Britton Leo Kerin.
9674             
9675 09/01/2003: beazley
9676             Fixed [ 797576 ] -help seems to imply that only tcl-specific options exist.
9677             Added a comment to alert user to other options.
9678             Reported by Britton Leo Kerin.
9679
9680 09/01/2003: beazley
9681             Fixed [ 798205 ] Segfault in SWIG_ConvertPtr.
9682             Reported by Prabhu Ramachandran.
9683
9684 08/30/2003: mrose (Mark Rose)
9685             Modified the director typemaps in python/std_complex.i to use the 
9686             new-style macro and conversion functions, which eliminated some
9687             redundant code.  Fixed a few bugs in these typemaps as well, although
9688             more testing is needed.
9689
9690 08/29/2003: mrose (Mark Rose)
9691             Completed initial support for wrapping abstract classes with directors.
9692             Constructor wrappers will be generated for abstract classes that have
9693             directors, and instances of the director classes will be created regardless
9694             of whether the proxy class has been subclassed in the target language.
9695             No checks are made during construction to ensure that all pure virtual
9696             methods are implemented in the target language.  Instead, calls to
9697             unimplemented methods will throw SWIG_DIRECTOR_PURE_VIRTUAL_EXCEPTION
9698             exceptions in C++.
9699
9700             Integrated Prabhu Ramachandran's typemap patches, which provide director
9701             typemap support for enums and std::size_t, and fix a couple bugs in the 
9702             director std::vector<> typemaps.
9703
9704 08/29/2003: cheetah (William Fulton)
9705             [C#] Implemented exception handling for throwing C# exceptions from C/C++ code.
9706             A few delegate functions are available for calling which then throw the C#
9707             exception. Use the SWIG_CSharpThrowException function from C/C++ typemaps.
9708             See the generated wrapper code or csharphead.swg for all available exceptions.
9709             Example:
9710
9711               SWIG_CSharpThrowException(SWIG_CSharpException, "exception description");
9712
9713             The 'throws' typemaps are also now implemented, so code is automatically 
9714             generated to convert any C++ exception into a C# System.Exception when the C++ 
9715             method declares an exception specification such as:
9716
9717                int foo() throw(Bar);
9718
9719             Also any parameters that are references to a C++ class or a class passed by value
9720             and are passed as a C# null will now throw a C# NullReferenceException.
9721
9722 08/29/2003: cheetah (William Fulton)
9723             [C#] Fix to match the calling convention of all pinvoke methods so that they
9724             match the calling convention used by default in the C# 'static extern' declarations 
9725             (__stdcall is used on Windows).
9726
9727 08/19/2003: cheetah (William Fulton)
9728             [Java] Reworked std::string typemaps. Fixes a number of string in std namespace 
9729             problems. For example %template vector<string>. The templated class' get method 
9730             wasn't returning a Java String, but a SWIGTYPE_p_string. Reported
9731             by Zach Baum.
9732
9733 08/15/2003: beazley
9734             Fixed [ 763522 ] 1.3.19 segfault in SwigType_add_pointer/DohInsertitem.
9735             Related to problem with unnamed class handling in Perl module.
9736
9737 08/15/2003: beazley
9738             Fixed [ 763563 ] Missing indication of optional arguments.
9739             Tcl module.  Reported by Krzysztof Kozminski.
9740
9741 08/15/2003: beazley
9742             Fixed [ 787432 ] long param handled as int.  Tcl module
9743             now uses Tcl_GetLongFromObj to convert integer values.
9744
9745 08/11/2003: beazley
9746             Fixed [ 775989 ] numeric template parameters.   There were
9747             some errors in template expansion related to the use of
9748             arrays where the array dimension was a template parameter.
9749             It should work now.  Reported by Bryan Green.
9750
9751 08/10/2003: mrose (Mark Rose)
9752             Added a director typemap (outv) for return by value and cleaned up up a few 
9753             of the commented director typemaps.
9754
9755 08/10/2003: mrose (Mark Rose)
9756             Fixed constructor generation for director classes to ignore private
9757             constructors.  Protected constructors are also ignored for now, pending
9758             a solution to the problem of wrapping classes that only define protected
9759             constructors.
9760
9761 08/07/2003: cheetah (William Fulton)
9762             New commandline option -outdir <dir> to specify where the language specific
9763             files are to be generated. This is useful for target languages like Python,
9764             Java etc which generate proxy files in the appropriate language.
9765             This option does not apply to the C/C++ wrapper file.
9766
9767 08/07/2003: cheetah (William Fulton)
9768             On Windows the generated files (other than the _wrap.c or _wrap.cxx files)
9769             were sometimes incorrectly being generated into the current directory unless
9770             the input file used the Unix path separator. The Windows path separator 
9771             should now be used. Bug reported by Robert Davies.
9772
9773 08/07/2003: beazley
9774             Added array variable set typemap to Perl module.
9775
9776 08/07/2003: beazley
9777             Fixed [ 775677 ] Array init causes codegen bug..
9778
9779 08/07/2003: beazley
9780             Fixed [ 779062 ] Class"\n"::foo not supported.  SWIG
9781             should now correctly handle whitespace in between 
9782             namespace qualifiers.  For example "A :: Foo :: Bar".
9783             
9784 07/31/2003: cheetah (William Fulton)
9785             Fixes for parameters which are classes that are passed by value and have 
9786             a default value. A copy constructor for SwigValueWrapper is required 
9787             (SF #780056). Also fixed memory leak in these circumstances. These mods
9788             also fix SF #780054.
9789
9790 07/28/2003: beazley
9791             Improved run-time error message for pointers in Python module.
9792             Contributed by Zooko.
9793
9794 07/10/2003: ballabio (Luigi Ballabio)
9795             [Almost all languages] Wrappers for std::pair added.
9796             Typemaps for Python, Ruby, Guile and MzScheme.
9797
9798 07/01/2003: mkoeppe (Matthias Koeppe)
9799             [Chicken] Handle the case of more than one argout typemap
9800             per function.
9801
9802 06/29/2003: cheetah (William Fulton)
9803             [Java, C#] SF #670949 request. The destructor wrapper function name is now 
9804             configurable.  A new attribute called methodname in the 
9805             javadestruct/javadestruct_derived (Java) or csdestruct/csdestruct_derived (C#)
9806             typemaps specifies the method name. For example in Java the destructor is 
9807             wrapped by default with the delete method:
9808
9809                 %typemap(javadestruct, methodname="delete") SWIGTYPE {...}
9810
9811 06/27/2003: cheetah (William Fulton)
9812             [Java, C#] The throws attribute for adding exception classes to the throws
9813             clause also now works with the following typemaps: 
9814             newfree
9815             javain, javaout (Java)
9816             csin, csout (C#)
9817
9818             For example, the 'AnException' will be added to the throws clause in the
9819             proxy function:
9820
9821             %typemap(javaout, throws="AnException") int {
9822                 int returnValue=$jnicall;
9823                 if (returnValue==0) throw new AnException("Value must not be zero");
9824                 return returnValue;
9825             }
9826
9827 06/25/2003: mrose (Mark Rose)
9828             [Python] Director typemap marshalling checks for null pointers when
9829             walking the parameter list instead of relying soley on the parameter
9830             count.  Cures a segfault that occured for multiple argument inv typemaps.
9831             Someone with more Swig experience should probably review this code.
9832
9833 06/24/2003: mkoeppe (Matthias Koeppe)
9834             [Chicken] Don't emit calls to "C_check_for_interrupt",
9835             which may result in an endless loop.  Patch by felix@proxima-mt.de.
9836
9837 06/20/2003: cheetah (William Fulton)
9838             [C#] Finalizers now use destructor syntax as the override which was used in 
9839             the Finalize method is not in the ECMA standards, spotted by the MS compiler.
9840
9841 06/10/2003: cheetah (William Fulton)
9842             [C#] A number of changes have been made to remove the Java naming 
9843             that was used in the C# module.
9844             
9845             Typemap name changes:
9846             jni                         -> ctype
9847             jtype                       -> imtype
9848             jstype                      -> cstype
9849             javain                      -> csin
9850             javaout                     -> csout
9851             javainterfaces              -> csinterfaces
9852             javabase                    -> csbase
9853             javaclassmodifiers          -> csclassmodifiers
9854             javacode                    -> cscode
9855             javaimports                 -> csimports
9856             javaptrconstructormodifiers -> csptrconstructormodifiers
9857             javagetcptr                 -> csgetcptr
9858             javafinalize                -> csfinalize
9859
9860             Feature name changes:
9861             javaconst                   -> csconst
9862             javamethodmodifiers         -> csmethodmodifiers
9863
9864             Pragma changes:
9865             pragma(java)                -> pragma(csharp)
9866             jniclassbase                -> imclassbase
9867             jniclassclassmodifiers      -> imclassclassmodifiers
9868             jniclasscode                -> imclasscode
9869             jniclassimports             -> imclassimports
9870             jniclassinterfaces          -> imclassinterfaces
9871
9872             Special variable name changes:
9873             $javaclassname              -> $csclassname
9874             $javainput                  -> $csinput
9875             $jnicall                    -> $imcall
9876
9877             This will break SWIG interface files that use these typemaps, features
9878             and pragmas. Please update your code or use macros for backwards
9879             compatibility.
9880
9881             *** POTENTIAL INCOMPATIBILITY FOR C# MODULE ***
9882
9883 06/10/2003: mkoeppe (Matthias Koeppe)
9884             [MzScheme] Applied MzScheme module updates contributed by
9885             John Lenz <jelenz@students.wisc.edu>.
9886
9887             - Updated mzscheme to use SWIG's common runtime type
9888               system from common.swg. 
9889
9890             - The Lib/mzscheme directory has been reorganized to
9891               standardize names across the language modules:
9892               mzscheme.i was moved to mzscheme.swg, mzscheme.swg and
9893               mzschemedec.swg have been removed, mzrun.swg (which
9894               contains the runtime code) has been added.
9895
9896             - The swig_proxy structure was renamed to swig_mz_proxy.
9897               swig_mz_proxy now contains a pointer to a swig_type_info
9898               structure.  
9899
9900             - Added varin and varout typemaps for SWIGTYPE [] and
9901               SWIGTYPE &.
9902
9903             - Garbage collection by calling scheme_add_finalizer() has
9904               been added.
9905
9906             *** NEW FEATURE [MzScheme] ***
9907
9908 06/10/2003: cheetah (William Fulton)
9909             [Java] New typemaps: javadestruct and javadestruct_derived
9910             for the C++ destructor wrapper. The javadestruct version gets used by
9911             classes at the top of an inheritance chain and the javadestruct_derived 
9912             version gets used by other classes.
9913
9914             [C#] cildispose and cildisposeoverride typemaps replaced by
9915             csdestruct and csdestruct_derived typemaps. The delete()
9916             method has been removed and its functionality put into these
9917             typemaps designed for the Dispose() method.
9918
9919             - New typemaps csinterfaces and csinterfaces_derived replace
9920             the javainterfaces typemap. Also fixes the peculiarity of all classes
9921             in an inheritance chain individually deriving from the IDisposable 
9922             interface.
9923
9924             - New typemap csfinalize for finalizers. C++ destructors are now called
9925             by garbage collector during finalization. Problem reported by 
9926             Andreas Schörk.
9927
9928 06/10/2003: Tiger
9929             Modified contract code for error message output.
9930             Contract code can now print out simple error message.
9931             Modified contract code to prepare for inheritance
9932             
9933 06/03/2003: mkoeppe
9934             [Guile] Applied Guile module updates contributed by 
9935             John Lenz <jelenz@students.wisc.edu>. 
9936
9937             - SWIG currently uses Guile's gh_ API, which is marked as
9938               deprecated in Guile 1.6 and will be removed in Guile
9939               1.9.  This change introduces a command-line flag "-scm"
9940               which causes SWIG to generate wrappers that use Guile's
9941               SCM API instead; this requires Guile >= 1.6.
9942             
9943             - The Lib/guile directory has been reorganized to
9944               standardize names across language modules: guiledec.swg
9945               and guile.swg have been moved into guile_gh_run.swg,
9946               guile.i has been moved to guile_gh.swg, guile_scm.swg
9947               and guile_scm_run.swg which contain the SCM API stuff
9948               have been added
9949
9950             - ghinterface.i, which contains the defines from the gh_
9951               functions to the scm_functions has been added
9952
9953             - The API for dealing with pointer objects is now
9954               SWIG_ConvertPtr, SWIG_MustGetPtr, SWIG_NewPointerObj.
9955
9956             - Added varin and varout typemaps for SWIGTYPE [] and SWIGTYPE &
9957
9958             - Garbage collection has been added.
9959
9960             *** NEW FEATURE [Guile] ***
9961                 
9962 06/01/2003: cheetah (William Fulton)
9963             Dimensionless arrays such as 
9964
9965                 int foo[] = {1, 2};
9966                 extern int bar[];
9967
9968             produce a warning that the variable is read-only. Depending on the target
9969             language, this used to cause compile errors or generate a setter that
9970             generated a runtime error. A setter cannot be automatically generated
9971             because the array size cannot be determined by SWIG. A varin, globalin 
9972             or memberin typemap (depending on the target language) must be written 
9973             by the user.
9974
9975 05/29/2003: beazley
9976             Refinement to default typemap matching and arrays.  When an
9977             array is declared like this:
9978
9979                        int foo[4];
9980
9981             The default typemap now resolves to 
9982
9983                        SWIGTYPE [ANY]
9984
9985             If no match is found for that, it then resolves to
9986
9987                        SWIGTYPE []
9988
9989             If no array dimension is specified in the original declaration,
9990             the SWIGTYPE [] is used right away. 
9991
9992             Note: This change has been made to resolve problems related to
9993             arrays with and without dimensions.  For example, sometimes SWIG
9994             was generating setter functions for array variables with no dimensions
9995             (an error). Likewise, SWIG sometimes made arrays with dimensions
9996             read-only (also an error).  This fixes the arrays_global test
9997             problem.
9998                         
9999 05/28/2003: beazley
10000             Fixed subtle type handling bug with references and pointers.
10001             If you had functions like this:
10002
10003                   typedef Foo Bar;
10004
10005                   Foo *func1();
10006                   void func2(Bar &x);
10007
10008             Then func2() wouldn't accept objects returned by func1()
10009             because of a type error.   It should work now.
10010             Reported by Brian Yang.
10011
10012 05/21/2003: cheetah (William Fulton)
10013             Fixes to some of the Visual C++ example project files which would not 
10014             work with spaces in the paths held in the environment variables used to 
10015             point to the target language's library / include directory.
10016             SF bug #740769
10017
10018 05/21/2003:  songyanf (Tiger)
10019             Added -contracts option.
10020             First try of the idea of "Wrap by Contract": 
10021             build up realiable cross-language module by wrapping with SWIG.
10022             Implemented basic assertion
10023             (preassertion & postassertion & invariant)
10024             for simple C/C++ functions.
10025             
10026             Current format of contracts are:
10027             %contract class_name :: func_name (paras...) {
10028             require:
10029                    boolean exprs;
10030                    exprs;
10031             ensure:
10032                    boolean expr;
10033                    exprs;
10034             invariant:
10035                    boolean expr;
10036                    exprs;
10037             }
10038
10039             *** NEW FEATURE ***
10040                 
10041 05/19/2003: cheetah (William Fulton)
10042             Build tweaks. There were a few preprocessor definitions which were
10043             specified in the Makefile for passing on the commandline when compiling.
10044             These are now all defined in swigconfig.h. Autoconf doesn't normally 
10045             allow installation directories to be defined in this config header file, 
10046             but an autoconf archive macro enables this. This macro along with future 
10047             autoconf macros are going to be put in the Tools/config directory.
10048
10049             'swig -version' now reports the target build platform.
10050
10051 05/11/2003: cheetah (William Fulton)
10052             [C# and Java] Fix to the following typemaps:
10053
10054             javabase, javainterfaces, javaimports, javaclassmodifiers,
10055             javaptrconstructormodifiers, javafinalize, javagetcptr & javacode.
10056
10057             These are the typemaps for modifying/generating proxy classes.
10058             Previously the typemaps would use the proxy class name and not the 
10059             C++ type, which was inconsistent with all other typemaps. 
10060
10061             In most circumstances the proxy class name and the C++ class name/type 
10062             is the same except for classes in namespace, templated classes etc. so
10063             this shouldn't affect most cases.
10064
10065             *** POTENTIAL INCOMPATIBILITY FOR JAVA and C# MODULES ***
10066
10067 05/09/2003: cheetah (William Fulton)
10068             Visual C++ Project files have been added so that the runtime libraries
10069             can be built on Windows (for Tcl, Perl, Python and Ruby).
10070
10071 05/01/2003: beazley
10072             Fixed problem with return by value, const, and private constructors.
10073             For example:
10074
10075                 class B {
10076                 private:
10077                    B();
10078                 public:
10079                    B(const B&);
10080                 };
10081
10082                 class A {
10083                    ...
10084                    const B returnB() const;
10085                    ...
10086                 };
10087
10088             Problem and patch suggestion reported by Bill Hoffman.
10089
10090 04/29/2003: cheetah (William Fulton)
10091             Build changes:
10092             - Single autoconf invocation - autoconf in the Tools directory has gone.
10093
10094             - Libtool bootstrapped when running autogen.sh. This requires anyone
10095               using the cvs version of SWIG to have libtool installed on their
10096               machine. Suggest version 1.4.2 or higher, preferably the latest - 1.5.
10097
10098             - Automake is now used to build the runtime libraries in conjunction 
10099               with libtool.
10100
10101             - Runtime libraries are now successfully built as DLLs on Cygwin.
10102
10103             - Skipping languages is no longer just determined in the top level 
10104               makefile but in configure.in. This info is used for building
10105               the runtime libraries and for running the examples and test-suite.
10106
10107             - These changes have fixed multiple build directory builds, that is
10108               building from directories other than the top level directory. 
10109               Installation from multiple build directories also working. An initial
10110               configure in the top level directory is no longer needed as described
10111               in 04/02/2003 entry. A 'make distclean' will be needed before building
10112               in a directory other than the top level directory if the autotools 
10113               have been run from this top level directory at some point, but 
10114               autoconf will tell you this. Note that 'make check' only works from 
10115               the top level directory at the moment.
10116
10117 04/28/2003: beazley
10118             Fixed [ 723471 ] Wrapper_print() fails with preprocessor directives.
10119
10120 04/28/2003: beazley
10121             Minor refinement of const static member variable handling 
10122             described in CHANGES 08/11/2002.   Previously, SWIG merely
10123             checked to see if there was an initializer in the declaration.
10124             Now, SWIG additionally checks to make sure the static member
10125             is const.
10126
10127 04/25/2003: ljohnson (Lyle Johnson)
10128             [Ruby] Added a kind of limited support for multiple inheritance,
10129             activated using the -minherit command-line option. I've also updated
10130             the "C++ Inheritance" section of the Ruby documentation to discuss
10131             how this works, and its limitations. Also also modified the minherit.i
10132             test case to run against this.
10133
10134 04/25/2003: ljohnson (Lyle Johnson)
10135             [Ruby] Added the -globalmodule command-line option for the Ruby
10136             module, for wrapping stuff into the global module (Kernel) instead
10137             of a nested module. Updated documentation accordingly.
10138
10139 04/23/2003: mrose (Mark Rose)
10140             Fixed symname error in director calls to Python methods
10141             that extend C++ operators.
10142
10143             Stopped director destructor wrappers from calling __set_up,
10144             which was leaving the director flag in an inconsistent state.
10145
10146 04/23/2003: beazley
10147             Fixed problem with namespace resolution and nested namespaces.
10148             Reported by Alfred Lorber (and Marcelo Matus).
10149
10150 04/16/2003: cheetah (William Fulton)
10151             Patch for Java examples and test-suite to run on Mac OS X.
10152
10153 04/15/2003: ljohnson (Lyle Johnson)
10154             [Ruby] Incorporated Nobu Nakada's patches for supporting the Ruby
10155             1.8 allocation framework.
10156
10157 04/15/2003: ljohnson (Lyle Johnson)
10158             [Ruby] Replaced all uses of the deprecated STR2CSTR() macro with the
10159             safer StringValuePtr() macro. For more information, see ruby-talk:67059
10160             and follow-ups to that post.
10161
10162 04/11/2003: beazley
10163             Fixed problem with preprocessor macro expansion.  For example:
10164  
10165                 #define min(x,y) ((x) < (y)) ? (x) : (y) 
10166                 int f(int min);
10167
10168             Reported by Sebastien Recio.
10169
10170 04/10/2003: cheetah (William Fulton)
10171             [Java] Added a runtime check to typemaps in arrays_java.i library to check 
10172             that the Java array passed in is the same size as the C array and throw an 
10173             exception if not.
10174
10175             Also fix to use delete instead of free for arrays created using new.
10176
10177 04/07/2003: cheetah (William Fulton)
10178             Remove GCC3 warning when compiling the examples and test-suite:
10179
10180               cc1plus: warning: changing search order for system directory "/usr/include"
10181               cc1plus: warning: as it has already been specified as a non-system directory 
10182
10183             See SF patch #715531 submitted by Gerald Williams
10184
10185 04/03/2003: cheetah (William Fulton)
10186             [C#] Improved wrapping of enums and constants. These were previously
10187             wrapped as C# variables rather than constants. Either these are wrapped
10188             as readonly (runtime) constants or compile time constants, depending on
10189             the %javaconst directive (The directive is likely to change name soon).
10190             For example wrapping:
10191               %javaconst(0);
10192               #define ABC 22
10193               %javaconst(1) XYZ;
10194               #define XYZ 33
10195             is now:
10196               public static readonly int ABC = examplePINVOKE.get_ABC();
10197               public const int XYZ = 33;
10198
10199 04/03/2003: cheetah (William Fulton)
10200             [Java] Global constants and enums are put in their own interface called
10201             xxxConstants, where xxx is the module name. This is an improvement as 
10202             it is possible to derive (implement) a Java class from the xxxConstants
10203             interface to improve the syntax; namely when wrapping:
10204               enum {ONE=1, TWO, THREE};
10205             accessing these from a Java class implementing xxxConstants is neater:
10206               int number = ONE;
10207             than the previous:
10208               int number = xxx.ONE;
10209
10210             Patch submitted by Dave Dribin.
10211
10212 04/02/2003: cheetah (William Fulton)
10213             Build improvements for multiple builds. This allows one to build
10214             the SWIG executable and runtime libraries for different platforms/compilers 
10215             etc by running configure in different directories. This isn't 100% just 
10216             yet and won't be until libtool is better configured... a 'configure' and 
10217             'make distclean' needs to be run in the root directory before it all works.
10218             For example:
10219               $ ./configure
10220               $ make distclean
10221               $ mkdir config1; cd config1; ../configure CC=gcc CXX=g++; make; cd ..
10222               $ mkdir config2; cd config2; ../configure CC=cc CXX=c++; make; cd ..
10223             
10224             To be improved. A 'make check' does not work yet either. 
10225
10226 04/01/2003: beazley
10227             Fixed template partial specialization argument expansion bug.
10228             This showed up when trying to use std_vector.i with vectors
10229             of pointers.
10230
10231 03/31/2003: cheetah (William Fulton)
10232             Fix for parallel make builds of SWIG, for example
10233               make -j 4
10234             Build failure reported by Bill Clarke.
10235
10236 03/28/2003: beazley
10237             Released 1.3.19.
10238
10239
10240
10241 Version 1.3.19 (March 28, 2003)
10242 ===============================
10243
10244 03/28/2003: beazley
10245             Variety of minor bug fixes to the 1.3.18 release including:
10246
10247                 - Segmentation fault with %extend directive.
10248                 - Typemap variable substitution bug.
10249                 - Expression evaluation bug.
10250                 - Large memory leak with template expansion.
10251
10252 Version 1.3.18 (March 23, 2003)
10253 ===============================
10254
10255 03/21/2003: beazley
10256             Fixed two problems with the %extend directive, overloading, and
10257             template expansion.  See the 'template_extend_overload' and
10258             'template_extend_overload_2' tests in Examples/test-suite for
10259             details.
10260
10261 03/20/2003: cheetah (William Fulton)
10262             [C#] Added some typemaps as suggested by Andreas Schoerk for handling
10263             parameters that are passed as pointers or by reference. These have
10264             been put in typemaps.i.
10265
10266 03/20/2003: beazley
10267             Fixed a C++ scoping bug related to code like this:
10268
10269                 class Foo {
10270                 public:
10271                      int Foo::bar();
10272                 };
10273
10274             Previously, SWIG just tossed out the Foo::bar() declaration. Now,
10275             the declaration is wrapped provided that the prefix is exactly the
10276             same as the current scope (including any enclosing namespaces).
10277             Reported by Bruce Lowery.
10278
10279 03/20/2003: beazley
10280             Incorporated [ 696516 ] Enabling exception processing for data member access.
10281             In some compilers, attribute access can generate exceptions.  However,
10282             SWIG ordinarily assumes that no exceptions will be raised.  To disable this,
10283             use the %feature("allowexcept").  For example:
10284
10285                   %feature("allowexcept") Foo::x;
10286                   ...
10287                   class Foo {
10288                   public:
10289                       int x;     /* Exception handling enabled */
10290                       ...
10291                   };
10292
10293             Patch contributed by Yakov Markovitch. 
10294  
10295 03/20/2003: beazley
10296             Incorporated Patch. [ 701860 ] Improve Performance (python proxies).
10297             Gives a performance boost to proxy class code and the management of the
10298             .this and .thisown attributes.  Contributed by Mike Romberg.
10299
10300 03/19/2003: cheetah (William Fulton)
10301             [C# and Java] Added missing vararg support.
10302
10303 03/18/2003: mrose (Mark Rose)
10304             Removed code related to tagging individual methods for directors.
10305             The concept of having directors for some but not all virtual methods
10306             of a class is deeply flawed.  The %feature("nodirector") tag is also
10307             gone.  
10308             
10309             Directors are off by default.  To enable them for a class, issue
10310             %feature("director") classname; which will create director methods
10311             for every virtual method in the hierarchy of the class.
10312
10313 03/17/2003: beazley
10314             Fixed a subtle problem with passing arguments of type function.  For
10315             example:
10316
10317                int foo(int x(int, int));
10318
10319             or
10320
10321                typedef int binop_t(int, int);
10322                int foo(binop_t x);
10323
10324             In old versions, this would produce code that wouldn't compile.  Now,
10325             SWIG merely adds an extra pointer, making these declarations the same
10326             as:
10327
10328                int foo(int (*x)(int, int));
10329
10330                typedef int binop_t(int, int);
10331                int foo(binop_t *x);
10332
10333             Reported by Garth Bushell.
10334
10335 03/17/2003: mrose (Mark Rose)
10336             Fixed the return statement for director base class calls that have no
10337             return value.
10338
10339 03/15/2003: beazley
10340             Fixed a problem with const smart-pointer wrapping.  For example:
10341
10342                  class Foo {
10343                  public:
10344                     int x;
10345                     void bar() const;
10346                     void spam();
10347                 };
10348
10349                 class Blah {
10350                 ...
10351                    const Foo *operator->();
10352                 ...
10353                 };
10354
10355             In this case, only "x" and "bar" are visible from Blah (since application
10356             of spam violates constness).  Moreover, access to "x" is read-only.
10357            
10358 03/15/2003: mrose (Mark Rose)
10359             Cleaned up two signed versus unsigned comparisons in python/std_vector.i.
10360             
10361 03/15/2003: cheetah (William Fulton)
10362             [C#] Global variables are wrapped using properties instead of get and set methods.
10363             Member variable wrapping bug fixes, for example wrapping pointers work now.
10364             Typemaps are used for all variable wrapping to generate the property code.
10365
10366 03/13/2003: mrose (Mark Rose)
10367             Fixed a bug in the virtual method unrolling for directors. 
10368             The order of unrolling is now from base to derived, to ensure
10369             that the most derived implementation of a director method is
10370             found.
10371
10372             Director methods for pure virtual methods now throw
10373             DIRECTOR_PURE_VIRTUAL_EXCEPTION if _up is set.
10374
10375 03/12/2003: cheetah (William Fulton)
10376             [C#] Polymorphism fix: virtual functions now use the appropriate
10377             keyword in the C# proxy class, virtual or override.
10378             Some 'using System;' statement fixes needed by the Mono compiler.
10379
10380 03/11/2003: beazley
10381             Fixed subtle bug in the application of SwigValueWrapper<> to
10382             template classes with default constructors.  Reported by
10383             Bruce Lowery.
10384
10385 03/11/2003: beazley
10386             The $descriptor(type) variable is now expanded in code supplied to
10387             %extend.  This is useful for certain kinds of advanced wrapping 
10388             (especially container classes).
10389
10390 03/11/2003: luigi
10391             Support for std::map.
10392             (a) Integration with scripting language (a la std::vector) for
10393                 Python, Ruby, MzScheme, and Guile;
10394             (b) Simple wrapper for other languages
10395
10396 03/10/2003: beazley
10397             Fixed problem with escape sequences in string and character constants.  SWIG
10398             wasn't parsing certain octal codes correctly.
10399
10400 03/07/2003: beazley
10401             Fixed a variety of subtle preprocessor problems reported by
10402             Sebastien Recio.
10403
10404             (a) Empty preprocessor values no longer generate "bad constant
10405             value" errors.  For example:
10406
10407                   #define FOO
10408                   #define FOO BAR
10409
10410             (b) Macro names can now span multiple lines (technically valid,
10411             although questionable practice).  For example:
10412
10413                   #define A_LONG_MACRO_\
10414                   NAME 42
10415
10416             (c) Whitespace is no longer required before certain macro values.
10417             For example:
10418
10419                   #define FOO"Hello"
10420                   #define BAR\
10421                   "Hello"
10422  
10423 03/07/2003: ljohnson (Lyle Johnson)
10424             [Ruby] Added missing long long and unsigned long long typemaps
10425             in the Lib/ruby/typemaps.i library file.
10426
10427 03/07/2003: mrose (Mark Rose)
10428             Added Examples/python/callback to demostrate how directors can
10429             be used to implement callbacks in Python
10430             Added Examples/python/extend to demonstrate virtual method
10431             calls from C++ to Python (really the same as the callback
10432             example, just a different context).
10433             Added four tests for very basic director functionality.  These
10434             have runtime tests under python.
10435             The Python module now emits #define SWIG_DIRECTORS near the
10436             top of the output file if directors are enabled.  This is useful
10437             for disabling parts of tests in target languages that don't
10438             support directors.
10439
10440 03/06/2003: mrose (Mark Rose)
10441             Added a section to Doc/Manual/Python.html on cross language
10442             polymorphism (directors).
10443
10444 03/06/2003: mrose (Mark Rose)
10445             The short-lived "-fdirectors" command line option has been
10446             removed.  To enable directors, instead use the extended %module 
10447             directive as follows:
10448
10449                 %module(directors="1") modulename
10450
10451 03/06/2003: cheetah (William Fulton)
10452             The long long typemaps have been rewritten so that they can be more
10453             easily used with non ISO compilers, like Visual C++. For example
10454             if you are wrapping the Windows 64 bit type __int64 the long long
10455             typemaps can be used with %apply:
10456
10457                 %apply long long { __int64 };
10458                 __int64 value1(__int64 x);
10459
10460             __int64 will now appear in the generated code instead of long long.
10461             
10462 03/06/2003: beazley
10463             *** DEVELOPER CHANGE ***
10464             Swig module mutation has been changed slightly.  When a language
10465             class method wants to save node attributes, it now uses one of the
10466             following functions:
10467
10468                   Swig_require()
10469                   Swig_save()
10470
10471             The first argument to these functions is a namespace in which
10472             saved attributes are placed.  For example,this code
10473
10474                   Node *n;
10475                   Swig_save("cDeclaration",n,"type","parms","name",NIL);
10476
10477             saves the attributes as "cDeclaration:type", "cDeclaration:parms",
10478             and so forth.   If necessary, a language module can refer to
10479             old values by using this special namespace qualifier.
10480
10481             In addition to this, a special attribute "view" contains the name
10482             of the last namespace used to save attributes.  In the above 
10483             example, "view" would have the value "cDeclaration".   The value
10484             of "cDeclaration:view" would have the previous view and so forth.
10485
10486             Swig_restore(n) restores a node to the state before the last
10487             Swig_require() or Swig_save() call.
10488
10489             Note:  This change makes it easier for language modules to refer
10490             to old values of attributes.  
10491
10492
10493 03/06/2003: mrose (Mark Rose)
10494             Merged the cross-language polymorphism patch.  When enabled, C++ 
10495             "proxy" classes (called directors) are generated for each specified 
10496             C++ class.  Directors pass method calls from C++ to Python, similar 
10497             to the way the usual proxy (shadow) classes pass method calls from 
10498             Python to C++.  Together, these two types of proxies allow C++ 
10499             classes that are extended in Python to behave just like ordinary 
10500             C++ classes and be used in C++ like native objects.  
10501             
10502             This feature is still very experimental and is disabled by default.
10503             To enable director support, specify '-fdirectors' on the SWIG command
10504             line or in the SWIG_FEATURES environment variable.  In the interface
10505             file, add %feature("director") to generate directors for all classes
10506             that have virtual methods.  
10507             
10508             See http://stm.lbl.gov/~tm2/swig/ProxyDoc.html for more details.
10509             
10510
10511 03/03/2003: beazley
10512             Fixed a small glitch in typemap local variable replacement.  If you had
10513             a typemap like this:
10514
10515                  %typemap(in) type ($1_type temp) {
10516                       ...
10517                       temp = ...;
10518                       ...
10519                  }
10520
10521             and no occurrence of "$1_type" appeared in the body, then the local
10522             variable type wouldn't be substituted.
10523
10524 03/03/2003: cheetah (William Fulton)
10525             [C#] New version of the CSharp module which is typemap based.
10526             It also uses ECMA C# and no longer uses Microsoft Visual C++.NET 
10527             glue. This means that it will work on non-Windows platforms.
10528             Contributed by Neil Cawse.
10529
10530 02/27/2003: beazley
10531             Fixed [ 653548 ] error parsing casting operator definition.
10532             SWIG now ignores casting operators declared outside of a class.
10533             For example:
10534
10535                 inline A::operator char *() { ... }
10536
10537             Bug reported by Martin Casado.
10538
10539 02/27/2003: beazley
10540             Added support for anonymous bit-fields.  For example:
10541
10542                  struct Foo {
10543                       int x : 4;
10544                       int   : 4;
10545                       int y : 8;
10546                  };
10547
10548             Anonymous bit-fields are ignored by SWIG.   Problem
10549             reported by Franz Höpfinger.
10550
10551 02/26/2003: cheetah (William Fulton)
10552             [Java] Better typemaps in the Examples/java/typemap example and also 
10553             fixes subtle bug when using the StringBuffer typemaps more than once.
10554
10555 02/26/2003: beazley
10556             Fixed [ 642112 ] Constants char bug.
10557
10558 02/26/2003: beazley
10559             Fixed [ 675337 ] Partial template specialization not entirely working.
10560             There was a subtle problem related to the naming and ordering of
10561             template partial specialization arguments.  Matching worked okay,
10562             the resulting templates weren't expanded correctly.
10563
10564 02/25/2003: beazley
10565             Fixed problem with parsing (and generating code) for 
10566             references to arrays.  For example:
10567
10568                 int foo(int (&x)[10]);
10569   
10570 02/25/2003: beazley
10571             Fixed [ 635347 ] Compilation warning from libpy.c.
10572             Reported by Daniel L. Rall.
10573  
10574 02/25/2003: beazley
10575             Fixed a subtle problem with virtual method implementation
10576             checking and typedef.
10577
10578                  typedef int *intptr;
10579
10580                  struct A {
10581                     virtual int *foo() = 0;
10582                  };
10583                  struct B : public A {
10584                     virtual intptr foo() { };
10585                  };
10586
10587             SWIG was treating these declarations as different even though
10588             they are the same (via typedef).
10589
10590 02/25/2003: ljohnson (Lyle Johnson)
10591             [Ruby] Added range checking for the NUM2USHRT macro, per [ 675353 ].
10592
10593 02/24/2003: beazley
10594             Fixed a subtle problem with the code that determined if a class is abstract
10595             and can be instantiated.    If you had classes like this:
10596
10597                   struct A {
10598                      virtual int foo(int) = 0;
10599                   };
10600                   struct B : virtual A {
10601                      virtual int foo(int);
10602                   };
10603
10604                   struct C : virtual A { 
10605                   };
10606
10607                   /* Note order of base classes */      
10608                   struct D : B, C { };    /* Ok */
10609                   struct E : C, B { };    /* Broken */
10610
10611             then SWIG determined that it could instantiate D(), but not E().
10612             This inconsistency arose from the depth-first search of the 
10613             inheritance hierarchy to locate the implementations of virtual
10614             methods.   This problem should now be fixed---SWIG will attempt
10615             to locate any valid implementation of a virtual method by
10616             traversing over the entire hierarchy.
10617
10618 02/22/2003: cheetah (William Fulton)
10619             [Java] Fix for using enum typemaps. The Java final static variable type
10620             can be set using the jstype typemap, enabling enums to be mapped to 
10621             something other than int. Bug reported by Heiner Petith.
10622
10623 02/21/2003: songyanf (Tiger)
10624             Added CSharp (C#) module prototype
10625             i.e. csharp.cxx & csharp.h at Source/Modules/.
10626             They are for test usage only now and need improvement.
10627             The interface also need to be modified.
10628
10629             *** NEW FEATURE ***
10630         
10631 02/20/2003: songyanf (Tiger)
10632             Fixed problem with typedef with -fvirtual.
10633             Similar as beazley's modification today.
10634
10635 02/20/2003: beazley
10636             Added support for gcc-style variadic preprocessor macros.  
10637             Patch [ 623258 ] GCC-style vararg macro support.
10638             Contributed by Joe Mason.
10639
10640 02/20/2003: beazley
10641             Fixed [ 605162 ] Typemap local variables.
10642             Reported by Lyle Johnson.
10643
10644 02/20/2003: beazley
10645             Fixed problem with abstract classes and typedef.  For example:
10646
10647                class Foo {
10648                public:
10649                   virtual void foo(int x) = 0;
10650                };
10651
10652                typedef int Integer;
10653                class Bar : public Foo {
10654                public:
10655                   virtual void foo(Integer x);
10656                };
10657
10658             SWIG was getting confused about the latter method---making Bar
10659             abstract.  Reported by Marcelo Matus.
10660
10661 02/19/2003: cheetah (William Fulton)
10662             [Java] %javaconst(flag) can also be used on enums as well as constants.
10663             This feature enables true Java compiler constants so that they can be 
10664             used in Java switch statements. Thanks to Heiner Petith for patches.
10665
10666 02/19/2003: songyanf (Tiger)
10667             Modified -fcompact feature to deal with PP lines
10668
10669 02/18/2003: beazley
10670             Fixed [ 689040 ] Missing return value in std_vector.i.
10671             Reported by Robert H. de Vries.
10672
10673 02/18/2003: beazley
10674             Fixed a few evil scoping problems with templates, namespaces, and the
10675             %extend directive.  Problem reported by Luigi Ballabio.
10676
10677
10678 02/18/2003: cheetah (William Fulton)
10679             [Ruby] Improved support for Visual C++ and other native Windows compilers. 
10680             It is no longer necessary to specify "/EXPORT:Init_<module>", where <module> is the
10681             swig module name when linking using these native Windows compilers.
10682
10683 02/15/2003: songyanf (Tiger)
10684             Added -fvirtual option.
10685             Reduce the lines and size of the wrapper file
10686             by omitting redifined virtual function in children classes.
10687
10688             Modified -compact option to -fcompact option
10689
10690             Added -small option.
10691             -small = -fvirtual -fcompact
10692             And it can be extended by future feature options,
10693             which are used to reduce wrapper file szie.
10694
10695             Added SWIG_FEATURES environment variable check.
10696             To dynamically set the feature options such as -fcompact & -fvirtual
10697             *** NEW FEATURE ***
10698
10699 02/13/2003: lenz
10700             Updated Doc/Manual/Perl5.html to talk about C++ compile problems
10701             configure.in now checks for PERL5_CCFLAGS
10702             Runtime/Makefile.in and Example/Makefile.in now use PERL5_CCFLAGS
10703             Added Lib/perl5/noembed.h which contains all the known macro conflicts
10704
10705 02/12/2003: beazley
10706             Fixed [ 685410 ] C++ Explicit template instantiation causes SWIG to exit.
10707             Fixes a syntax error with declarations similar to this:
10708
10709                  template class std::vector<int>;
10710
10711             SWIG now ignores the instantiation and generates a warning message.
10712             We might do more later.  Reported by Thomas Williamson.
10713
10714 02/11/2003: cheetah (William Fulton)
10715             Rewrote bool typemaps to remove performance warning for compiling generated code
10716             under Visual C++.
10717
10718 02/11/2003: cheetah (William Fulton)
10719             Fix for wrapping reference variables (const non-primitive and all non-const types) 
10720             for example:
10721               int& i;
10722               Class& c;
10723               const Class& c;
10724
10725 02/11/2003: beazley
10726             Fixed more very subtle preprocessor corner cases related to recursive
10727             macro expansion.  For example:
10728
10729                    #define cat(x,y) x ## y
10730
10731                    cat(cat(1,2),3)    // Produces: cat(1,2)3
10732                    
10733                    #define xcat(x,y) cat(x,y)
10734
10735                    xcat(xcat(1,2),3)  // Produces 123
10736
10737             See K&R, 2nd Ed. p. 231.
10738
10739 02/10/2003: cheetah (William Fulton)
10740             Fixed [ 683882 ] - patch submitted by F. Postma for SWIG to compile on HP-UX.
10741
10742 02/10/2003: beazley
10743             Fixed subtle preprocessor argument expansion bug. Reported by Marcelo Matus.
10744
10745 02/10/2003: songyanf
10746             Added -compact option.
10747             Reduce the lines and size of the wrapper file
10748             by omitting comments and combining short lines.
10749             *** NEW FEATURE ***
10750  
10751 02/07/2003: beazley
10752             Fixed [ 651355 ] Syntax error with cstring.i
10753             Reported by Omri Barel.
10754
10755 02/07/2003: beazley
10756             Fixed [ 663632 ] incompatibility with standard cpp.
10757             This is a refinement that fixes this problem:
10758
10759                  // Some macro with an argument
10760                  #define FOO(x)       x
10761
10762                  int FOO;        /* Not a macro---no arguments */
10763  
10764 02/05/2003: beazley
10765             Fixed [ 675491 ] parse error with global namespace qualification.
10766             Submitted by Jeremy Yallop.
10767
10768 02/04/2003: beazley
10769             Fixed bug in varargs processing introduced by the numinputs typemap parameter.
10770
10771 01/08/2003: ttn
10772             [xml] Fix string-replacement ordering buglet.
10773             Thanks to Gary Herron.
10774
10775 12/23/2002: cheetah (William Fulton)
10776             Further build changes:
10777             - The SWIG executable is now built using a single Makefile.
10778             - This makefile is generated by Automake (Source/Makefile.am).
10779             - Dependency tracking and tags support are in this makefile.
10780             - Automake 1.7.2 and Autoconf 2.54 minimum versions are needed to build SWIG from CVS.
10781             - Running ./autogen.sh now installs Autoconf/Automake support files into
10782               Tools/config and these files are no longer stored in CVS.
10783             - Bug fixes in 'make install' for systems using .exe executable extension and
10784               ./configure --with-release-suffix=whatever
10785
10786 12/16/2002: cheetah (William Fulton)
10787             More build changes:
10788             - Autoconf's AC_CANONICAL_HOST replaces proprietary approach for detecting build host.
10789             - Autoconf support files moved to Tools/config.
10790
10791 12/16/2002: cheetah (William Fulton)
10792             Modifications to run on MacOS, submitted by Bernard Desgraupes.
10793             Mainly ensuring generated files are output in the appropriate directory for
10794             some modules.
10795
10796 12/11/2002: cheetah (William Fulton)
10797             Various build modifications and bug fixes:
10798             - Simplification of version string. Use autoconf's PACKAGE_VERSION instead.
10799             - Build time removed from SWIG version.
10800             - Using standard autoconf config header generation.
10801             - Updated old autoconf macros as reported by autoupdate.
10802             - Removed $prefix in autoconf from search paths as autoconf won't expand them.
10803             - Subtle bug fix where 'make prefix=/somewhere; make clean; make prefix=/somwhere/else'
10804               produced an executable using the incorrect library directories.
10805             - Added -ldflags commandline option for MzScheme, Ocaml, Pike and PHP.
10806             - Fixed reporting of compiler used when using -version commandline option.
10807             - SWIG web address added to -version commandline option.
10808
10809 12/11/2002: beazley
10810             Minor fix to Tcl dynamic cast typemaps. Reported by
10811             Kristopher Blom.
10812
10813 12/10/2002: beazley
10814             Fixed subtle template argument replace bug.  Reported by
10815             Chris Flatley.
10816
10817 12/10/2002: beazley
10818             Reverted CHANGES 09/03/2002, preprocessor argument evaluation.  Arguments
10819             are not evaluated during collection, K&R, p. 230.
10820
10821 12/06/2002: beazley
10822             Fixed [ 649022 ] Compilation problems with KAI/KCC
10823
10824 12/02/2002: beazley
10825             SWIG 'rel-1-3' CVS branch merged back into the main branch.
10826
10827
10828 Version 1.3.17 (November 22, 2002)
10829 ==================================
10830
10831 11/19/2002: beazley
10832             Fixed [ 613922 ] preprocessor errors with HAVE_LONG_LONG.
10833             
10834 11/19/2002: beazley
10835             Fixed [ 615480 ] mzscheme SWIG_MustGetPtr_.
10836
10837 11/19/2002: beazley
10838             Fixed [ 635119 ] SWIG_croak causes compiler warning.
10839
10840 11/16/2002: cheetah (William Fulton)
10841             [Java] Added typemaps for pointers to class members.
10842
10843 11/15/2002: cheetah (William Fulton)
10844             [Java] Bug fix: Overloaded C++ functions which cannot be overloaded in Java 
10845             once again issue a warning.
10846
10847 11/14/2002: cheetah (William Fulton)
10848             [Java] Handling of NULL pointers is improved. A java null object will now
10849             be translated to and from a NULL C/C++ pointer by default. Previously when 
10850             wrapping:
10851
10852                 class SomeClass {...};
10853                 void foo(SomeClass *s);
10854
10855             and it was called from Java with null:
10856
10857                 modulename.foo(null)
10858
10859             a Java NullPointerException was thrown. Extra typemaps had to be written in
10860             order to obtain a NULL pointer to pass to functions like this one. Now the 
10861             default wrapping will detect 'null' and translate it into a NULL pointer.
10862             Also if a function returns a NULL pointer, eg:
10863             
10864                 SomeClass *bar() { return NULL; }
10865             
10866             Then this used to be wrapped with a SomeClass proxy class holding a NULL
10867             pointer. Now null is returned instead. These changes are subtle but useful.
10868             The original behaviour can be obtained by using the original typemaps:
10869
10870                 %typemap(javaout) SWIGTYPE {
10871                     return new $&javaclassname($jnicall, true);
10872                   }
10873                 %typemap(javaout) SWIGTYPE *, SWIGTYPE &, SWIGTYPE [] {
10874                     return new $javaclassname($jnicall, $owner);
10875                   }
10876                 %typemap(javagetcptr) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [] %{
10877                   protected static long getCPtr($javaclassname obj) {
10878                     return obj.swigCPtr;
10879                   }
10880                 %}
10881
10882             *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
10883
10884
10885 11/12/2002: beazley
10886             Fixed problem with abstract methods and signatures.  For example:
10887
10888             class abstract_foo { 
10889             public: 
10890                 virtual int   meth(int meth_param) = 0; 
10891             }; 
10892  
10893  
10894             class abstract_bar : public abstract_foo { 
10895             public: 
10896                 int meth(int meth_param_1, int meth_param_2) { return 0; }
10897             };
10898
10899             In this case, abstract_bar is still abstract.
10900
10901             Fixes [ 628438 ] Derived abstract class not abstract.
10902             Reported and patched by Scott Michel.
10903
10904 11/11/2002: beazley
10905             Fixed a matching problem with typemaps and array dimensions.  For example, if you
10906             had this:
10907
10908                typedef char blah[20];
10909
10910             and a typemap:
10911
10912                %typemap() char [ANY] {
10913                    ... $1_dim0 ...
10914                }
10915
10916             then $1_dim* variables weren't be expanded properly.  It should work now.
10917             Problem reported by Pankaj Kumar Goel.
10918                
10919 11/07/2002: mkoeppe
10920             Added an experimental new module that dumps SWIG's parse
10921             tree as (Common) Lisp s-expressions.  The module is
10922             invoked with SWIG's -sexp command-line switch.  The output
10923             can be read into Common Lisp.  There is (prototype)
10924             example Lisp code that generates Foreign Function Interface
10925             definitions for use with Kevin Rosenberg's UFFI.
10926
10927             *** EXPERIMENTAL NEW FEATURE ***
10928
10929 11/07/2002: mkoeppe
10930             Removed duplicate declaration of "cpp_template_decl" in
10931             parser.y; bison 1.75 complained.
10932
10933 11/06/2002: cheetah (William Fulton)
10934             [Java] Default primitive array handling has changed like arrays of classes. 
10935             C primitive arrays are no longer wrapped by a Java array but with a pointer 
10936             (type wrapper class). Again the changes have been made for efficiency reasons. 
10937             The original typemaps have been moved into arrays_java.i, so the original 
10938             behaviour can be obtained merely including this file:
10939
10940                 %include "arrays_java.i"
10941
10942             The array support functions are no longer generated by default. They are only
10943             generated when including this file, thus this often unused code is only
10944             generated when specifically requiring this type of array support.
10945
10946             *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
10947
10948 11/05/2002: ljohnson (Lyle Johnson)
10949             [Ruby] Added support for nested module declarations (as was
10950             previously added for the Perl module). So a %module directive
10951             of the form:
10952
10953                 %module "Outer::Inner::Foo"
10954
10955             will nest everything as (in Ruby code):
10956
10957                 module Outer
10958                   module Inner
10959                     module Foo
10960                       # stuff goes here
10961                     end
10962                   end
10963                 end
10964  
10965 11/05/2002: mkoeppe 
10966             [MzScheme] Add an argument (-declaremodule) that generates
10967             code to correctly declare a primitive module extension.
10968             Patch submitted by Bruce Butterfield.
10969
10970 11/02/2002: cheetah (William Fulton)
10971             [Java] Added patch submitted by Michael Cahill to remove unused parameter
10972             warnings for the jenv and cls parameters. This patch also also allows one
10973             to use "void" in the jni typemap for any type without code being generated
10974             attempting to return a value.
10975
10976 10/29/2002: cheetah (William Fulton)
10977             [Java] Array handling is different. Arrays of classes are no longer wrapped
10978             with proxy arrays, eg wrapping
10979
10980                 class X {...};
10981                 X foo[10];
10982             
10983             used to be wrapped with these Java getters and setters:
10984
10985                 public static void setFoo(X[] value) {...}
10986                 public static X[] getFoo() {...}
10987
10988             This approach is very inefficient as the entire array is copied numerous
10989             times on each invocation of the getter or setter. These arrays are now
10990             wrapped with a pointer so it is only possible to access the first array element 
10991             using a proxy class:
10992
10993                 public static void setFoo(X value) {...}
10994                 public static X getFoo() {...}
10995
10996             Arrays of enums have also been similarly changed. This behaviour is now like the 
10997             other SWIG language's implementation and the array library should be used to 
10998             access the other elements. The original behaviour can be achieved using the 
10999             macros and typemaps in arrays_java.i, for example:
11000
11001                 %include "arrays_java.i"
11002                 JAVA_ARRAYSOFCLASSES(X)
11003                 class X {...};
11004                 X foo[10];
11005
11006             *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
11007
11008 10/29/2002: cheetah (William Fulton)
11009             [Java] Two new typemaps javain and javaout for generating the proxy class 
11010             and type wrapper class method calls to the JNI class. The new typemaps are 
11011             really used for transforming the jstype (used in proxy class and type wrapper
11012             classes) to the jtype (used in the JNI class) and visa versa. A javain typemap
11013             is required whenever an in typemap is written and similarly javaout for an out
11014             typemap. An example is probably best to show them working:
11015
11016                 %typemap(javain) Class "Class.getCPtr($javainput)"
11017                 %typemap(javain) unsigned short "$javainput"
11018                 %typemap(javaout) Class * {
11019                     return new Class($jnicall, $owner);
11020                   }
11021
11022                 %inline %{
11023                     class Class {};
11024                     Class * bar(Class cls, unsigned short ush) { return new Class(); };
11025                 %}
11026
11027             The generated proxy code is then:
11028
11029                 public static Class bar(Class cls, int ush) {
11030                   return new Class(exampleJNI.bar(Class.getCPtr(cls), ush), false);
11031                 }
11032
11033
11034             Some new special variables have been introduced in order to use these typemaps.
11035             Here $javainput has been replaced by 'cls' and 'ush'. $jnicall has been replaced by 
11036             the native method call, 'exampleJNI.bar(...)' and $owner has been replaced by 'false'.
11037             $javainput is analogous to the $input special variable. It is replaced by the parameter name.
11038             $jnicall is analogous to $action in %exception. It is replaced by the call to the native
11039             method in the JNI class.
11040             $owner is replaced by either true if %newobject has been used otherwise false.
11041
11042             The java.swg file contains default javain and javout typemaps which will produce the same code
11043             as previously. This change is only of concern to those who have written their own typemaps as
11044             you will then most likely have to write your own javain and javaout typemaps.
11045
11046             The javaout typemap also makes it possible to use a Java downcast to be used on abstract 
11047             proxy base classes. See the Java documentation on dynamic_cast.
11048
11049             *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
11050
11051 10/24/2002: ttn
11052             [Methodology] Upgaded to libtool 1.4.3, presumably w/ better
11053             support for newish platforms (like MacOS X).
11054
11055 10/21/2002: ttn
11056             Fixed Runtime/Makefile.in bug -- thanks to Richard Calmbach.
11057
11058 10/18/2002: ttn
11059             Fixed typo in doh.h -- thanks to Max Horn.
11060
11061 Version 1.3.16 (October 14, 2002)
11062 =================================
11063
11064 10/13/2002: beazley
11065             Fixed bug with %extend directive and %feature reported
11066             by William Fulton.
11067
11068 10/13/2002: beazley
11069             Added OpenVMS build directory (vms).  Contributed by 
11070             Jean-François Pieronne.
11071
11072 10/09/2002: cheetah (William Fulton)
11073             [Java] Added throws clause to the native functions in the JNI class.
11074             The throws clause is the same as the one generated for proxy functions
11075             and module class functions.
11076
11077 09/27/2002: beazley
11078             Fixed some problems with the %import directive and classes that
11079             were defined but not wrapped.  Problem reported by Leslie Brooks,
11080             Gerry Woods, and others.
11081
11082 09/23/2002: cheetah (William Fulton)
11083             [Java] Some error checking added:
11084             1) OutOfMemoryException check in the char * typemaps. 
11085             2) As SWIG treats pointers, references and passing by value all the
11086             same, it is possible to pass a NULL pointer to a function that expects
11087             an object passed by value or by reference. A NullPointerException is 
11088             now thrown under this scenario.
11089
11090 09/20/2002: ttn
11091             [Methodology] Reworked "make clean" and "make install"
11092                           to be more table driven.
11093             [Docs] Explain how to extend "make install" w/ extra-install.list.
11094
11095 09/15/2002: beazley
11096             Deprecation of the "ignore" typemap.   The "ignore" typemap has
11097             been deprecated in favor of a generalization of the "in" typemap.
11098             To ignore an argument, use something like this instead:
11099
11100                 %typemap(in,numinputs=0) int *output (int temp) {
11101                      $1 = &temp;
11102                 }
11103
11104             This change fixes a number of subtle bugs related to the interaction
11105             of the "in" and "ignore" typemaps (which were supposed to be
11106             mutually exclusive).
11107
11108             The use of the numinputs argument is reserved for future expansion.
11109             Currently, values >1 will generate an error.  However, future
11110             releases of SWIG may utilize that to support multi-input typemaps.
11111
11112             %typemap(ignore) still works, but generates a warning message and is
11113             translated to %typemap(in,numinputs=0).
11114
11115             *** POTENTIAL INCOMPATIBILITY ***
11116             *** NEW FEATURE ***
11117
11118 09/15/2002: beazley
11119             Fixed segmentation fault for unnamed structures.  For example:
11120
11121                typedef struct {
11122                } *blah;
11123
11124
11125             Reported by Roger Gibson.
11126             Note: we might be able to generate wrappers in special cases.
11127
11128 09/13/2002: beazley
11129             Minor modification to generated wrapper functions.  Pointer arguments are now
11130             always set to an initial value of 0.   Simplifies typemap writing and cleanup
11131             code (since you can rely on zero-value initialization).   This also greatly
11132             reduces the need to ever write an "arginit" typemap.
11133
11134 09/12/2002: beazley
11135             Minor enhancement to smart-pointer support.  If operator->()
11136             is part of an ignored base class like this,
11137
11138                  %ignore Bar;
11139
11140                  class Foo {
11141                  public:
11142                      int blah();
11143                  };
11144
11145                  class Bar {         /* Ignored */
11146                  public:
11147                      ...
11148                      Foo *operator->();
11149                      ...
11150                  };
11151
11152                  class Spam : public Bar { };
11153
11154             then methods from Foo are still available.  For example,
11155
11156                  >>> s = Spam()
11157                  >>> s.blah()
11158                  0
11159                  >>>
11160
11161              The only catch is that the operator->() itself is not available
11162              (since it wasn't wrapped).   Therefore, there won't be any
11163              __deref__() operation unless it is explicitly added to Spam
11164              (either using %extend or just placing operator->() in the
11165              definition of Spam).
11166
11167 09/11/2002: ttn
11168             [Methodology] Reworked "make check" to be more table driven.
11169             [Docs] Docuemented methodology in Manual/Extending.html.
11170
11171 09/11/2002: ttn
11172             [Docs] Prefixed Manual/*.html with "<!DOCTYPE html ...>" to
11173             pander dotingly to (over-)sensitive editors.
11174
11175 09/10/2002: ttn
11176             [Guile] Converted Examples/guile/simple "make check"
11177             behavior to actually check execution results.  Reduced
11178             iteration counts so that the test doesn't take too long.
11179
11180 09/10/2002: beazley
11181             SWIG-1.3.15 released.
11182
11183
11184 Version 1.3.15 (September 9, 2002)
11185 ==================================
11186
11187 09/09/2002: beazley
11188             Fixed nasty runtime type checking bug with subtypes and inheritance
11189             and templates. 
11190
11191 09/09/2002: cheetah (William Fulton)
11192             [Java] Java exception classes for a method's throws clause can be generated by 
11193             specifying them in a comma separated list in the throws attribute in any one
11194             of the following typemaps: in, out, check, freearg, argout and throws. A classic
11195             example would be to convert C++ exceptions into a standard Java exception:
11196
11197                 %typemap(throws, throws="java.io.IOException") file_exception {
11198                     jclass excep = jenv->FindClass("java/io/IOException");
11199                     if (excep)
11200                         jenv->ThrowNew(excep, $1.what());
11201                     return $null; // or use SWIG_fail
11202                 }
11203
11204                 class file_exception {...};
11205                 void open(const char *filename) throw(file_exception);
11206
11207             The Java method will then be declared with a throws clause:
11208
11209                 public static void open(String filename) throws java.io.IOException {...}
11210
11211 09/08/2002: mkoeppe
11212           * [Guile] Improved the documentation system.  The arglist no
11213             longer gets cluttered with type specification, making it
11214             more readable.  (Also the ILISP function C-u M-x
11215             `arglist-lisp' RET works better this way.)  The types of
11216             arguments are explained in an extra sentence after the
11217             arglist. 
11218             
11219             There are now two documentation-related typemap arguments:
11220
11221                 %typemap(in, doc="$NAME is a vector of integers", 
11222                          arglist="$name")  int *VECTOR { ... }
11223                          
11224             The "arglist" texts of all arguments of a function make up
11225             its arglist in the documentation.  The "doc" texts of all
11226             arguments are collected to make a sentence that describes
11227             the types of the arguments.  Reasonable defaults are
11228             provided. 
11229
11230             As usual, $name is substituted by the name of the
11231             argument. The new typemap variable $NAME is like $name,
11232             but marked-up as a variable.  This means that it is
11233             upper-cased; in TeXinfo mode ("-procdocformat texinfo") it
11234             comes out as @var{name}. 
11235             
11236             The directives %values_as_list, %values_as_vector,
11237             %multiple_values now also have an effect on the
11238             documentation. (This is achieved via the new pragmas
11239             return_nothing_doc, return_one_doc, return_multi_doc.)
11240
11241             Documentation has also improved for variables that are
11242             wrapped as procedures-with-setters (command-line switch
11243             "-emit-setters").
11244
11245           * [Guile] Emit constants as _immutable_ variables.  (This
11246             was broken recently.)
11247
11248 09/07/2002: mkoeppe
11249             [Guile] Updated the typemaps in list-vector.i.
11250
11251 09/07/2002: mkoeppe
11252             Short-circuit the typechecks for overloaded functions.
11253             (The changes in code generation are visible in the new
11254             testcase "overload_complicated".)
11255
11256 09/06/2002: cheetah (William Fulton)
11257             [Java] Solution for [ 596413 ]
11258             New typemap so that the Java proxy classes and type wrapper classes
11259             wrapper constructor modifier can be tailored by users. The default value is 
11260             protected. Normally SWIG generates a constructor like this which can only 
11261             be accessed within one package:
11262
11263               protected Bar(long cPtr, boolean cMemoryOwn) {
11264               ...
11265               }
11266             
11267             If you are using SWIG across multiple packages or want to use this constructor
11268             anyway, it can now be accessed outside the package. To modify use for example:
11269
11270               %typemap(javaptrconstructormodifiers) SWIGTYPE "public"
11271
11272             to change to public for all proxy classes and similarly for all type wrapper classes:
11273             
11274               %typemap(javaptrconstructormodifiers) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [] "public"
11275
11276 09/06/2002: cheetah (William Fulton)
11277             [Java] Added throws typemaps for the Java module. C++ exceptions get converted into
11278             java.lang.RuntimeException Java exceptions. 
11279             
11280             Warning: This may change from java.lang.Runtime exception in the future.
11281
11282 09/05/2002: cheetah (William Fulton)
11283             [Java] Fix for variables declared as references.
11284
11285 09/05/2002: beazley
11286             Fixed [ 605162 ] Typemap local variables. Reported by Lyle Johnson.
11287
11288 09/05/2002: ljohnson (Lyle Johnson)
11289             [Ruby] More updates to the Ruby module documentation, including
11290             a new typemap example that demonstrates how to collect key-value
11291             pairs from an argument list into a Hash.
11292
11293 09/05/2002: beazley
11294             Fixed bug with template expansion and constructors.
11295
11296                 template<class T> class Foo {
11297                 public:
11298                     Foo<T>() { }
11299                 };
11300
11301             The extra <T> in the constructor was carried through in the
11302             name--causing runtime problems in generated modules.
11303             Reported by Jordi Arnabat Benedicto.
11304  
11305 09/05/2002: mkoeppe
11306             [Guile] Support overloading.
11307
11308 09/04/2002: ljohnson (Lyle Johnson)
11309             [Ruby] Updated typemaps for long long and unsigned long long types
11310             to use Ruby 1.7 support for these types when available.
11311
11312 09/04/2002: ljohnson (Lyle Johnson)
11313             [Ruby] Added output typemaps for const reference to primitive
11314             types.
11315
11316 09/04/2002: mkoeppe
11317             [Guile] Fix pass-by-value typemaps.  Reported by Arno
11318             Peters via Debian bugtracking (#156902), patch by Torsten
11319             Landschoff <torsten@debian.org>.
11320
11321 09/03/2002: samjam (Sam Liddicott)
11322             Better reference support.
11323             Functions that want a void** can take a NULL by reference and
11324             the void* will be made for you and then passed-by-reference
11325
11326             Also all integer-class native types can be passed by reference
11327             where an int* or int& etc is needed
11328
11329 09/03/2002: beazley
11330             Changed the evaluation order of preprocessor macro arguments.
11331             Arguments are now expanded by the preprocessor *before* they
11332             are passed to macro expansion.  This fixes a subtle expansion
11333             bug reported by Anthony Heading.
11334
11335 09/03/2002: beazley
11336             Fixed the file include order (again, apparently). See 2/27/99.
11337
11338 09/02/2002: beazley
11339             [Perl] Better exception handling support.  Since Perl error handling
11340             relies on setjmp/longjmp, wrapper functions have been modified slightly
11341             to provide an extra block scope:
11342
11343                 XS(foo) {
11344                    char _swigmsg[SWIG_MAX_ERRMSG] = "";
11345                    const char *_swigerr = _swigmsg;
11346                    {
11347                       /* Normal wrapper function here */
11348                       ...
11349                       SWIG_croak("An error occurred\n");
11350                       ...
11351                       XSRETURN(argvi);      /* Successful return */
11352                       fail:
11353                         /* cleanup code */
11354                    }
11355                    croak(_swig_err);
11356                 }
11357
11358             The macro SWIG_croak(x) sets the value of _swigerr to x and
11359             executes a "goto fail".  The whole wrapper function is enclosed
11360             block scope to provide proper cleanup of C++ objects.  Since
11361             croak executes a longjmp(), there is no way to properly reclaim
11362             resources if this executes in the same scope as the wrapper
11363             function.
11364
11365             The _swigmsg[] variable is normally unused, but can be used
11366             to store small error messages using sprintf or snprintf. It
11367             has a capacity of at least 256 bytes (SWIG_MAX_ERRMSG).
11368             
11369 09/02/2002: beazley
11370             [Tcl] Added better support for exceptions.  Instead of returning TCL_ERROR,
11371             use the macro SWIG_fail to return with an error.  This ensures that
11372             arguments are properly cleaned up.  Exception specifiers are now
11373             handled by default.
11374
11375 09/02/2002: ljohnson (Lyle Johnson)
11376             [Ruby] The type-checking system for the Ruby module has had a flaw
11377             in that some types which should be considered equivalent
11378             weren't. This bug was best demonstrated by the inherit_missing.i
11379             test suite case, which defines a base class "Foo" that is
11380             subclassed by "Bar". The "Foo" class isn't actually wrapped (i.e.
11381             it's not directly accessible from Ruby) but we'd still like to be
11382             able to pass "Bar" instances to functions expecting Foos and have
11383             that work; it wasn't. The revised implementation (similar to that
11384             used for some other language modules) adds a new instance variable
11385             (__swigtype__) to each object that indicates its SWIG type;
11386             that is, each "Bar" instance will now have a string instance
11387             variable called "__swigtype__" whose value is "_p_Bar".
11388
11389             Unless developers were taking advantage of this low-level
11390             implementation detail, they shouldn't notice any compatibility
11391             problems; nevertheless, I'm marking it as a "potential
11392             incompatibility".
11393
11394             *** POTENTIAL INCOMPATIBILITY ***
11395
11396 09/01/2002: ljohnson (Lyle Johnson)
11397             [Ruby] Fixed SF Bug #603199.
11398
11399 08/08/2002: cheetah (William Fulton)
11400             [Java] Added OUTPUT, INPUT and INOUT typemaps in typemaps.i for C++ 
11401             references.
11402
11403 08/27/2002: mkoeppe
11404             [Guile] Fixed error in "lib_std_vector" testcase and
11405             compiler warning in "lib_cdata" testcase.
11406
11407 08/27/2002: ljohnson (Lyle Johnson)
11408             [Ruby] Added the "%mixin" directive, which allows the user to
11409             specify a comma-separated list of module names to mix-in to a
11410             class. So, for example, if you'd like to specify that Ruby's
11411             Enumerable module should be mixed-in to your class Foo, you'd
11412             write:
11413             
11414                 %mixin Foo "Enumerable";
11415                 
11416             or to specify that the modules Fee, Fie and Fo should be mixed
11417             in to Foo:
11418             
11419                 %mixin Foo "Fee,Fie,Fo";
11420                 
11421             *** NEW FEATURE ***
11422
11423 08/27/2002: ljohnson (Lyle Johnson)
11424             [Ruby] Modified the %alias directive so that multiple aliases
11425             can be specified for an instance method by using a comma-separated
11426             list of aliases.
11427
11428 08/27/2002: ljohnson (Lyle Johnson)
11429             [Ruby] Added "throw" typemaps for the Ruby module.
11430
11431 08/26/2002: beazley
11432             Two new command line options for printing dependencies.
11433             'swig -M' lists all file dependencies.  'swig -MM' lists
11434             dependencies, but excludes files in the SWIG library. 
11435             Example:
11436
11437                % swig -M -python example.i
11438                example_wrap.cxx: \
11439                 /u0/beazley/Projects/lib/swig1.3/swig.swg \
11440                 /u0/beazley/Projects/lib/swig1.3/python/python.swg \
11441                 example.i \
11442                 example.h 
11443
11444                % swig -MM -python example.i
11445                example_wrap.cxx: \
11446                 example.i \
11447                 example.h 
11448
11449             *** NEW FEATURE ***
11450
11451 08/26/2002: beazley
11452             Fixed [ 597599 ] union in class: incorrect scope.
11453             Reported by Art Yerkes.
11454
11455 08/26/2002: beazley
11456             Fixed [ 600132 ] Default argument with namespace. 
11457             Reported by Shibukawa Yoshiki.
11458  
11459 08/24/2002: beazley
11460             Automatic C++ exception handling enabled for all language modules.    This is
11461             pretty simple.  If you have a class like this:
11462
11463                 class Foo {
11464                 };
11465                 class Bar {
11466                 public:
11467                     void blah() throw(Foo);
11468                 }
11469
11470             then the generated wrapper code looks like this:
11471
11472                   wrap_Bar_blah() {
11473                        ...
11474                        try {
11475                            arg1->blah();
11476                        } 
11477                        catch (Foo &_e) {
11478                            /* "throw" typemap code inserted. $1 = _e */
11479                        }
11480                        catch (...) {
11481                           throw;
11482                        }
11483                   }
11484             The "throw" typemap can be used to raise an error in the target 
11485             language.  It can do anything.  Here is a very simple example:
11486
11487                  %typemap("throw") Foo {
11488                      PyErr_SetString(PyExc_RuntimeError, "Foo exception");
11489                      return NULL;
11490                  }
11491
11492             To make this work in each language module, simply define a few default
11493             "throw" typemaps for SWIGTYPE, SWIGTYPE *, int, const char *, and a
11494             few common exception types.   That's all there is to it.
11495
11496             Automatic exception handling can be disabled using -noexcept or
11497             setting the NoExcept global variable to 1.
11498             *** NEW FEATURE ***
11499
11500 08/23/2002: beazley
11501             [ Python ]
11502             Automatic translation of C++ exception specifications into error handling code.
11503             For example:
11504  
11505                 class Foo {
11506                 };
11507                 class Bar {
11508                 public:
11509                     void blah() throw(Foo);
11510                 }
11511
11512             In this case, Foo is wrapped as a classic-style class (compatible
11513             with exception handling).  Furthermore, you can write Python code
11514             like this:
11515
11516                 b = Bar()
11517                 try:
11518                     b.blah();
11519                 except Foo,e:     # Note use of exception class here!
11520                     # Handle Foo error
11521                     ...
11522
11523             The object "e" in the exception handler is just a wrapped Foo
11524             object.  Access it like a normal object.
11525
11526             If an exception is not wrapped as a class, a RuntimeError
11527             exception is raised.  The argument to this exception is
11528             the exception object.  For example:
11529  
11530                 class Bar {
11531                 public:
11532                     void blah() throw(int);
11533                 }
11534
11535                 b = Bar()
11536                 try:
11537                    b.blah();
11538                 except RuntimeError,e:
11539                    print e.args[0]       # Integer exception value
11540
11541             Comments:
11542
11543                 -  If a class is used as an exception, it *must* be wrapped
11544                    as a Python classic-style class (new classes don't work).
11545
11546                 -  Automatic exception handling is compatible with %exception.
11547
11548                 -  Use -noexcept to turn off this feature.
11549
11550                 -  The newly introduced "throw" typemap is used to raise
11551                    Python errors (naturally).
11552
11553             *** EXPERIMENTAL NEW FEATURE ***
11554
11555 08/23/2002: beazley
11556             Information from throw() specifiers is now stored in the parse
11557             tree.  For example:
11558
11559                 class Foo {
11560                 public:
11561                      int blah() throw(spam,bar);
11562                 }
11563
11564             The stored information is fully corrected for namespaces and works
11565             with templates.  Uses will follow.
11566             
11567 08/22/2002: beazley
11568             Exception handling code is no longer applied to member access
11569             function.  For example, in this code
11570
11571                 %exception {
11572                    try {
11573                       $action
11574                    } catch(whatever) {
11575                       ...
11576                    }
11577                 }
11578
11579                 class Foo {
11580                 public:
11581                     int x;
11582                     ...
11583                 }
11584
11585             The exception handling code is not applied to accessor functions
11586             for Foo::x.   This should reduce the amount of extra code
11587             generated.
11588
11589             Caveat:  Exception handling code *is* used when attributes are
11590             accessed through a smart-pointer or a synthesized attributed
11591             added with %extend is used.
11592
11593 08/22/2002: beazley
11594             Made more patches to hopefully eliminate problems when compiling SWIG 
11595             as a 64-bit executable.
11596
11597 08/22/2002: beazley
11598             Fixed a bug with const reference members, variables, and static members.
11599             For example:
11600
11601                   class Foo {
11602                   public:
11603                        static const int &ref;
11604                   };
11605
11606             SWIG was trying to generate "set" functions which wouldn't compile. 
11607
11608 08/21/2002: beazley
11609             Made the warning message for "Class X might abstract" off by default.
11610             Enable with -Wall.
11611
11612 08/21/2002: beazley
11613             Refined handling of const and non-const overloaded methods.  If
11614             a class defines a method like this:
11615
11616                 class Foo {
11617                 public:
11618                     int bar(int);
11619                     int bar(int) const;
11620                 }
11621
11622             Then the non-const method is *always* selected in overloading and
11623             the const method silently discarded.  If running with -Wall, a warning
11624             message will be generated.
11625
11626 08/19/2002: beazley
11627             Better support for using declarations and inheritance.   Consider this:
11628
11629                 class Foo {
11630                 public:
11631                       int blah(int x);
11632                 };
11633
11634                 class Bar {
11635                 public:
11636                       double blah(double x);
11637                 };
11638
11639                 class FooBar : public Foo, public Bar {
11640                 public:
11641                       char *blah(char *x);
11642                       using Foo::blah;
11643                       using Bar::blah;
11644                 };
11645
11646             Now SWIG wraps FooBar::blah as an overloaded method that uses all
11647             accessible versions of blah().  See section 15.2.2 in Stroustrup, 3rd Ed.
11648
11649             SWIG also supports access change through using declarations.  For example:
11650
11651                 class Foo {
11652                 protected:
11653                      int x;
11654                      int blah(int x);
11655                 };
11656
11657                 class Bar : public Foo {
11658                 public:
11659                      using Foo::x;
11660                      using Foo::blah;
11661                 };
11662
11663
11664             Caveat:   SWIG does not actually check to see if declarations imported
11665             via 'using' are in the inheritance hierarchy.  If this occurs, the
11666             wrapper code won't compile anyways---not sure it's worth worrying about.
11667           
11668 08/18/2002: beazley
11669             Modified overloading dispatch to not include nodes with an "error" attribute.
11670             A language module can set this if a node couldn't be wrapped and you don't want
11671             it included in the dispatch function.
11672
11673 08/18/2002: beazley
11674             Enhancement to overloaded function dispatch.   The dispatcher is now aware of
11675             inheritance relationships.   For example:
11676
11677                    class Foo { };
11678                    class Bar : public Foo { };
11679                     
11680                    void spam(Foo *f);
11681                    void spam(Bar *b);
11682
11683             In this case, the dispatcher re-orders the functions so that spam(Bar *b) is
11684             checked first---it is more specific than spam(Foo *f).
11685
11686 08/17/2002: beazley
11687             Added -Werror command line option.   If supplied, warning messages are treated
11688             as errors and SWIG will return a non-zero exit code.
11689
11690 08/17/2002: beazley
11691             Fixed [ 596135 ] Typedef of reference can't compile.  For example:
11692
11693                  typedef int &IntRef;
11694                  void foo(IntRef i);
11695
11696             SWIG-1.3.14 generated code that wouldn't compile.
11697
11698 Version 1.3.14 (August 12, 2002)
11699 ================================
11700
11701 08/11/2002: mmatus
11702             Static const members initialized during declaration, and
11703             only them, ie:
11704
11705             struct A
11706             {            
11707                 static const int a = 1 ;  // this one
11708                 static const int b;       // not this one
11709             };     
11710
11711             are emitted like constants (equivalent to enums or
11712             explicit %constant).
11713             
11714             This is because they cannot be added directly to 'cvar'
11715             since they lack the needed reference (well, you can force
11716             them to have a real reference, but in an ugly way which
11717             goes completely again the original purpose of initialize
11718             them during declaration, you also have to deal with extra
11719             linking matters, and it take a while to figure out what is
11720             the problem and how to solve it).
11721             
11722             Please test it with your preferred target language, and
11723             not only the code generation, but really run the example
11724             in the test-suite (static-const-member-2.i) because the
11725             problem and the solution cannot be "fully" appreciated
11726             until you try to load the module and run it.
11727
11728             In some target languages (python specially), this can
11729             produces a difference in the way that the static constant
11730             members 'a' and 'b' are internally wrapped. Hopefully,
11731             they still can be accessed in the same way.
11732
11733
11734 08/11/2002: mmatus
11735             [python] Now static const members can be accessed in a more
11736             natural way, ie, if you have
11737
11738             struct A
11739              {           
11740                 typedef unsigned int viewflags;
11741                 static const viewflags forward_field = 0;
11742                 static const viewflags backward_field;
11743             };     
11744             
11745             now you can do:
11746
11747                 print A.backward_field
11748
11749             and also
11750
11751                 a = A()
11752                 print a.forward_field
11753                 
11754             Note that if the static const members don't have an
11755             initializer (like backward_field), still you can access
11756             them in the same way in the python side, but the
11757             implementation is a quite different: backward_field will
11758             still appear in the cvar entity, and also, you are 
11759             responsible to initialize it in some code unit, and link it
11760             properly. forward_field, by the other hand, will not
11761             appear in the cvar entity but only as a A member, similar
11762             to what happen with enum or %constant members.
11763
11764 08/11/2002: mmatus
11765             [python] Common code in the __setattr__/__getattr__ now
11766             goes to two "free" methods at the beginning of the proxy
11767             file, from where each class use it. This change reduces
11768             the size of the proxy file, specially if you wrap a lot of
11769             small classes in one module (up to 33% in some cases),
11770             making it faster to load too.
11771
11772 08/09/2002: beazley
11773             [Perl5] If a function that returns char * returns NULL,
11774             undef is returned to the Perl interpreter.
11775  
11776 08/09/2002: beazley
11777             Fix to conversion operators and namespaces.  For example:
11778
11779                 namespace ns {
11780                     struct Foo { };
11781                     struct Bar {
11782                         operator Foo*();
11783                     };
11784                 }
11785
11786             In the wrapper code, SWIG was using ->operator Foo*()
11787             when it should have been using ->operator ns::Foo*().
11788
11789             Note: if using %rename with a conversion operator, you
11790             might have to do this:
11791
11792                %rename(toFooPtr) ns::operator ns::Foo*();
11793                                       //      ^^^^ note extra qualifier
11794                namespace ns {
11795                     ...
11796
11797             
11798 08/09/2002: beazley
11799             [Python] Minor enhancement to 'const' variable declarations. 
11800             Normally const declarations are wrapped as read-only variables
11801             accessible only through the cvar attribute (see SWIG.html for
11802             a discussion of why).  However, in many programs, "const" 
11803             declarations may just be constants---making the cvar. access
11804             awkward.  To fix this, "const" declarations are now available
11805             both through cvar. and as a simple name.  For example:
11806
11807                  const int FOO = 42;
11808
11809             In Python:
11810
11811                  >>> print example.cvar.FOO
11812                  42
11813                  >>> print example.FOO
11814                  42
11815
11816             Note: There are cases where the value of a "const" variable
11817             might change.  For example:
11818
11819                  char *const BAR = "Hello World";
11820
11821             In this case, the pointer itself can not change, but the 
11822             data being pointed to could be modified.  In these situations,
11823             cvar.BAR should be accessed to obtained the current value.
11824
11825 08/08/2002: beazley
11826             [Python] Fixed generation of the proxy code (.py files) to more
11827             closely follow the order of declarations as they appear in
11828             the .i file.   In the past, all of the class wrappers appeared
11829             first, followed by function stubs, inserted Python code, and
11830             other details.
11831
11832 08/08/2002: cheetah (William Fulton)
11833             [Java] Proxy method _delete() changed to delete(). There shouldn't ever
11834             be a wrapped function called delete() as it is a C++ keyword and there
11835             is no such thing as a member function in C.
11836
11837             *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
11838
11839             Backwards compatibility can be achieved by adding the function back in
11840             for all proxy classes:
11841             %typemap(javacode) SWIGTYPE %{
11842               public void _delete() {
11843                 delete();
11844               }
11845             %}
11846
11847             Java backwards compatibility summary
11848             ------------------------------------
11849
11850             There are a number of changes that have been made in improving the Java module 
11851             for ver 1.3.14.  If at all possible change your code to take advantages of the 
11852             improvements. If you were using proxy classes you may not notice any backwards 
11853             compatibility issues. Here is an example which will help with most backwards 
11854             compatibility problems where it is not possible to modify the code that uses
11855             the generated output:
11856
11857             Replace:
11858                 %module modulename
11859
11860             With:
11861                 %module (jniclassname="modulename") modulename;
11862                 %typemap(javacode) SWIGTYPE %{
11863                     public long getCPtr$javaclassname() {
11864                         return swigCPtr;
11865                     }
11866                     public void _delete() {
11867                       delete();
11868                     }
11869                 %}
11870                 %pragma(java) jniclassclassmodifiers="public";
11871
11872             The proxy constructors that took parameters (long cPtr, boolean cMemoryOwn)
11873             were public and are now protected. If you were making use of these then you'll 
11874             have to modify your code and the best solution would be to use the new type 
11875             wrapper classes.
11876
11877             The other main areas are the pragmas and global variable wrapping. Replace 
11878             the pragmas with one of the new directives or typemaps mentioned below and use
11879             %rename on the variables.
11880
11881             If you were not using proxy classes, you will have to define a jstype typemap
11882             as well as a jtype typemap.
11883
11884 08/08/2002: cheetah (William Fulton)
11885             [Java] Fix for wrapping two dimension array variables.
11886
11887 08/07/2002: beazley
11888             [Python,Tcl]
11889             Object management now has a much better sense of ownership.
11890             Ownership bits is changed whenever an object is stored in a
11891             global variable or structure member.  For example:
11892
11893                 struct Foo {
11894                     int val;
11895                     Foo *next;
11896                 };
11897
11898             Now in Python
11899
11900                >>> f = Foo()
11901                >>> f.thisown
11902                1
11903                >>> g = Foo()
11904                >>> g.next = f          # Assign a pointer
11905                >>> f.thisown           # Notice ownership change
11906                0
11907                >>>
11908
11909             This scheme is mostly a conservative heuristic designed to 
11910             provide segmentation faults.  It could cause a memory leak
11911             if ownership is changed unnecessarily.  In this case, you can
11912             either write a typemap (that doesn't change ownership), or
11913             manually set the thisown attribute back to 1.
11914
11915 08/07/2002: beazley
11916             [Tcl] Major usability improvements to the object interface.
11917             Suppose you had code like this:
11918
11919                  struct Foo { 
11920                      int x;
11921                      int spam();
11922                  };
11923
11924                  void  blah(Foo *f);
11925
11926             In past versions of SWIG, you could create objects and use
11927             them like this:
11928
11929                 % Foo f
11930                 % f configure -x 3
11931                 % f spam
11932                 37
11933     
11934             The only problem is that if you tried to call blah(), it didn't
11935             work:
11936
11937                 % blah f
11938                 Type Error. Expected _p_Foo
11939                 %
11940
11941             Instead, you had to do this:
11942
11943                 % blah [f cget -this]
11944   
11945             SWIG now automatically extracts the -this pointer, avoiding this
11946             problem.  This means that saying "blah f" is perfectly legal and
11947             everything will still work normally.
11948
11949             Caveat: Since pointer strings start with a leading underscore (_),
11950             don't use this in object names.  For example:
11951
11952                 % Foo _f 
11953                 % blah _f        # Potential crash
11954
11955             Objects now have a -thisown attribute that shows the ownership.
11956             This builds upon the CHANGES 11/24/2001 entry.
11957
11958 08/07/2002: samjam, Sam Liddicott
11959             Properly implemented pointer system using php resources.
11960             Still need to work out whether or not to let script-users call
11961             destructors directly
11962
11963 08/06/2002: beazley
11964             Upgraded mzscheme module to support version 201 and added
11965             overloading support.
11966
11967 08/05/2002: beazley
11968             Added parsing support for extra grouping (in very limited cases).
11969             For example:
11970
11971                     typedef int (FuncPtr)(int, double);
11972
11973             *** EXPERIMENTAL ***
11974             
11975 08/03/2002: ljohnson (Lyle Johnson)
11976             [Ruby] Updates to typemaps.i as those done previously for Perl,
11977             Python and Tcl modules. Now supports reference types with INPUT,
11978             OUTPUT and INOUT typemaps.
11979
11980 08/02/2002: beazley
11981             New library file cstring.i added.  Provides macros for
11982             manipulating char * data.
11983  
11984 08/02/2002: beazley
11985             Deprecated the %new directive.  Use %newobject instead.  For
11986             example:
11987
11988                %newobject foo;
11989                ...
11990                char *foo();
11991
11992             %newobject follows the same rules as %rename, %ignore, %feature,
11993             etc.
11994
11995             *** POTENTIAL INCOMPATIBILITY ***
11996
11997 08/01/2002: cheetah (William Fulton)
11998             [Java] New attribute 'jniclassname' for the module directive allows a way of
11999             changing the JNI class name from the default which uses the modulename with JNI
12000             appended after it.
12001
12002                 %module (jniclassname="name") modulename
12003
12004             If 'name' is the same as 'modulename' then the module class name gets changed
12005             from 'modulename' to modulenameModule.
12006
12007 08/01/2002: beazley
12008             Fixed problem with file include order.  Language specific
12009             directories should take precedence over generic directories.
12010             For example:  "swig_lib/python/foo.i" should be loaded before
12011             "swig_lib/foo.i".    I thought this was the case already, but
12012             apparently it has been broken for quite some time.
12013
12014 08/01/2002: beazley
12015             Added std_deque.i library file.  Work in progress.
12016
12017 08/01/2002: beazley
12018             [Python,Tcl,Perl]
12019             Improvements to typemaps.i.  INPUT/INOUT typemaps perform better
12020             error checking.  Typemaps are now supplied for references like 
12021             int &OUTPUT, double &INOUT, etc.
12022           
12023 08/01/2002: beazley
12024             [Python] Deprecated the T_* and L_* typemaps in typemaps.i.
12025             Multiple return values are always placed in a tuple. Deprecated
12026             the BOTH typemaps.  This is now INOUT (e.g., int *INOUT).
12027
12028             *** POTENTIAL INCOMPATIBILITY FOR PYTHON MODULE ***
12029
12030 08/01/2002: beazley
12031             Deprecated the array.i, carray.i, and timer.i library files.
12032
12033 08/01/2002: beazley
12034             Deprecated the pointer.i library file.  Use cpointer.i instead.
12035             *** POTENTIAL INCOMPATIBILITY ***
12036             
12037 08/01/2002: cheetah (William Fulton)
12038             [Java] For consistency the global variable getters and setters use the JavaBean 
12039             property design pattern like member variables always have. This means if you are 
12040             wrapping a variable called foo, the getter is called getFoo() and the setter is 
12041             called setFoo(). Before the recent changes to the Java module the getters and 
12042             setters were called get_foo() and set_foo(). If you really want the original 
12043             function names use the %rename directive like this: %rename(_foo) Foo;
12044
12045 07/31/2002: beazley
12046             Fixed casting problem with multiple inheritance.  If you had this,
12047
12048                   class foo {};
12049                   class bar : public foo {};
12050                   class baz : public foo {};
12051                   class spam : public bar, public baz {};
12052
12053             then the wrappers wouldn't compile due to an ambiguous cast.
12054             Reported by Art Yerkes.
12055
12056 07/30/2002: cheetah (William Fulton)
12057             [Java] Due to new static typechecking all pointers held in a Java long are part of 
12058             the internal workings and this pointer value in the Java long has become abstracted
12059             data. The type wrapper constructor and getCPtr() methods are as such protected.
12060             If you need to mess around with pointers from Java or for example create a proxy 
12061             class or type wrapper class around a null pointer, add a function/constructor 
12062             to do so with the %javacode typemap. You can also make getCPtr() public again with
12063             the %javagetcptr typemap.
12064
12065 07/30/2002: cheetah (William Fulton)
12066             [Java] Fixes for %typemap(ignore). In particular when ignoring the last parameter
12067             in a function. Also for all parameters in constructors. These mods have also fixed
12068             multi-argument typemaps for proxy classes - SF 581791.
12069
12070 07/30/2002: cheetah (William Fulton)
12071             [Java] %newobject (replacement for %new) now implemented for Java. 
12072
12073 07/29/2002: beazley
12074             Fixed problem with typemap copies, %apply, and %clear inside
12075             C++ namespaces.
12076
12077 07/28/2002: cheetah (William Fulton)
12078             [Java] The JNI class now has package access as the class modifier
12079             has been changed from "public" to nothing. This has been done
12080             as this class is now more for the internal workings of SWIG since the module
12081             class has static type checking for all types.
12082
12083             *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
12084
12085             Backwards compatibility can be achieved by using the %jniclassclassmodifier 
12086             pragma to change it back to "public".
12087
12088 07/28/2002: cheetah (William Fulton)
12089             [Java] Proxy/Shadow classes are generated by default. The -proxy and 
12090             -shadow command line options are deprecated. If you want to use the 
12091             low-level functional interface then use the new -noproxy commandline option.
12092
12093             *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
12094
12095 07/28/2002: cheetah (William Fulton)
12096             [Java] Remaining pragmas shakeup. These were the remaining pragmas and their
12097             new names where changed:
12098
12099             modulebase
12100             modulecode
12101             moduleclassmodifiers
12102             moduleimport => moduleimports
12103             moduleinterface => moduleinterfaces
12104
12105             The moduleimports works slightly differently to how the moduleimport pragma worked. 
12106             Now it actually takes code which gets placed before the class definition so the 
12107             whole import statement has to be given, for example:
12108
12109             %pragma(java) moduleimports=%{
12110             import java.io.*;
12111             import java.math.*;
12112             %}
12113
12114             The moduleinterfaces is slightly different to the old moduleinterface in that if 
12115             more than one interface is required they must be comma separated in one use of 
12116             the pragma, for example:
12117
12118             %pragma(java) moduleinterfaces="Serializable, MyInterface"
12119
12120             These last two pragmas are consistent with the javainterfaces and javaimports 
12121             typemap.
12122
12123             A similar set of pragmas has been introduced, namely:
12124
12125             jniclassbase
12126             jniclasscode
12127             jniclassclassmodifiers
12128             jniclassimport
12129             jniclassinterface
12130
12131             These work in the same way as their module counterparts. Note that previously
12132             the moduleXXX pragmas worked on the old module class which is now called the
12133             JNI class (the class with the native functions). The jniclassXXX pragmas now 
12134             work on the new module class (the class that has all the global functions and
12135             global variable getters and setters when using proxy classes, plus all other
12136             remaining functions when using the low-level procedural interface).
12137
12138             In summary the contents of the pragmas make up a class like this:
12139
12140             <jniclassimports>
12141             <jniclassmodifiers> class modulename extends <jniclassbase> implements <jniclassinterfaces> {
12142                 <jniclasscode>
12143                 ... SWIG generated functions ...
12144             }
12145 }
12146             *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
12147
12148 07/28/2002: cheetah (William Fulton)
12149             [Java] Deprecated modulemethodmodifiers pragma and replaced with 
12150             a better %feature based directive called %javamethodmodifiers.
12151             A useful example would be for synchronisation in multi-threaded apps:
12152
12153             %javamethodmodifiers foo(int a) "public synchronized";
12154
12155             Changes this function from the default ("public") to "public synchronized".
12156
12157             *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
12158
12159 07/26/2002: beazley
12160             Several directives now allow optional configuration parameters.
12161             These include:
12162
12163                 %module(name="value", name="value", ...) modulename
12164                 %import(name="value", ...) "filename.i"
12165                 %extend(name="value", ...) classname {
12166                    ...
12167                 }
12168
12169             These currently have no effect and are reserved for
12170             future expansion.
12171                
12172 07/26/2002: beazley
12173             Enhancements to smart-pointer handling.  SWIG only provides
12174             extra support for a smart-pointer if operator->() returns
12175             a proper pointer.  For example:
12176
12177                  Foo *operator->();
12178
12179             If operator->() returns an object by value or reference,
12180             then SWIG examines the returned object to see if it also
12181             implements operator->().  If so, SWIG chases operator->()
12182             until it can find one that returns a pointer.  This allows
12183             cases like this to work:
12184
12185                  class Foo {
12186                  public:
12187                      void blah();
12188                  };
12189
12190                  class Bar {
12191                    ...
12192                    Foo *operator->();
12193                    ...
12194                  };
12195
12196                  class Spam {
12197                    ...
12198                    Bar operator->();
12199                    ...
12200                  };
12201
12202             For example:
12203
12204                  >>> s = Spam()
12205                  >>> s.blah()      # Invokes Foo::blah()
12206
12207             The s.blah() call actually invokes:
12208
12209                   ((s.operator->()).operator->())->blah();
12210  
12211 07/26/2002: beazley
12212             Fixed a bug with typedef and references.  For example:
12213
12214                  typedef Foo & FooRef;
12215                  FooRef blah();
12216
12217             Previous versions of SWIG generated code that wouldn't
12218             compile.
12219
12220 07/25/2002: beazley
12221             Wrapping of static methods has been improved in proxy classes.  In older
12222             versions of SWIG, if you had this:
12223
12224                   class Foo {
12225                   public:
12226                      static void bar();
12227                   };
12228
12229             The static method was only available as a function Foo_bar().  For example:
12230
12231                   >>> Foo_bar()
12232
12233             Now, the static method can also be invoked through an instance like this:
12234
12235                   >>> f = Foo()
12236                   >>> f.bar()        # Invokes static method
12237
12238             This works with all versions of Python.  Additionally, for Python-2.2,
12239             the static method can be invoked as:
12240
12241                   >>> Foo.bar()
12242
12243             The old-style function is still support for backwards compatibility. If
12244             you care about making your code across different versions of Python,
12245             either use Foo_bar() or access the method through an instance.
12246  
12247 07/25/2002: beazley
12248             Changes to the Python module.  Proxy classes now utilize new Python-2.2
12249             features including properties and static methods.  However, these features
12250             are supported in a way that provides backwards compatibility with older
12251             Python versions.  In other words, proxy classes work with all versions
12252             of Python and only use new features when running on Python-2.2.
12253
12254
12255 07/25/2002: beazley
12256             Modified %extend so that overloaded methods can be added.  For example:
12257
12258                 %extend Foo {
12259                      void bar(int x) { };
12260                      void bar(char *s) { };
12261                      ...
12262                 }
12263
12264             This works with both C++ *and* C.
12265
12266 07/24/2002: cheetah (William Fulton)
12267             [Java] More new typemaps so that the Java proxy classes and type wrapper classes
12268             can be further tailored by users. These are the default code for generating the 
12269             finalize() methods (proxy classes only) and the getCPtr() methods for proxy 
12270             classes and type wrapper classes:
12271
12272             %typemap(javafinalize) SWIGTYPE %{
12273               protected void finalize() {
12274                 _delete();
12275               }
12276             %}
12277             
12278             %typemap(javagetcptr) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [] %{
12279               public static long getCPtr($javaclassname obj) {
12280                 return obj.swigCPtr;
12281               }
12282             %}
12283
12284             The javagetcptr typemap will enable users to handle Java null by overriding
12285             this typemap - a requested feature.
12286
12287             The -nofinalize commandline option has been deprecated. The javafinalize
12288             typemap is more powerful as it will allow the removal of the finalize methods 
12289             for all or any one or more particular proxy class.
12290
12291 07/23/2002: cheetah (William Fulton)
12292             [Java] The getCPtrXXX() function has been changed to a static function and
12293             is now of the form:
12294
12295             protected static long getCPtr(XXX obj) {...}
12296
12297             This is a requested change which will allow Java null pointers to be used as null
12298             can be passed in for obj. However, to achieve this the appropriate code must be
12299             written using the new javagetcptr typemap directive.
12300
12301             *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
12302
12303             Backwards compatibility can be achieved by adding this function back in using the
12304             new javacode typemap:
12305
12306             %typemap(javacode) SWIGTYPE %{
12307
12308               // SWIG-1.3.12 and SWIG-1.3.13
12309               public long getCPtr$javaclassname() {
12310                 return swigCPtr;
12311               }
12312               // SWIG-1.3.11 and earlier
12313               public long getCPtr() {
12314                 return swigCPtr;
12315               }
12316
12317             %}
12318
12319
12320 07/23/2002: cheetah (William Fulton)
12321             [Java] New directive to control constant code generation - %javaconst.
12322             The default handling for handling constants is to get the value through
12323             a JNI call, eg
12324
12325             #define YELLOW 5
12326             #define BIG 1234LL
12327
12328             results in:
12329
12330             public final static int YELLOW = modulename.get_YELLOW();
12331             public final static long BIG = modulename.get_BIG();
12332
12333             Earlier versions of the Java module initialised the value using the C value:
12334
12335             public final static int YELLOW = 5;
12336             public final static long BIG = 1234LL;
12337
12338             This works in most cases, but the value for BIG won't compile as 1234LL is not
12339             valid Java code and this is one of the reasons why the default is now to get the 
12340             values through a JNI call. The side effect is that these 'constants' cannot be used 
12341             in switch statements. The %javaconst directive allows one to specify the
12342             way the constant value is initialised and works like other %feature
12343             directives, eg
12344
12345             %javaconst(0);     // all constants from this point on are initialised using the C value
12346             %javaconst(1) BIG; // just BIG initialised using JNI call (must be parsed before BIG is defined)
12347
12348 07/23/2002: beazley
12349             *** IMPORTANT CHANGES TO THE PYTHON MODULE ***
12350
12351             (1) The Python module now enables shadow/proxy classes by default.
12352             This means that two files are always created by SWIG.  For
12353             instance, if you have this:
12354
12355                  // file: foo.i
12356                  %module foo
12357                  ...
12358
12359             Then swig generates two files "foo_wrap.c" and "foo.py".
12360
12361             (2) The name of the low-level C extension module has been changed
12362             to start with a leading underscore.   This means that you have
12363             to compile the module as follows:
12364
12365                 $ cc -c -I/usr/local/include/python2.2 foo_wrap.c
12366                 $ cc -shared foo_wrap.o $(OBJS) -o _foo.so
12367                                                    ^^^^
12368                                                    note extra underscore
12369
12370             This naming scheme is consistent with other Python modules that
12371             utilize extension code.  For instance, the socket module consists
12372             of "_socket.so" and "socket.py".  In previous versions of SWIG,
12373             the shared object file was named "foocmodule.so".
12374
12375             (3) A new directive can be used to insert Python code into
12376             the corresponding .py file.  For example:
12377
12378                 %pythoncode %{
12379                 def foo():
12380                     print "Hello World"
12381                 %}
12382
12383              This directive allows you to create modules as a mix of C and Python.
12384              Python code is seamlessly added to the module.
12385
12386             (4) The -shadow command line option is deprecated.  This is turned on
12387             by default.
12388
12389             (5) To disable the generation of the extra python file, use the "-noproxy"
12390             command line option.
12391
12392             *** POTENTIAL INCOMPATIBILITY ***
12393             This change will likely break the build environment of projects that
12394             utilize shadow classes.   To fix this, you probably only need to
12395             change the name of the target .so file.  For example, if you have
12396             Makefile information like this:
12397
12398                    TARGET = examplecmodule.so
12399
12400             Just change it to:
12401
12402                    TARGET = _example.so
12403
12404             *** DOCUMENTATION UPDATE ***
12405             The file Doc/Manual/Python.html has been updated to describe these changes.
12406
12407
12408 07/23/2002: beazley
12409             Added -noextern option.   If supplied, SWIG will not generate
12410             extra extern declarations.  This is sometimes an issue on 
12411             non-unix platforms.
12412
12413 07/23/2002: beazley
12414             Added a warning for ignored friend functions.
12415
12416 07/23/2002: beazley
12417             Fixed [ 574498 ] -proxy and %include "pointer.i" clash.
12418             Reported by David Creasy.
12419
12420 07/23/2002: beazley
12421             Fixed [ 576103 ] global destruction warning with shadow.
12422             Perl extensions should no longer report the warning
12423
12424                "Use of uninitialized value during global destruction."
12425  
12426             when running with "perl -w".  Reported by
12427             Brett Williams.
12428
12429 07/23/2002: beazley
12430             In C++ mode, SWIG now always defines namespace std.  By default,
12431             it's empty.  However, this will silence errors from programs
12432             that include statements such as "using namespace std;".
12433             This fixes Bug [ 584017 ] using namespace std generates error.
12434             Reported by Joseph Winston.
12435
12436 07/22/2002: beazley
12437             Added a new warning message for %apply.  If you use %apply but no typemaps
12438             are defined, you will get a warning message.  This should help with
12439             problems like this:
12440
12441                    %apply char *OUTPUT { ... };
12442
12443             In old versions of SWIG, this silently did nothing.  Now you get an error like this:
12444   
12445                    file:line. Warning. Can't apply (char *OUTPUT). No typemaps are defined.
12446
12447 07/22/2002: cheetah (William Fulton)
12448             [Java] Started Java pragma deprecation. Replacements use %typemap based 
12449             directives and enable proxy classes and the new type wrapper classes to be 
12450             tailored in various ways. These are the new typemaps:
12451             
12452             %typemap(javabase)           - base (extends) for Java class
12453             %typemap(javaclassmodifiers) - class modifiers for the Java class: default is "public"
12454             %typemap(javacode)           - java code is copied verbatim to the Java class
12455             %typemap(javaimports)        - import statements for Java class
12456             %typemap(javainterfaces)     - interfaces (extends) for Java class
12457             
12458             And these are the %pragma directives being deprecated:
12459             allshadowbase
12460             allshadowclassmodifiers
12461             allshadowcode
12462             allshadowimport
12463             allshadowinterface
12464             shadowbase
12465             shadowclassmodifiers
12466             shadowcode
12467             shadowimport
12468             shadowinterface
12469             
12470             Note that it is possible to target a particular proxy class:
12471             %typemap(javaimports) Foo "import java.util.*";
12472             or a particular type wrapper class:
12473             %typemap(javaimports) double* "import java.math.*";
12474             Note that $javaclassname in these typemaps are substituted with either the proxy 
12475             classname when using proxy classes or the SWIGTYPE class name.
12476
12477 07/18/2002: cheetah (William Fulton)
12478             [Java] Java module overhaul to implement static type checking of all 
12479             types. 
12480             
12481             1) Changes when using Java Proxy classes
12482             ----------------------------------------
12483
12484             Previously when wrapping global functions: 
12485
12486             class SomeClass{};
12487             void foo(SomeClass* s);
12488             SomeClass* bar();
12489
12490             The native method prototypes used a long for pointers and looked like this:
12491
12492             public class modulename  {
12493                 ...
12494                 public final static native void foo(long jarg1);
12495                 public final static native long bar();
12496             }
12497
12498             and unlike member functions of a C++ class there was no wrapper around the native calls 
12499             to make the use of them more user friendly. They would be used from Java like this:
12500
12501             SomeClass s = new SomeClass(modulename.bar(), false);
12502             modulename.foo(s.getCPtrSomeClass());
12503
12504             Note that the following will have the same effect, but then it would not have 
12505             been possible to call any proxy member functions in SomeClass:
12506
12507             long s = modulename.bar();
12508             modulename.foo(s);
12509
12510             Now wrapper functions are generated:
12511
12512             public class modulename  {
12513                 public static void foo(SomeClass s) {
12514                     // calls the native function
12515                 }
12516
12517                 public static SomeClass bar() {
12518                     // calls the native function
12519                 }
12520             }
12521
12522             Which means these functions can now be used more naturally with proxy classes:
12523
12524             SomeClass s = modulename.bar();
12525             modulename.foo(s);
12526
12527             2) Changes when not using Java Proxy classes
12528             --------------------------------------------
12529
12530             The so called low-level interface was rather low-level indeed. The 
12531             new static type checking implementation makes it less so but it remains a
12532             functional interface to the C/C++ world. Proxy classes are the obvious way to use
12533             SWIG generated code, but for those who want a functional interface all non-primitive
12534             types now have a simple Java class wrapper around the C/C++ type. Pointers and
12535             references to primitive types are also wrapped by type wrapper classes. The type
12536             wrapper classnames are based on the SWIG descriptors used by the other language 
12537             modules. For example:
12538
12539             C/C++ type      Java type wrapper class name
12540             ----------      ----------------------------
12541             int*            SWIGTYPE_p_int
12542             double**        SWIGTYPE_p_p_double
12543             SomeClass*      SWIGTYPE_p_SomeClass
12544             SomeClass&      SWIGTYPE_p_SomeClass
12545             SomeClass       SWIGTYPE_p_SomeClass
12546
12547             Note that everything wrapped by SWIG is accessed via a pointer even when wrapping 
12548             functions that pass by value or reference. So the previous example would now be 
12549             used like this:
12550
12551             SWIGTYPE_p_SomeClass s = example.bar();
12552             example.foo(s);
12553
12554             Note that typedefs that SWIG knows about are resolved, so that if one has 
12555
12556             class Foo{};
12557             typedef Foo Bar;
12558
12559             then any use of Bar will require one to use SWIGTYPE_p_Foo;
12560
12561             Some considerations:
12562             Make sure you make a firm decision to use either proxy classes or the functional 
12563             interface early on as the classnames are different.
12564
12565             3) Pointers and non-parsed types
12566             --------------------------------
12567             Sometimes SWIG cannot generate a proxy class. This occurs when the definition of 
12568             a type is not parsed by SWIG, but is then used as a variable or a parameter. 
12569             For example,
12570
12571             void foo(Snazzy sds);
12572
12573             If SWIG has not parsed Snazzy it handles it simply as a pointer to a Snazzy.
12574             The Java module gives it a type wrapper class around the pointer and calls it 
12575             SWIGTYPE_p_Snazzy. In other words it handles it in the same manner as types are 
12576             handled in the low-level functional interface. This approach is used for all 
12577             non-proxy classes, eg all pointer to pointers and pointers to primitive types.
12578
12579             4) Backwards compatibility
12580             -----------------------
12581             Backwards compatibility is not an issue if you have been using proxy classes and 
12582             no global variables/functions. Otherwise some changes will have to be made. 
12583             The native methods still exist but they are now in a JNI class, which is called 
12584             modulenameJNI. As this class is really part of the internal workings,
12585             it should not be required so the class has become protected. Some pragmas/directives
12586             will hopefully be added to help with backwards compatibility.
12587
12588             *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
12589
12590 07/18/2002: beazley
12591             Modified wrapping of uninstantiated templates returned by
12592             value.  Just to be safe, they are now wrapped by SwigValueWrapper<>
12593             just in case they don't define a default constructor.  This
12594             would be used if you had code like this
12595
12596                  Foo<int> blah();
12597                  void     moreblah(Foo<int> x);
12598
12599             but you didn't instantiate Foo<int> using %template.  
12600             We should probably add a warning for this.
12601
12602 07/17/2002: beazley
12603             Added an error check to detect shadowed template paramaters.
12604             For example:
12605
12606                   template<class T> class Foo {
12607                   public:
12608                         int T;
12609                   };
12610
12611             This results in an error, not a warning.  This warning is
12612             also needed to fix some rather insidious problems like
12613             this:
12614
12615                  struct T {
12616                       int  blah;
12617                  };
12618
12619                  template<class T> class Foo {
12620                  public:
12621                       typedef T Traits;    // Which T is this????
12622                  };
12623
12624             In this case, the template parameter T shadows the outer
12625             structure (which is what you want).
12626
12627 07/16/2002: beazley
12628             Improved support for templates with integer arguments.  SWIG is
12629             much more aware of situations such as this:
12630
12631                 const int Size = 100;
12632
12633                 %template(Foo100) Foo<100>;
12634                 void bar(Foo<Size> *x);   // Knows that Foo<Size> is the same as Foo<100>;
12635
12636 07/15/2002: beazley
12637             Fixed bug with %feature/%ignore/%rename and namespaces.
12638             For example:
12639
12640                 %ignore Foo::Bar
12641                 namespace Foo {
12642                      class Bar {
12643                      ...
12644                      };
12645                 }
12646
12647             Reported by Marcelo Matus.
12648
12649 07/09/2002: beazley
12650             Added parsing support for constructors that try to catch
12651             exceptions in initializers.   For example:
12652
12653               class Foo {
12654                  Bar b;
12655               public:
12656                  Foo(int x) try 
12657                      : b(x) { ... }
12658                  catch(int) {
12659                      ...
12660                  }
12661               }
12662
12663             This has no effect on the generated wrappers.  However, the try and catch
12664             parts of the declaration are ignored.  See Stroustrup, 3rd Ed, section 
12665             14.4.6.1 for details.
12666                    
12667 07/06/2002: beazley
12668             Fixed bug in template symbol table management.  This fixes
12669             two bugs.  First, mixing abstract methods, templates, and 
12670             inheritance no longer generates a failed assertion.
12671  
12672                 template <class T>
12673                 class A {
12674                 public:
12675                    virtual void foo() = 0;
12676                 };
12677  
12678                template <class T>
12679                class B : public A<T>
12680                {
12681                };
12682                %template(A_int) A<int>;
12683                %template(B_int) B<int>;
12684
12685             This fix also fixes a subtle problem with default values and
12686             templates.  For example:
12687
12688                template <class C>
12689                struct B {
12690                    typedef unsigned int size_type;
12691                    static const size_type nindex = static_cast<size_type>(-1);
12692                    void foo(size_type index = nindex);
12693                };
12694
12695             Bugs reported by Marcelo Matus.
12696
12697
12698 07/05/2002: ljohnson (Lyle Johnson)
12699             [Ruby] Changed the definition of the SWIG_ConvertPtr() function
12700             for the SWIG/Ruby runtime support so that it looks like the
12701             Python version. If the last argument (flags) is non-zero,
12702             SWIG_ConvertPtr() will raise an exception for type mismatches
12703             as before. If flags is zero, this function will return -1 for
12704             type mismatches without raising an exception. 
12705
12706             *** POTENTIAL INCOMPATIBILITY FOR RUBY MODULE ***
12707
12708 07/04/2002: beazley
12709             Overloaded functions/methods/constructors now work in many language
12710             modules.  The support is completely transparent--just call the
12711             function normally and SWIG will dispatch to the correct implementation.
12712             There are a variety of issues associated with this.  Please refer
12713             to the overloading section of Doc/Manual/SWIGPlus.html for details.
12714             *** NEW FEATURE ***
12715             
12716 07/04/2002: beazley
12717             Fixed a bug with namespaces, enums, and templates.  For example:
12718
12719                namespace hello {
12720                   enum Hello { Hi, Hola };
12721  
12722                   template <Hello H>
12723                       struct traits
12724                       {
12725                           typedef double value_type;
12726                       };
12727  
12728                  traits<Hi>::value_type say_hi()
12729                  {
12730                     return traits<Hi>::value_type(1);
12731                  }
12732                }
12733             SWIG wasn't generating wrappers that properly qualified 
12734             traits<Hi>.  Reported by Marcelo Matus.         
12735
12736 06/30/2002: beazley
12737             Supplied array variable typemaps for Tcl module.   If you have a
12738             variable like this:
12739
12740                 int foo[10];
12741
12742             then a set function like this is generated:
12743
12744                 void foo_set(int *x) {
12745                    memmove(foo,x,10*sizeof(int));
12746                 }
12747
12748 06/30/2002: beazley
12749             New %fragment directive.   When writing typemaps, it can be easy to
12750             get carried away and write a lot of code.  However, doing so causes
12751             tremendous code bloat.   A common way to solve this is to write 
12752             helper functions.  For example:
12753
12754                 %{
12755                 void some_helper_function() {
12756                      ...
12757                 }
12758                 %}
12759
12760                 %typemap(in) type {
12761                    some_helper_function(...);
12762                 }
12763
12764             The only problem with this is that the wrapper file gets polluted
12765             with helper functions even if they aren't used.    To fix this,
12766             a new fragment directive is available.  For example:
12767
12768                (corrected typo in line below - 06/26/2008)
12769                %fragment("type_header","header") %{
12770                   void some_helper_function() {
12771                       ...
12772                   }
12773                %}
12774
12775                %typemap(in, fragment="type_header") type {
12776                    some_helper_function(...);
12777                }
12778
12779             In this case, the code fragment is only emitted if the typemap is
12780             actually used.   A similar capability is provided for declaration
12781             annotation and the %feature directive.  For example:
12782
12783                %feature("fragment","type_header")  SomeDeclaration;
12784
12785             The first argument to %fragment is the fragment name.  The second argument
12786             is the file section where the fragment should be emitted.  
12787
12788             The primary use of this directive is for writers of language modules
12789             and advanced users wanting to streamline typemap code.
12790
12791             *** EXPERIMENTAL NEW FEATURE ***
12792
12793 06/30/2002: beazley
12794             Supplied memberin typemaps for all arrays in an attempt to eliminate
12795             confusion about their use.
12796
12797 06/29/2002: beazley
12798             Experimental support for smart-pointers.  When a class defines
12799             operator->() like this
12800
12801                class Foo {
12802                   ...
12803                   Bar *operator->();
12804                   ...
12805                };
12806
12807             SWIG locates class Bar and tries to wrap its member variables and
12808             methods as part of Foo.  For example, if Bar was defined like this:
12809
12810                class Bar {
12811                public:
12812                     int x;
12813                     int spam();
12814                };
12815
12816             You could do this (in the target language):
12817
12818               f = Foo()
12819               f.x = 4            # Accesses Bar::x
12820               f.spam()           # Accesses Bar::spam
12821
12822             The primary use of this feature is to emulate the behavior of C++
12823             smart-pointers---which allow attributes to accessed transparently
12824             through operator->.
12825
12826             This feature is supported automatically in SWIG---no special directives
12827             are needed.   To disable this behavior.  Use %ignore to ignore 
12828             operator->.
12829             *** NEW FEATURE ***
12830
12831 06/26/2002: beazley
12832             Deprecated the %except directive.   %exception should be used instead.
12833
12834 06/25/2002: beazley
12835             Major cleanup of the modules directory.  Eliminated most
12836             header files, consolidated module code into single files.
12837
12838 06/24/2002: beazley
12839             Reworked the instantiation of language modules.  All language
12840             modules must now define a factory function similar to this:
12841
12842                 extern "C" Language *
12843                 swig_python(void) {
12844                    return new PYTHON();
12845                 }
12846
12847             This function is then placed in a table and associated with
12848             a command line option in swigmain.cxx.  
12849
12850             This approach has a number of benefits.  It decouples the 
12851             SWIG main program from having to know about the class
12852             definitions for each module.  Also, by using a factory
12853             function, it will be easier to implement dynamic loading
12854             of modules (simply load the file and invoke the factory
12855             function).
12856
12857 06/24/2002: beazley
12858             Fixed syntax error for reference conversions.  For example:
12859
12860                      operator Foo &();
12861
12862 06/24/2002: beazley
12863             Fixed syntax error for operator new[] and operator delete[].
12864
12865 06/24/2002: beazley
12866             Fixed code generation problem for constants and default arguments
12867             involving templates.
12868
12869 06/19/2002: ljohnson (Lyle Johnson)
12870             [Ruby] Fixed a bug for the '-feature' command line argument;
12871             that setting was effectively being ignored and so the feature
12872             name was always set equal to the module name.
12873
12874 06/17/2002: beazley
12875             Fixed problems with static members and enums in templates.
12876
12877 Version 1.3.13 (June 17, 2002)
12878 ==============================
12879
12880 06/16/2002: beazley
12881             Fixed a bug with __FILE__ expansion in the preprocessor.   On Windows,
12882             the backslash (\) is now converted to (\\) in the string literal
12883             used for __FILE__.  Reported by Steve Glaser.
12884
12885 06/14/2002: beazley
12886             Fixed warning message about 'name private in this context'.  The
12887             warning is only generated for public methods.  Reported by
12888             Scott Michel.
12889  
12890 06/14/2002: beazley
12891             Fixed some problems related to template instantiation 
12892             and namespaces.   When SWIG expands a template, it does
12893             so with fully resolved types.  For example, if you have this:
12894
12895                 template<class T> class foo { };
12896                 typedef double Double;
12897                 %template(foo_d) foo<Double>;
12898
12899             then, it is handled as foo<double> in the typesystem.
12900             This fixes a number of subtle problems with inheritance
12901             and templates.
12902
12903 06/14/2002: ljohnson (Lyle Johnson)
12904             [Ruby] Added missing bool typemaps for INPUT, OUTPUT and
12905             INOUT in Lib/ruby/typemaps.i.
12906
12907 05/29/2002: cheetah (William Fulton)
12908             [Java] Fix for a couple of broken pragmas.
12909
12910 05/29/2002: cheetah (William Fulton)
12911             Fix for unnecessary cast when wrapping global variable where 
12912             the type is not parsed by SWIG - Java variables example 
12913             failure as reported by Larry Virden.
12914
12915 06/10/2002: beazley
12916             Modified %template to allow for empty instantiations.
12917
12918                   %template() foo<int,int>;
12919
12920             This registers foo<int,int> with the type system, but
12921             doesn't wrap it (same as %ignore).   This may only be a
12922             temporary measure.   SWIG might be able to automatically
12923             instantiate templates in certain cases.
12924
12925 06/10/2002: beazley
12926             Fixed function prototype problems with Tcl 8.4
12927
12928 06/09/2002: beazley
12929             Fixed problem with templates and location of base classes.  
12930             This one is a little mind-bending, but here is an example
12931             that illustrates:
12932  
12933              template <class ArgType, class ResType>
12934              struct traits
12935              {
12936                   typedef ArgType arg_type;
12937                   typedef ResType res_type;
12938              };
12939  
12940              template <class ArgType, class ResType>
12941              struct Function
12942              {
12943              };
12944  
12945              template <class AF, class AG>
12946              struct Class : Function<typename traits<AF, AG>::arg_type,
12947                                      typename traits<AF, AG>::res_type>
12948              {
12949              };
12950
12951              %template(traits_dd) traits <double, double>;
12952              %template(Function_dd) Function <double, double>;
12953              %template(Class_dd) Class <double, double>;
12954
12955
12956             In this example, the base class of 'Class' is determined from
12957             the Function template, but the types are obtained through typedefs.
12958             Because of this, SWIG could not locate the wrapped base class
12959             (Function<double,double>).   Should be fixed in 1.3.13 even
12960             though I can think of a million other things that might
12961             also be broken.
12962
12963 06/07/2002: beazley
12964             Fixed a problem with conversion operators.  If you had an
12965             operator like this,
12966
12967                   operator double() const;
12968
12969             SWIG was ommitting the "const" qualifier.  This affected
12970             %rename and other directives.  Reported by Zhong Ren.
12971
12972 06/07/2002: beazley
12973             Lessened the strictness of abstract class checking.  If
12974             you have code like this:
12975
12976                 class Foo {
12977                 public:
12978                    virtual int method() = 0;
12979                 };
12980
12981                 class Bar : public Foo {
12982                 public:
12983                     Bar();
12984                    ~Bar();
12985                 };
12986
12987              SWIG will go ahead and generate constructor/destructors
12988              for Bar.  However, it will also generate a warning message 
12989              that "Bar" might be abstract (since method() isn't defined).
12990              In SWIG-1.3.12, SWIG refused to generate a constructor at all.
12991
12992 06/07/2002: beazley
12993             Change to %template directive.  If you specify something like this:
12994
12995                 %template(vi) std::vector<int>;
12996
12997             It is *exactly* the same as this:
12998  
12999                 namespace std {
13000                     %template(vi) vector<int>;
13001                 }
13002
13003             SWIG-1.3.12 tried to instantiate the template outside of the namespace
13004             using some trick.  However, this was extremely problematic and full
13005             holes.   This version is safer.
13006
13007 06/07/2002: beazley
13008             Fixed bug with scope qualification and templates.  For example:
13009
13010                  A<B::C>::DD
13011
13012             Before, this was separated as scopes A<B, C>, and DD.  Fixed now.
13013
13014 06/06/2002: beazley
13015             Allow the following syntax: 
13016                
13017                class A { };
13018                struct B : A { ... };
13019
13020             A base class without a specifier is assumed to be public for a struct.
13021  
13022 06/06/2002: beazley
13023             Fixed syntax error with template constructor initializers.
13024             Reported by Marcelo Matus.
13025
13026 06/06/2002: beazley
13027             Fixed bug with default template arguments. 
13028             Reported by Marcelo Matus.
13029
13030 06/05/2002: beazley
13031             Fixed subtle problems with %rename directive and template
13032             expansion.
13033
13034             Code like this should now work:
13035
13036                %rename(blah) foo<double>::method;
13037                ...
13038                template<class T> class foo {
13039                public:
13040                    void method();
13041                };
13042
13043                %template(whatever) foo<double>;
13044
13045 06/05/2002: beazley
13046             Resolved some tricky issues of multi-pass compilation and 
13047             and inheritance.  The following situation now generates
13048             an error:
13049
13050                   class Foo : public Bar {
13051                   ...
13052                   };
13053
13054                   class Bar {
13055                   ...
13056                   };
13057
13058             The following code generates a warning about incomplete classes.
13059
13060                   class Bar;
13061                   class Foo : public Bar { };
13062
13063             The following code generates a warning about an undefined class.
13064
13065                   class Foo : public Bar { };  // Bar undefined
13066
13067             This fixes a failed assertion bug reported by Jason Stewart.
13068
13069 06/05/2002: ljohnson
13070             [Ruby] Added a warning message for the Ruby module about the lack
13071             of support for multiple inheritance. Only the first base class
13072             listed is used and the others are ignored. (Reported by Craig
13073             Files).
13074             
13075 06/03/2002: beazley
13076             Fixed a bug with struct declarations and typedef. For example:
13077
13078                  typedef struct Foo Foo;
13079                  struct Foo {
13080                     ...
13081                  };
13082
13083             A few other subtle struct related typing problems were
13084             also resolved.
13085
13086 Version 1.3.12 (June 2, 2002)
13087 =============================
13088             
13089 05/30/2002: beazley
13090             Fixed problem related to forward template class declarations and
13091             namespaces.  Bug reported by Marcelo Matus.
13092
13093 05/30/2002: beazley
13094             Added 'make uninstall' target.  Contributed by Joel Reed.
13095
13096 05/29/2002: beazley
13097             Fixed rather insidious bug with %rename, %feature and template specialization.
13098             For example:
13099
13100                 %exception vector::__getitem__ {
13101                      ... some exception ...
13102                 }
13103
13104                 template<class T> class vector {
13105                     ...
13106                     T __getitem__(int index);       // Fine
13107                     ...
13108                 };
13109
13110                 template<> class vector<int> {
13111                     ...
13112                     T __getitem__(int index);       // Oops.
13113                     ...
13114                 };
13115
13116             Now, the %exception directive (and other features) should correctly apply to
13117             both vector and specializations.
13118
13119 05/29/2002: beazley
13120             Subtle changes to %template() directive.   Template arguments are now
13121             reduced to primitive types in template matching.  For example:
13122
13123                template<class T> class vector<T *> {
13124                 ... partial specialization ...
13125                }
13126
13127                typedef int *IntPtr;     // Gross typedef
13128
13129                // Gets the above partial specialization
13130                %template(vectorIntPtr) vector<IntPtr>;
13131
13132             This change is extremely subtle, but it fixes a number of potential
13133             holes in Luigi's STL library modules.    For example:
13134
13135                 typedef int Integer;
13136                 %template(vectori) vector<int>;
13137
13138 05/29/2002: beazley
13139             Fixed rather insidious typemap bug related to const.  const
13140             was being discarded through typedefs.
13141
13142 05/29/2002: ljohnson (Lyle Johnson)
13143             [Ruby] Added input typemaps for const references to primitive
13144             types (in Lib/ruby/ruby.swg).
13145
13146 05/29/2002: cheetah (William Fulton)
13147             [Java] The java arrray support functions are enclosed by 
13148             a SWIG_NOARRAYS #define. Useful if not using arrays and 
13149             it is desirable to minimise the amount of compiled code.
13150
13151 05/29/2002: cheetah (William Fulton)
13152             [Java] Enums were not renamed when using %name or %rename
13153             fix.
13154
13155 05/28/2002: ljohnson
13156             [Ruby] Modified the name of the wrapper functions for the
13157             "new" singleton method and "initialize" instance method for
13158             consistency with the other language modules. The wrapper name
13159             for the function that implements "new" is alloc_classname and
13160             the wrapper name for the function that implements "initialize"
13161             is new_classname.
13162
13163
13164 05/27/2002: beazley
13165             Changes to runtime.  Pointer conversion/creation functions
13166             now almost always have an extra "flags" argument.  For
13167             example:
13168
13169               SWIG_ConvertPtr(obj, void **, swig_type_info *ty, int flags);
13170                                                                 ^^^^^^^^^^
13171             This extra parameter is reserved for future expansion and will
13172             be used for more control over pointers in future versions.
13173
13174 05/27/2002: beazley
13175             Fix for C++ classes with private assignment operators.  It
13176             is now possible to safely return objects like this by value.
13177             Caveat:  the class must provide a copy constructor.
13178             
13179 05/26/2002: beazley
13180             -proxy option added to many language modules.  This is the
13181             same as -shadow.  We are merely changing terminology.
13182             
13183 05/26/2002: beazley
13184             [perl] Fixed some inconsistencies in the -package option.
13185             -package merely sets the package name to be used on the
13186             wrappers.  It does not change the name of the shared library
13187             file or the name of the generated .pm file.  This was
13188             broken at some point, but works again now.
13189
13190 05/25/2002: beazley
13191             [perl] Fixed [ 475452 ] memory leak in return-by-value.
13192             Problem related to static member variables returning newly
13193             allocated objects. Reported by Roy Lecates.
13194  
13195 05/25/2002: beazley
13196             [perl] Fixed [ 513134 ] %BLESSEDMEMBERS isn't always right.
13197             Reported by Fleur Diana Dragan.
13198
13199 05/25/2002: beazley
13200             Fixed [ 540735 ] -importall and the -I option.
13201
13202 05/25/2002: beazley
13203             [guile] Fixed [ 532723 ] Default arg for char* can SegV.  
13204             Error in guile module.  Reported by Brett Williams.
13205
13206 05/25/2002: beazley
13207             Subtle change to typemap application code.  The "freearg"
13208             typemap must exactly match up with the "in" or "ignore"
13209             typemap.  For example:
13210
13211                  %typemap(in) (char *data, int len) { ... };
13212                  %typemap(freearg) char *data { ... }; 
13213
13214                  void foo(char *data, int len);
13215
13216              In this case, the "in" typemap is applied, but the
13217              freearg typemap is not.  This is because the freearg
13218              typemap doesn't match up with the input argument sequence.
13219
13220 05/25/2002: beazley
13221             Fixed [ 548272 ] Default argument code missing braces.
13222             Reported by Brett Williams.
13223
13224 05/25/2002: beazley
13225             Fixed [ 547730 ] SwigValueWrapper needed for constructors.
13226             Reported by William Fulton.
13227
13228 05/25/2002: beazley
13229             Undefined identifiers now evaluate to 0 when evaluating
13230             preprocessor expressions.  For example:
13231
13232                   #if !FOO
13233                   ...
13234                   #endif
13235       
13236             where FOO is undefined or set to some non-numeric value.
13237
13238             Fixes [ 540868 ] #if defined whatever - not parsed.
13239             Reported by Adam Hupp.
13240
13241  
13242 05/24/2002: beazley
13243             SWIG now ignores the C++ 'export' keyword.
13244
13245 05/23/2002: beazley
13246             Some refinement of type-name mangling to account for pointers, arrays,
13247             references, and other embedded type constructs.
13248
13249 05/23/2002: beazley
13250             Initial attempt at supporting template partial specialization.  At
13251             the very least, it is parsed and the classes are stored.  Matching
13252             of instantiations to specialized version is more limited and based on
13253             the SWIG default typemap rules:
13254
13255                      SWIGTYPE *
13256                      SWIGTYPE []
13257                      SWIGTYPE &
13258
13259             Now, why in the world would you want to use this feature?  Other
13260             than allowing for slightly modified class APIs, this capability is
13261             primarily used to provide advanced wrapping support for STL-like
13262             objects.  It can also be mixed with typemaps.  Here is an example:
13263
13264
13265                 /* Generic version */
13266                 template<class T> class vector {
13267                     %typemap(in) vector<T> * {
13268                         // A container of objects 
13269                     }
13270                 };
13271                 /* Partial specialization (pointers) */
13272                 template<class T> class vector<T *> {
13273                     %typemap(in) vector<T> * {
13274                         // A container of pointers to objects.
13275                     }
13276                 };
13277                 /* Specialization (integers). */
13278                 template<> class vector<int> {
13279                     %typemap(in) vector<int> * {
13280                         // A container of integers.
13281                     }
13282                 };
13283
13284              *** EXPERIMENTAL FEATURE ***
13285             
13286 05/23/2002: beazley
13287             Enhancement to typemaps.   Normally, typemap variables are
13288             renamed to avoid conflicts.  For example:
13289
13290                %typemap(in) int * (int temp) {
13291                     $1 = &temp;
13292                }
13293
13294             This results in code that creates and uses variables "temp1","temp2", 
13295             "temp3" and so forth depending on how many times the typemap is used.
13296             Sometimes you want a single variable instead.  To do that, using
13297             the following naming scheme:
13298
13299                 %typemap(in) int *(int _global_temp) {
13300                 }
13301  
13302             Is this case, a single variable _global_temp is emitted in the
13303             wrapper functions.  It is shared across all typemaps.  Repeated
13304             typemaps do not replicate the variable---they use the first one
13305             emitted.
13306             *** NEW FEATURE ***
13307            
13308 05/23/2002: beazley
13309             Minor enhancement to typemaps.  If you have this code,
13310
13311                %typemap(in) Foo (int somevar = 3) {
13312                      ...
13313                }
13314
13315             the default value for somevar is now emitted into the wrapper code.
13316
13317 05/22/2002: beazley
13318             Fixed %extend to be better behaved in namespaces.  If you have code
13319             like this:
13320
13321                 namespace foo {
13322                      struct bar {
13323                         %extend {
13324                              void blah();
13325                         };
13326                      };
13327                 }
13328   
13329             SWIG matches the blah() method to a C function named 
13330             void foo_bar_blah(foo::bar *self).
13331
13332             This is consistent with the non-namespace version.
13333             Bug reported by Marcelo Matus.
13334
13335 05/22/2002: beazley
13336             New library files: cpointer.i, carrays.i, cmalloc.i.  These
13337             provide access to C pointers and memory allocation functions.
13338             See Doc/Manual/Library.html for details.
13339
13340 05/22/2002: cheetah (William Fulton)
13341             [Java] C type char no longer maps to Java type byte, but to Java type char.
13342             It is now treated as a character rather than a signed number. This fits in
13343             with the other language modules and is a more natural mapping as char* is 
13344             mapped as a string of characters. Note that the C signed char type is still
13345             mapped to a Java byte.
13346
13347             *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
13348
13349 05/22/2002: cheetah (William Fulton)
13350             [Java] Improved constants wrapping. Constants (#define and %constant) values 
13351             are now obtained through a JNI call. Previously the value was compiled as 
13352             Java code, but this didn't work for all cases, eg #define 123ULL.
13353
13354 05/22/2002: beazley
13355             Fixed bogus error message with %extend directive and C++
13356             access specifiers.  Reported by Marcelo Matus.
13357
13358 05/22/2002: beazley
13359             Namespaces and enums now work correctly.  For example:
13360
13361                 namespace Foo {
13362                     enum Bar { A, B };
13363                 }
13364
13365             Bug reported by Marcelo Matus.
13366
13367 05/21/2002: beazley
13368             The %types directive can now be used to specify inheritance relationships
13369             in the runtime type system.  For example,
13370
13371                 %types(Foo = Bar);
13372
13373             specifies that Foo isa Bar.    Using this is potentially quite dangerous.
13374             However, this is useful in certain cases (and in the SWIG library).
13375             
13376 05/20/2002: beazley
13377             %nodefault and %makedefault directives now require a trailing semicolon.
13378             For example:
13379
13380                 %nodefault;
13381                 ...
13382                 %makedefault;
13383
13384             In addition both directives can take a class name.  For example:
13385
13386                 %nodefault Foo;
13387
13388                 class Foo {   /* No default constructor/destructor */
13389                 };
13390
13391                 class Bar {  /* Default constructor/destructor generated */
13392                 };
13393
13394             *** POTENTIAL INCOMPATIBILITY ***
13395             If you don't use the trailing semicolon, things will mysteriously break.
13396
13397 05/20/2002: beazley
13398             More improvements to type system handling.  SWIG now correctly handles
13399             template names and parameters in a namespace. For example:
13400
13401                 namespace foo {
13402                     template<class T> class bar { };
13403                     typedef int Integer;
13404
13405                     void blah(bar<Integer> *x);
13406                 };
13407
13408             In the generated code, all of the typenames are properly qualified.
13409
13410 05/17/2002: cheetah (William Fulton)
13411             [Java] deprecated broken -jnic and -jnicpp commandline options. The C or C++ 
13412             JNI calling convention is now determined from the -c++ commandline option.
13413
13414 05/16/2002: cheetah (William Fulton)
13415             [Java] The JCALL macros which exist so that the same typemaps can be used
13416             for generating both the C and C++ JNI calling conventions no longer appear
13417             in the generated code. This is because the output is now passed through the 
13418             SWIG preprocessor which does the macro expansion for either C or C++ (depending
13419             on whether -c++ is passed on the SWIG commandline).
13420
13421             The generation of the functions used in the array typemaps have been adjusted 
13422             to take account of this. The side effect is that any typemaps which contained 
13423             JCALL macros within %{ %} brackets will have to be moved within {} brackets 
13424             so that the SWIG preprocessor can expand the macros.
13425
13426             *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
13427
13428 05/13/2002: beazley
13429             Class templates may now be used as template parameters.  For example:
13430
13431               template<class T, template<class> class C> class Foo {
13432                   ...
13433               };
13434               template<class T> class Bar {
13435                   ...
13436               };
13437
13438               %template(Fooi) Foo<int, Bar>;
13439      
13440             SWIG doesn't really do anything special with this---it's just
13441             another way of specifying a template parameter.  
13442          
13443 05/13/2002: beazley
13444             Minor refinement of template support.  Template parameter names are no longer
13445             required for types.  For example:
13446
13447                 template<bool> class Foo {
13448                 };
13449
13450             Obviously, names are required for template<class T>;
13451
13452 05/12/2002: beazley
13453             New macro expansion in typemaps.  The sequence:
13454
13455                 $descriptor(type)
13456
13457             Will expand into the SWIG type descriptor structor for
13458             the given type.  Type may be any abstract datatype.
13459             For example:
13460
13461                 $descriptor(int *)
13462                 $descriptor(int (*)(int,double))
13463                 $descriptor(vector<int> *)
13464
13465             Caveat: It is *NOT* currently legal to use other typemap
13466             substitution variables in the macro.  For example 
13467             $descriptor($1_type).
13468
13469             The primary purpose of this modification is to better
13470             support typemaps for container objects or to allow typemaps
13471             that might be performing type conversions.
13472             *** NEW FEATURE ***
13473
13474 05/11/2002: beazley
13475             The wrapping of references to primitive types has been
13476             changed as follows:
13477
13478             Arguments of type 'const primitive &' are now passed
13479             by value as opposed to pointers.  Return values of
13480             type 'const primitive &' are returned as values instead of
13481             pointers.
13482
13483             'primitive' is any one of int, short, long, long long,
13484             char, float, double, bool (as well as unsigned variants).
13485             
13486             This change is being made to better support C++ wrapping--especially
13487             code that makes use of templates and the STL.
13488             
13489 05/11/2002: beazley
13490             The %template directive can now be used to access templates
13491             in a namespace.  For example:
13492
13493                 namespace std {
13494                     template<class T> class complex {
13495                        T re, im;
13496                     public:
13497                        complex(T _r = T(), T _i = T()) : re(_r), im(_i) { }
13498                        T real() { return re; }
13499                        T imag() { return im; }
13500                     };
13501                 }
13502
13503                 %template(complex) std::complex<double>;
13504
13505             Note: There are some very subtle namespace/symbol table 
13506             management issues involved in the implementation of this.
13507             It may not work in certain cases.
13508
13509 05/10/2002: beazley
13510             Member template constructor support added.  For example:
13511
13512                template<typename _T1, typename _T2> 
13513                struct pair {
13514                  _T1 first;
13515                  _T2 second;
13516                  pair() : first(_T1()), second(_T2()) { }
13517                  template<class _U1, class _U2> pair(const pair<_U1,_U2> &x);
13518                };
13519
13520             To instantiate the template, use %template and %extend.
13521             For example, this expands the constructor into a default
13522             copy constructor:
13523
13524                %extend pair {
13525                   %template(pair) pair<_T1,_T2>;
13526                }
13527             
13528             Highly experimental.  Other uses may be broken.
13529
13530 05/10/2002: beazley
13531             The %extend (%addmethods) directive no longer works unless
13532             it appears in the public section of a class.   An error
13533             message is now generated (as opposed to a segmentation fault).
13534
13535 05/09/2002: beazley
13536             New %warnfilter() directive.  This directive attaches a warning
13537             filter to specific declarations and has the same semantics as
13538             %rename, %ignore, %feature, and so forth.  For example:
13539
13540                %warnfilter(501) foo;   // Suppress overloaded warning
13541                int foo(int);
13542                int foo(double); 
13543
13544             or
13545
13546                %warnfilter(501) Object::foo(double);
13547                class Object {
13548                public:
13549                   int foo(int);
13550                   int foo(double);
13551                };
13552
13553             This feature only suppresses warnings in later stages of code
13554             generation.  It does not suppress warnings related to preprocessing
13555             or parsing.
13556             *** NEW FEATURE ***
13557
13558 05/09/2002: beazley
13559             SWIG now supports C99 variadic preprocessor macros.  For example:
13560
13561                #define debugf(fmt,...) fprintf(stderr,fmt,__VA_ARGS__)
13562
13563             The argument "..." is used to indicate variable arguments which
13564             are all placed into the special argument name __VA_ARGS__ in
13565             the macro expansion.  
13566
13567             SWIG also implements the GNU (##) extension for swallowing the
13568             preceding comma when __VA_ARGS__ is empty. For example:
13569
13570                #define debugf(fmt,...) fprintf(stderr,fmt, ##__VA_ARGS__)
13571
13572             Here is how this is expanded:
13573
13574                debugf("%d", 3)  --> fprintf(stderr,"%d",3)
13575                debugf("Hello")  --> fprintf(stderr,"Hello" )
13576
13577             (notice the deleted comma).
13578             *** NEW FEATURE ***
13579
13580 05/08/2002: samjam (Sam Liddicott)
13581             Many changes to php module.  Shadow classes are now implemented
13582             entirely in native C and no need for php-code shadow wrappers
13583             Populated template config.m4 and Makefile.in as needed by
13584             phpize are generated.
13585
13586 05/08/2002: ljohnson (Lyle Johnson)
13587             [Ruby] A copy constructor is now turned into a "clone"
13588             instance method (see Dave's change for copy constructors
13589             dated 4/7/2002). This seems like the appropriate thing
13590             to do for Ruby code.
13591
13592 05/08/2002: ljohnson (Lyle Johnson)
13593             [Ruby] Fixed [ 553864 ] Inline destructor code not written.
13594
13595 05/08/2002: beazley
13596             %ignore behaves better with constructors, destructors, and the
13597             type system in general.   For constructors and destructors,
13598             %ignore now suppresses the creation of a default constructor
13599             or destructor.  For example:
13600
13601                  %ignore ~Foo;
13602                  class Foo {
13603                  public:
13604                      Foo();
13605                     ~Foo();
13606                      ...
13607                  };
13608
13609             In SWIG-1.3.11, ~Foo() simply "disappeared" and the code generator
13610             created a wrapper for a default destructor (as if it was never
13611             declared in the interface).  In SWIG-1.3.12, %ignore suppresses
13612             the creation of a destructor if one is actually defined. 
13613
13614             Similarly, even though a declaration is ignored, information
13615             may still be needed to properly handle types. For example, here
13616             is a very subtle error that is fixed by this change:
13617
13618                 %ignore std::string;         // Prevent class wrapping
13619                 namespace std {
13620                    class string {
13621                         ...
13622                    };
13623                    %typemap(in) string * {
13624                         ...
13625                    }
13626                 }
13627                 
13628                 void foo(std::string *s);   // Broken.
13629
13630             Before this fix, %ignore would cause the class definition to disappear.
13631             This, in turn, would cause the typemap to be misapplied. 
13632  
13633 05/08/2002: beazley
13634             Minor changes to %rename, %ignore, %feature, and related directives
13635             for better support of destructors.  Destructors can now be precisely
13636             tagged.  For example:
13637
13638                   %ignore Foo::~Foo;
13639                   %feature("action") ~Bar {
13640                       ...
13641                   }
13642              
13643             *Developer warning* 
13644             Operations such as renaming and feature attachment for classes used to
13645             be applied to destructors as well.  For instance, if you did this:
13646  
13647                  %rename(Bar) Foo;
13648
13649             The operation applied to the class itself, the constructor, and
13650             the destructor.   This is no longer the case.  Now such operations
13651             will only apply to the class and the constructor.  Note: if you
13652             were relying on this for class renaming, be aware that renamed
13653             classes should really only be handled at the level of the class itself
13654             and not the level of individual declarations in the class (although
13655             they can be renamed individually if needed).  As far as I know,
13656             the Language class is already taking care of this case correctly.
13657
13658 05/07/2002: beazley
13659             New set of tests.  The Examples/test-suite/errors directory contains
13660             tests that try to exercise all of SWIG's error and warning messages.
13661
13662 05/07/2002: beazley
13663             Start of a warning framework.  Warning messages are now assigned numeric values
13664             that are shown in warning messages.   These can be suppressed using the
13665             -w option.  For example:
13666
13667                  swig -w302 example.i
13668                  swig -w302,305 example.i
13669
13670             Alternatively, the #pragma preprocessor directive can be used to disable this:
13671
13672                  #pragma SWIG nowarn=302
13673                  #pragma SWIG nowarn=302,305
13674
13675             Note: Since SWIG is a multi-pass compiler, this pragma should
13676             only be used to change global settings of the warning filter.  It should
13677             not be used to selectively enable/disable warnings in an interface file.
13678             The handling of #pragma occurs in the C++ preprocoessor and affects all 
13679             subsequent stages of compilation.
13680
13681             The -Wall option turns on all warnings and overrides any filters that
13682             might have been set.
13683
13684             Warnings can be issued from an interface using %warn.  For example:
13685
13686                  %warn "110:%section is deprecated"
13687
13688             The first part of a warning message is an optional warning number.
13689             A complete set of warning numbers is found in Source/Include/swigwarn.h.
13690             *** NEW FEATURE ***
13691
13692 05/07/2002: beazley
13693             Internal parsing change.   Directives to include files now use brackets [ ... ]
13694             instead of { ... }.   
13695
13696                   %includefile "foo.i" [
13697                      ...
13698                   ]
13699
13700             The use of { ... } was a bad choice because they were included implicitly by
13701             the preprocessor and made it impossible to properly detect legitimate missing '}' 
13702             errors.
13703
13704 04/16/2002-
13705 05/02/2002: beazley
13706             SWIG European Tour: Paris-Amsterdam-Bath.
13707
13708 04/23/2002: beazley
13709             The %addmethods directive has been renamed to %extend.
13710             For example:
13711
13712                 class Foo {
13713                 ...
13714                 };
13715
13716                 %extend Foo {
13717                    int blah() { ... };
13718                    int bar() { ... };
13719                    ...
13720                 };
13721
13722             Motivation: the %addmethods directive can be used for many
13723             other tasks including adding synthesized attributes, constructors,
13724             and typemaps. Because of this, "addmethods" is somewhat misleading.
13725             %extend more precisely describes this operation---extension of a
13726             class or structure.
13727
13728             *** POTENTIAL INCOMPATIBILITY ***
13729             %addmethods still works via a macro definition.   However,
13730             a warning message may be generated.   Errors involving %addmethods
13731             will actually refer to the %extend directive.  
13732             
13733 04/23/2002: beazley
13734             Further refinement of the type system.  Typedef now
13735             propagates through functions, pointers to functions,
13736             and pointers to member functions.
13737             For example:
13738
13739                typedef int Integer;
13740                void foo(int (*x)(int), Integer (*y)(Integer));
13741
13742             In this case, arguments 'x' and 'y' have exactly
13743             the same type (and would obviously accept objects
13744             of either type).
13745
13746             Similarly, consider this:
13747
13748                class Foo {
13749                };
13750
13751                typedef Foo Bar;
13752                void bar(int (Foo::*x)(int), int (Bar::*y)(int));
13753
13754             In this case, arguments x and y are the same 
13755             type (via typedef).
13756             
13757 04/22/2002: beazley
13758             SWIG now generates a warning message if any part of
13759             an expression involves values from a private part of a class.
13760             For example:
13761
13762                 class Foo {
13763                 private:
13764                     static int X;
13765                 public:
13766                      void blah(int a, int b = X);   // Warning
13767                 };
13768
13769             In this case, the default argument is ignored.  There
13770             are workarounds, but they are rather clumsy.  For instance,
13771             you might do this:
13772
13773                     %feature("action") blah(int,int) {
13774                        if ($nargs == 1) {
13775                           result = blah(arg1);
13776                        } else {
13777                           result = blah(arg1,arg2);
13778                        }
13779                     }
13780                     void blah(int a, int b = 0);
13781
13782
13783 04/21/2002: beazley
13784             Use of the %inline directive inside a namespace is
13785             forbidden and now generates an error message.   This is
13786             not allowed since the inlined code that is emitted is
13787             not placed inside a namespace.  This confuses other
13788             stages of parsing.
13789                     
13790 04/21/2002: beazley
13791             Some bug fixes to casting operations and expression
13792             parsing.   Due to some parsing issues, it is not 
13793             currently possible to use casts for all possible
13794             datatypes.   However, the common cases work.
13795
13796 04/20/2002: beazley (Amsterdam)
13797             Member templates now work.  Simply use the %template
13798             directive inside a class or %addmethods to create
13799             instantiations (see Doc/Manual/SWIGPlus.html).  Supporting
13800             this was easy---earlier changes to templates made it
13801             possible using only a two-line modification to the parser
13802             and a few minor modifications elsewhere.  Hmmm, come to 
13803             think of it, the smoke was rather thick in that Internet "cafe".
13804             *** NEW FEATURE ***
13805             
13806 04/19/2002: beazley (TGV)
13807             Improved handling of non-type template parameters.  For example:
13808
13809                  vector<int,100>;
13810
13811             Simple numbers and strings can be used with the %template
13812             directive as well.  For example:
13813
13814                  %template(vecint100) vector<int,100>;
13815
13816             Note: Arithmetic expressions are not currently allowed.
13817             
13818             Default template arguments now work and do not have to
13819             be given to %template.
13820                         
13821 04/18/2002: beazley (Paris)
13822             Change in internal template handling.  Template
13823             parameters are now fully integrated into the type
13824             system and are aware of typedefs, etc.  This builds
13825             upon the change below.   
13826
13827             *** DEVELOPER WARNING ***
13828             Word of caution to language module writers.  The "name"
13829             parameter of certain parse tree nodes (classes, functions, etc.)
13830             may be parameterized with types.   This parameterization is
13831             done using SWIG type-strings and not the underlying C version.
13832             For example,
13833
13834                int max<int *>(int *,int *)  
13835
13836             has a name of "max<(p.int)>".  If you use the name directly,
13837             you may get syntax errors in the generated code.  To fix this,
13838             use SwigType_namestr(name) to convert a parameterized name 
13839             to a C name with valid syntax.  The internal version is
13840             used to reduce template types to a common representation 
13841             and to handle issues of typedef.
13842             
13843 04/16/2002: beazley (somewhere over the Atlantic)
13844             Enhancement of typedef resolution.  The type system is now
13845             aware of template arguments and typedef.  For example:
13846
13847                   typedef int Integer;
13848                  
13849                   foo(vector<int> *x, vector<Integer> *y);
13850
13851             In this case, vector<int> and vector<Integer> are
13852             the same type.   There is some interaction between this
13853             mechanism and the implementation of typemaps.  For example,
13854             a typemap defined for vector<int> * would apply to either type.
13855             However, a typemap for vector<Integer> * would only apply to
13856             that type.
13857
13858             Typedefs and typemaps and matched by left-most expansion.
13859             For example:
13860
13861               vector<Integer,Integer> --> 
13862               vector<int, Integer> -->
13863               vector<int, int>
13864
13865
13866 04/24/2002: cheetah (William Fulton)
13867             [Java] Changes to Java shadow classes.
13868             Overcomes a bug where the module assumed that a pointer to a derived
13869             class could be used in place of a pointer to a base class. Thanks 
13870             to Stephen McCaul for analysing the bug and submitting patches.
13871
13872             A consequence is that the getCPtr() method in each shadow class has
13873             disappeared and has been replaced with a getCPtrXXX(), where XXX is the 
13874             shadow class name. If you have code that previously used getCPtr(), 
13875             and the associated class is wrapping a C struct or a C++ class that
13876             is not involved in an inheritance chain, just use the new method. If
13877             however, the class is involved in an inheritance chain, you'll have
13878             to choose which pointer you really want. Backwards compatibility 
13879             has been broken as not using the correct pointer can lead to weird bugs
13880             through ill-defined behaviour. If you are sure you want the old methods, 
13881             you could add them back into all shadow classes by adding this at the 
13882             beginning of your interface file:
13883
13884             %pragma(java) allshadowcode=%{
13885               public long getCPtr(){
13886                 return swigCPtr;
13887               }
13888             %}
13889
13890             Please see entry dated 07/23/2002 to see how to do this after the deprecation
13891             of the allshadowcode pragma.
13892
13893             *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
13894
13895 04/13/2002: beazley
13896             Fixed problem with default arguments and references.   Declarations such 
13897             as this should now work:
13898
13899                 void foo(const string &x = "Hello");
13900
13901 04/12/2002: beazley
13902             Added typemap $* substitutions for typemaps involving arrays.
13903             Requested by William Fulton.
13904
13905 04/11/2002: beazley
13906             Template specialization is now supported.  For example:
13907
13908                template<> class vector<int> {
13909                ...
13910                };
13911
13912             When the %template directive is used, it will use a specialization
13913             if one is defined.   There are still some limitations. Partial
13914             specialization is not supported.  A template of type <void *> does
13915             not match all pointers.
13916             *** NEW FEATURE ***
13917
13918 04/11/2002: beazley
13919             Major change to template wrapping internals. Template declarations are
13920             no longer processed as macros but now result in real parse-tree
13921             nodes.  The %template directive expands these nodes into a
13922             specific instantiation.   This change enables a number of
13923             new and interesting capabilities:
13924
13925             Directives such as %rename, %feature, and %addmethods can
13926             now be applied to uninstantiated templates.  For example:
13927
13928               %rename(barsize) vector::bar(char *buf, int len);
13929               ...
13930               template<typename T> class vector {
13931               public:
13932                  ...
13933                  void bar(char *buf);
13934                  void bar(char *buf, int len);   // Renamed
13935                  ...
13936               };
13937
13938               %template(intvector) vector<int>;   // Renaming carries through
13939
13940             
13941             By parsing templates into an internal data structure, it will
13942             be possible to support specialization (and maybe partial
13943             specialization).
13944             
13945             This is highly experimental and a work in progress.
13946
13947             *** POTENTIAL INCOMPATIBILITY ***
13948             In SWIG-1.3.11, template declarations were simply processed
13949             as weird macros.  No other information was retained.   This 
13950             made it impossible to support more advanced features and 
13951             complicated many other parts of the implementation.
13952
13953 04/09/2002: beazley
13954             Change to template class wrapping.   There were a variety of
13955             "issues" with the old approach related to parsing, the type
13956             system, and namespaces.   These changes are meant to rectify
13957             some of these problems:
13958
13959             A specific instantiation of a template can now be specified
13960             by including the class inline like this:
13961  
13962                   class vector<int> {
13963                   public:
13964                        vector();
13965                       ~vector();
13966                        ... whatever ...
13967                           };
13968
13969             This is template specialization, but partial specialization is
13970             not yet implemented.
13971             
13972             The %template directive has been modified to expand roughly as
13973             follows:
13974
13975                  %template(vecint) vector<int>;
13976
13977             becomes
13978
13979                  %rename(vecint> vector<int>;
13980                  class vector<int> {
13981                  public:
13982                      vector();
13983                      ...
13984                  };
13985
13986             Note that this simply builds upon the code above (templates
13987             included inline).
13988
13989             This modified approach to wrapping fixes some subtle type
13990             issues.  For instance, you can now define typemaps and typedefs
13991             like this:
13992
13993                  %typemap(in) vector<int> * {
13994                  ...
13995                  }
13996                  typedef vector<int> intvector;
13997                  ...
13998                  void blah(intvector *v);   // Gets the above typemap
13999
14000             This did not work in SWIG-1.3.11 due to a peculiarity of
14001             the template implementation.
14002
14003             %template(name) no longer installs the template as a class
14004             with name "name".   This might break %addmethods as described
14005             in the manual.  For example:
14006
14007                  %template(vecint) vector<int>;
14008                  %addmethods vecint {    // Fails. vecint not a class
14009                    ...
14010                  };
14011            
14012             To fix this, just use the template name instead:
14013
14014                  %addmethods vector<int> {
14015                      ...
14016                  }
14017
14018             Note: This technique might be a way to implement some bizarre
14019             template specialization techniques.   For example:
14020
14021                  %addmethods vector<int> {
14022                      // Only applied if vector<int> instantiated later
14023                      %typemap(in) vector<int> * {
14024                         ...
14025                      }
14026                      ...
14027                  };
14028
14029             *** POTENTIAL INCOMPATIBILITY ***
14030              
14031 04/08/2002: beazley
14032             Fixed [ 540868 ] #if defined whatever - not parsed.  SWIG should
14033             now correctly handle preprocessor directives like this:
14034
14035                 #if defined __cplusplus
14036                 ...
14037                 #endif
14038              
14039             Note: was implemented previously, but there was a minor bug.
14040             Reported by Adam Hupp.
14041                    
14042 04/07/2002: beazley
14043             %readonly and %readwrite are deprecated due to a change in the 
14044             implementation.  Instead of being pragmas, mutability is now
14045             controlled as a "feature" using the following two directives:
14046
14047                  %immutable;
14048                  int x;           // read-only variable
14049                  int y;           // read-only variable
14050                  %mutable;
14051                  int z;           // Modifiable
14052
14053             %immutable and %mutable are much more powerful than their older
14054             counterparts.  They can now pinpoint a specific declaration like
14055             this:
14056
14057                %immutable  x;         /* Any x */
14058                %immutable  Foo::x;    /* x in class Foo */
14059
14060             In fact, the matching algorithm is the same as for %rename, 
14061             %ignore, and other directives.   This means that the declaration
14062       
14063                %immutable  Foo::x;
14064
14065             would not only apply to class Foo but to all derived classes
14066             as well.
14067
14068             *** POTENTIAL INCOMPATIBILITY ***
14069             %immutable and %mutable must be terminated by a semi-colon.  This
14070             differs slightly from the older %readonly and %readwrite directives.
14071             Since %immutable and %mutable can be applied to declarations the
14072             semicolon is needed to distinguish between a global feature and 
14073             one targeted to a single declaration.  Note: this incompatibility is the
14074             primary reason for changing the name of the directive.
14075
14076 04/07/2002: beazley
14077             New handling of copy constructors.  If a class defines 
14078             constructors like this:
14079
14080                 class Foo {
14081                 public:
14082                       Foo();
14083                       Foo(const Foo &);       // Copy constructor
14084                       ...
14085                 };
14086
14087             SWIG now generates a function copy_Foo() for the copy
14088             constructor.
14089
14090             In previous verions, this generated a name-clash and an
14091             error message.   To preserve backwards compatibility, SWIG
14092             does not change the behavior if %rename is used to resolve
14093             the name conflict.   However, if no name resolution is made,
14094             this new approach is used.
14095
14096             Copy constructors may be handled as a special case in the
14097             target language.  However, this is up to the language module
14098             itself.
14099                   
14100 04/07/2002: beazley
14101             The %template directive is now namespace aware.   This allows
14102             code like this:
14103
14104                 namespace foo {
14105                     template<typename T> max(T a, T b) { return a > b ? a : b; }
14106                 }
14107
14108                 using namespace foo;
14109                 %template(maxint) max<int>;            // Ok
14110
14111                 namespace bar {
14112                    using foo::max;
14113                    %template(maxdouble) max<double>;   // Ok
14114                 }
14115
14116             Caveat: the template name supplied to %template must be defined in the
14117             same scope in which the %template directive appears.   This code is
14118             illegal:
14119
14120                 %template(maxint) foo::max<int>;
14121
14122 04/07/2002: beazley
14123             Minor enhancement to preprocessor.   The preprocessor can now perform
14124             string comparison.   For example:
14125
14126                #define A "hello"
14127                ...
14128                #if A == "hello"
14129                ...
14130                #endif
14131
14132             The primary use of this is in SWIG macros.  For example:
14133
14134               %define FOO(x) 
14135               #if #x == "int"
14136               /* Special handling for int */
14137               ...
14138               #endif
14139               %enddef
14140
14141             Normal users can probably safely ignore this feature.  However, it may
14142             be used in parts of the SWIG library.
14143
14144 04/07/2002: beazley
14145             Further refinement of default constructor/destructor wrapper generation.
14146             SWIG is now much more aware of pure virtual methods. For instance:
14147
14148               class A {             /* Abstract */
14149               public:
14150                  virtual void method1() = 0;
14151                  virtual void method2() = 0;
14152               };
14153               class B : public A {  /* Abstract */
14154               public:
14155                  virtual void method1() { };
14156               };
14157
14158               class C : public B {  /* Ok */
14159               public:
14160                  virtual void method2() { };
14161               };
14162
14163             In this case, SWIG will only generate default constructors for C.
14164             Even though B looks fine, it's missing a required method and is abstract.
14165
14166 04/04/2002: beazley
14167             Subtle change to structure data member access.  If you
14168             have a structure like this:
14169
14170                 struct Foo {
14171                     Bar   b;
14172                 };
14173
14174             The accessor functions for b are generated as follows:
14175
14176             (1) If b is *not* defined as a structure or class:
14177
14178                 Bar Foo_b_get(Foo *self) {
14179                     return self->b;
14180                 }
14181                 void Foo_b_set(Foo *self, Bar value) {
14182                     self->b = value;
14183                 }
14184
14185             (2) If b *is* defined as a structure or class:
14186
14187                 Bar *Foo_b_get(Foo *self) {
14188                     return &self->b;
14189                 }
14190                 void Foo_b_set(Foo *self, Bar *value) {
14191                     self->b = *value;
14192                 }
14193             See the "Structure data members" section of Doc/Manual/SWIG.html
14194             for further details.
14195
14196             *** POTENTIAL INCOMPATIBILITY ***
14197             This may break interfaces that relied on a lot of a undeclared
14198             structure and class names.    To get the old behavior, simply
14199             use a forward declaration such as "struct Bar;"
14200             
14201 04/04/2002: beazley
14202             C++ namespace support added.  SWIG supports all aspects of
14203             namespaces including namespace, using, and namespace alias
14204             declarations.    The default behavior of SWIG is to flatten
14205             namespaces in the target language.  However, namespaces are
14206             fully supported at the C++ level and in the type system.
14207             See Doc/Manual/SWIGPlus.html for details on the implementation.
14208      
14209 04/02/2002: cheetah (William Fulton)
14210             [Java] Sun has modified javac in jdk1.4 to no longer compile
14211             an import of an unnamed namespace. To fix this SWIG no longer 
14212             generates the import for packageless classes.
14213             http://developer.java.sun.com/developer/bugParade/bugs/4361575.html
14214             As reported SF #538415.
14215
14216 03/27/2002: ljohnson (Lyle Johnson)
14217             [Ruby] Added support for pointer-to-member, similar to that
14218             for the Python module. Remarkably similar. Also added a new
14219             example for this (Examples/ruby/mpointer), which is remarkably
14220             similar to the Python example of the same name.
14221
14222 03/26/2002: ljohnson (Lyle Johnson)
14223             [Ruby] Made a few minor edits to the "Advanced Topics"
14224             chapter of the SWIG manual and added a new major section
14225             about how to create multi-module Ruby packages with SWIG.
14226
14227 03/26/2002: ljohnson (Lyle Johnson)
14228             [Ruby] Removed all of the old Ruby pragmas. If any of this
14229             functionality is truly missed we can resurrect it, preferably
14230             with some kind of feature-based directive.
14231             
14232 03/25/2002: ljohnson (Lyle Johnson)
14233             [Ruby] Fixed SWIG exception library support for Ruby, which
14234             has apparently been broken for some time. Luckily, no one seems
14235             to have noticed.
14236
14237 03/23/2002: beazley
14238             C++-namespace support in SWIG directives.
14239
14240             %addmethods: 
14241
14242             The %addmethods directive now accepts a fully qualified classname
14243             and can be used inside C++ namespace declarations.  For example:
14244
14245                  // Attaches to the class Foo::Bar below
14246                  %addmethods Foo::Bar {
14247                      int somemethod() { ... }
14248                  };
14249
14250                  namespace Foo {
14251                     class Bar {
14252                     public:
14253                         ...
14254                     };
14255                  
14256                     // Attaches to the class Bar above
14257                     %addmethods Bar {
14258                       int othermethod() { ... };
14259                     }
14260                  }
14261
14262             %feature, %rename, %ignore, %exception, and related directives:
14263
14264             Namespaces are fully integrated into the the renaming and declaration
14265             matcher.  For example:
14266
14267                  %rename(display) Foo::print;          // Rename in namespace Foo
14268                  %ignore Foo::Bar::blah;               // Ignore a declaration
14269
14270             %rename directives can be placed inside namespace blocks as well. For
14271             example:
14272
14273                 namespace Foo {
14274                    %rename(display) print;         // Applies to print below
14275
14276                    void print();
14277                 };
14278
14279             Most other SWIG directives should work properly inside namespaces.
14280             No other changes are needed.
14281       
14282 03/22/2002: beazley
14283             Some changes to internal symbol table handling.   SWIG no longer
14284             manages structures and unions in a separate namespace than normal
14285             declarations like ANSI C.  This means you can't have a structure
14286             with the same name as a function.  For example:
14287
14288                  struct Foo {
14289                  ...
14290                  }
14291  
14292                  int Foo() { ... }
14293
14294             This approach is more like C++.   It's not clear that SWIG ever
14295             really supported the ANSI C anyways---using the same name would
14296             almost certainly generate a name-clash in the target language.
14297
14298 03/22/2002: ljohnson (Lyle Johnson)
14299             [Ruby] Fixed [ 517302 ] for handling of renamed overloaded
14300             constructors. Now, renamed overloaded constructors are converted
14301             into class singleton methods (basically acting as "factory"
14302             methods).
14303
14304 03/21/2002: beazley
14305             Fixed [ 532957 ] %ignore parse error and casting operator.
14306             Reported by William Fulton.
14307
14308 03/18/2002: beazley (** ADVANCED USERS ONLY **)
14309             Added support for dynamic casting in return values.  A somewhat
14310             common problem in certain C++ programs is functions that hide
14311             the identity of underlying objects when they are returned 
14312             from methods and functions.  For example, a program might include
14313             some generic method like this:
14314
14315                       Node *getNode();
14316
14317             However, Node * may just be base class to a whole hierarchy
14318             of different objects.   Instead of returning this generic Node *,
14319             it might be nice to automatically downcast the object into the
14320             appropriate type using some kind dynamic cast.
14321
14322             Assuming you understand the peril involved, a downcast can now
14323             be performed using the following function in the run-time type
14324             checker:
14325
14326               swig_type_info *SWIG_TypeDynamicCast(swig_type_info *, void **ptr);
14327
14328             This function checks to see if the type can be converted to another
14329             type.  If so, a different type descriptor (for the converted type)
14330             is returned.   This type descriptor would then be used to create
14331             a pointer in the target language.
14332
14333             To use this, you would write a typemap similar to this:
14334
14335               %typemap(out) Node * {
14336                 swig_type_info *ty = SWIG_TypeDynamicCast($1_descriptor, (void **) &$1);
14337                 $result = SWIG_NewPointerObj($1, ty);
14338               }
14339
14340             Alternatively,
14341
14342               %typemap(out) Node * = SWIGTYPE *DYNAMIC;
14343
14344             To make the typemap have any effect, you have to write a supporting 
14345             function that knows how to perform downcasting. For example:
14346
14347               %{
14348               static swig_type_info *
14349               Node_dynamic_cast(void **ptr) {
14350                  Node **nptr = (Node **) ptr;
14351                  Element *e = dynamic_cast<Element *>(*nptr);
14352                  if (e) {
14353                     *ptr = (void *) e;
14354                     return SWIGTYPE_p_Element;
14355                  }
14356                  Data *d = dynamic_cast<Data *>(*nptr);
14357                  if (d) {
14358                     *ptr = (void *) d;
14359                     return SWIGTYPE_p_Data;
14360                  }
14361                  return 0;
14362               }
14363               %}
14364
14365             There is no restriction on how types are determined. dynamic_cast<>
14366             uses C++ RTTI.  However, if you had some other mechanism for determining
14367             the type, you could use that here.  Note: it is important to save
14368             the new pointer value back into the argument as shown.  When downcasting,
14369             the value of the pointer could change. 
14370
14371             Finally, to make the casting function available, you have to register
14372             it with the run-time type checker. Put this macro in your interface file.
14373
14374                DYNAMIC_CAST(SWIGTYPE_p_Node, Node_dynamic_cast);
14375
14376             Note: this feature does not introduce a performance penalty on 
14377             normal SWIG operation.  The feature is only enabled by writing
14378             a new typemap that explicitly calls SWIG_TypeDynamicCast() to
14379             make a conversion. 
14380   
14381             Examples/test-suite/dynamic_cast.i contains a simple example.
14382             This feature is not supported in the Java module due to differences
14383             in the type-checking implementation.
14384
14385             *** EXPERIMENTAL FEATURE ***
14386
14387 03/17/2002: beazley
14388             Small change to type-name handling of unnamed structures and
14389             typedef.  If a structure of this form appears:
14390
14391                    typedef struct {
14392                         ...
14393                    } Foo;
14394
14395             Then 'Foo' is used as the proper typename for the structure.
14396             Furthermore, Foo can now be used as a name in C++ inheritance.
14397             SWIG was already kind of doing this, but this modification refines
14398             the implementation to more closely follow the C++ ARM, section
14399             7.1.3, p. 106.  This fixes a couple of obscure corner cases.
14400
14401 03/16/2002: beazley
14402             Modified C++ inheritance with a few enhancements.  First, type information
14403             needed for casting and type-equivalence is generated even when base-classes
14404             aren't defined in the interface.  For example:
14405
14406                 class Foo : public Bar  {    /* Bar unspecified */
14407                 public:
14408                   ...
14409                 };
14410
14411                void blah(Bar *b);
14412
14413             In this case, the blah() function still accepts Foo * even though nothing
14414             is really known about Bar.   Previous SWIG versions would just generate
14415             a type error.
14416
14417             Inheritance has also been modified to work through typedef.  For example:
14418
14419                class Bar {
14420                };
14421
14422                typedef Bar OtherBar;
14423                class Foo: public OtherBar {
14424                }
14425
14426             In this case, the base class of OtherBar is correctly resolved back to
14427             Bar.   The use of the name OtherBar is lost in this resolution (the wrappers
14428             will simply use Bar instead of the typedef name OtherBar).
14429            
14430 03/13/2002: beazley
14431             %typemap, %apply, and related directives can now appear inside
14432             class definitions.   
14433
14434 03/13/2002: beazley
14435             Fixed a variety of problems related to compiling SWIG on 64-bit
14436             platforms.
14437
14438 03/12/2002: beazley
14439             Fixed problem with "ignore" and "in" typemaps.  Local variables
14440             associated with "in" were being added to the wrapper function even
14441             though they were never used.   Mostly harmless, but it would lead
14442             to a variety of compilation warnings.
14443   
14444 03/12/2002: beazley
14445             Some changes to the internal type system and handling of nested C++
14446             types.   In previous versions of SWIG, if you had the following:
14447
14448                  class Foo {
14449                  public:
14450                       typedef int Blah;
14451                  };
14452                  class Bar : public Foo {
14453                  public:
14454                        void somemethod(Blah x);
14455                  };
14456
14457             The argument type in somemethod() would implicitly be set to Bar::Blah.
14458             Although this is technically allowed, it breaks typemaps.  For example:
14459
14460                  %typemap(in) Foo::Blah { ... }
14461
14462             doesn't match like you expect.   This has been changed in SWIG-1.3.12.
14463             Now, types are expanded using the class in which they were defined.
14464             So, the argument type in somemethod() will be Foo::Blah---since the
14465             type Blah was defined in Foo.
14466  
14467 03/10/2002: beazley
14468             Fixed some subtle type scoping problems with typedef and C++ classes.
14469             For example:
14470  
14471                 typedef int Blah;
14472                 class Bar {
14473                 public:
14474                     typedef double Blah;
14475                     void foo(Blah x, ::Blah y);
14476                 ...
14477                 }
14478
14479 03/10/2002: beazley
14480             Highly experimental change to handle variable length arguments.
14481             First, there is no portable or reliable way to wrap
14482             a varargs function in full generality.  However, you *can* change
14483             the function signature using %varargs.
14484
14485                %varargs(char *) fprintf;
14486                ...
14487                void fprintf(FILE *f, char *fmt, ...);
14488
14489             In this case, the variable length parameter "..." is
14490             simply replaced by the parameters given in %varargs. This
14491             results in a function like this:
14492
14493                void fprintf(FILE *f, char *fmt, char *s);
14494
14495             More than one argument can be used and default values
14496             can be defined.  For example, this code specifies a
14497             maximum of four arguments.
14498
14499                %varargs(char *x1 = 0, char *x2 = 0, char *x3 = 0, char *x4 = 0) fprintf;
14500  
14501             *** EXPERIMENTAL NEW FEATURE ***
14502  
14503 03/10/2002: beazley
14504             Change to handling of variable length arguments.  varargs
14505             is now handled as a proper parameter and is passed to the
14506             code generator.  However, it still can't be handled correctly
14507             (and will generate a typemap warning).   This change has been
14508             made to better incorporate variable length arguments with other
14509             directives such as %ignore, %rename, %feature, and so forth.
14510
14511 03/10/2002: beazley
14512             Fixed [ 522555 ] Syntax error parsing "define" construct. SWIG
14513             is a little more restrictive in determining #define statements
14514             that will be wrapped as constants.  Also added a better parser
14515             error rule for handling bad constants.
14516
14517 03/08/2002: cheetah (William Fulton)
14518             [Java] Bug fix: Classes renamed with %rename that are derived from 
14519             another class generate more appropriate shadow class code.
14520
14521 03/08/2002: cheetah (William Fulton)
14522             [Java] Fixed SF [ #523632 ] and [ #513335 ] both reported by Israel 
14523             Tanner. Support for types that are used which are in a typedef. The
14524             appropriate shadow class name is generated. Also generated correct
14525             shadow classname when a templated class is used within another 
14526             templated class. See the cpp_typedef.i testcase.
14527
14528 03/08/2002: cheetah (William Fulton)
14529             [Java] Bug fix: No type was generated in shadow classes for types 
14530             that weren't wrapped by SWIG.  The type is treated as a raw 
14531             pointer, ie no shadow class.
14532
14533 02/22/2002: beazley
14534             Refined the matching algorithm used by %rename, %ignore, and
14535             %feature.   If a type signature is supplied, it must exactly
14536             match that used in the declaration---including any use of
14537             const.  For example:
14538
14539                 %rename(foo1)   foo(int);
14540                 %rename(bar1)   bar(int) const;
14541
14542                 class Blah {
14543                    public:
14544                       void foo(int);       // Matched --> foo1
14545                       void foo(int) const; // Not matched 
14546                       void bar(int);       // Not matched
14547                       void bar(int) const; // Matched --> bar1
14548                 }
14549
14550             In previous versions, a non-const specification would match
14551             both the non-const and const declarations.  However, the whole
14552             point of %rename and related directives is that they be able
14553             to precisely pinpoint exact declarations in an interface.  This
14554             fixes the problem.
14555
14556 02/21/2002: beazley
14557             Reworked the handling of default constructor and destructors.
14558             SWIG now makes a preliminary pass over the parse tree to discover
14559             which classes support default allocation.   This fixes a number
14560             of very subtle issues in code generation and call/return by value.
14561
14562 02/18/2002: cheetah (William Fulton)
14563             Improved support on Cygwin: Perl, Python, Tcl, Ruby and Java should
14564             work out of the box, barring the runtime library. Removed dllwrap 
14565             and replaced with newly working gcc -shared instead for Cygwin. 
14566             All this will require the new improved binutils 20010802 and later,
14567             but the latest Cygwin is usually the best recommendation.
14568
14569 02/15/2002: beazley
14570             Fixed some problems related to wrapping of global variables
14571             and Perl shadow classes. Reported by Chia-liang Kao.
14572
14573 02/15/2002: ljohnson (Lyle Johnson)
14574             [Ruby] Made a fix to the code generation for C++ class
14575             constructors so that we get both a "new" singleton method
14576             and an "initialize" instance method for each class. This
14577             change enables developers to derive new Ruby classes from
14578             SWIG-wrapped C++ classes and then override their initialize
14579             methods to provide subclass-specific instance initialization.
14580
14581 02/15/2002: ljohnson (Lyle Johnson)
14582             [Ruby] Massive documentation update for the Ruby module,
14583             contributed by Craig Files.
14584
14585 02/14/2002: ljohnson (Lyle Johnson)
14586             [Ruby] Bug fix: An error in the SWIG runtime support for Ruby
14587             was causing several of the examples to fail. Reported by
14588             William Fulton.
14589
14590 02/14/2002: ljohnson (Lyle Johnson)
14591             [Ruby] Bug fix: Enumerations defined within a class (such
14592             as those seen in the Examples/ruby/enum example) were not
14593             being exported with the correct names. Reported by William
14594             Fulton.
14595
14596 02/13/2002: ljohnson (Lyle Johnson)
14597             [Ruby] Added a warning message when we run across overloaded
14598             class constructors for C++ code, that this is currently not
14599             supported (even if the overloads have been %renamed). For an
14600             example of where this doesn't work, see Examples/ruby/operator.
14601
14602 02/13/2002: ljohnson (Lyle Johnson)
14603             [Ruby] Added an "ignored" warning message when the parser runs
14604             across an operator!=() declaration for C++ code.
14605
14606 02/11/2002: ljohnson (Lyle Johnson)
14607             [Ruby] Added the "import", "import_template", "operator" and
14608             "template" examples.
14609
14610 02/11/2002: ljohnson (Lyle Johnson)
14611             [Ruby] Added multi-module support.
14612
14613 02/09/2002: ljohnson (Lyle Johnson)
14614             [Ruby] Added the missing "#define SWIG_NOINCLUDE" at the top of
14615             the wrapper code when the '-c' option is used.
14616
14617 02/09/2002: ljohnson (Lyle Johnson)
14618             Corrected a minor off-by-one error for the size of the
14619             swig_types[] array that's generated in the wrapper code.
14620
14621 02/08/2002: beazley
14622             Fixed SF [ #515058 ] Wrong code for C++ templates.
14623             Reported by Israel Taller.
14624
14625 Version 1.3.11 (January 31, 2002)
14626 =================================
14627
14628 01/30/2002: beazley
14629             Fix to pass/return by value for C++ objects that define
14630             no default constructor.  Changes to the typemap system
14631             made it impossible to wrap C++ objects with no default
14632             constructor.   This has been fixed, but the solution 
14633             involves some clever template magic contributed by 
14634             William Fulton.  Please see the comments in the file
14635             Lib/swig.swg for further details.  This solution is
14636             experimental and may be refined in a future release.
14637
14638 01/30/2002: beazley
14639             Global variables and member data of type "const char *"
14640             can be set, but the old value is silently discarded without
14641             any garbage collection.   This may generate a memory leak.
14642             This change is needed to more safely handle variables
14643             like this:
14644
14645                    const char *foo = "Hello World\n";
14646
14647             In this case, it's not safe to free the old value.  However,
14648             SWIG can dynamically allocate a new value and make foo point
14649             to it.   To fix this memory leak, you can probably do this:
14650
14651                %clear const char *foo;
14652                %apply char * {const char *foo};
14653
14654             *** POTENTIAL INCOMPATIBILITY ***
14655             
14656 01/30/2002: beazley
14657             Two minor typemap enhancements have been added.  First,
14658             typemaps can issue a warning message by including a special
14659             warning attribute. For example:
14660
14661              %typemap(in,warning="I'm going to do something dangerous") ...
14662
14663             The warning message will show up whenever the typemap is
14664             applied.
14665
14666             Second, a typemap can force a no-match by defining
14667
14668              %typemap(in) sometype "pass";
14669
14670             If this is used, the typemap system will *not* record a
14671             typemap match for "sometype".   This can be used to block
14672             selected typemaps.  For example, if you wanted to disable
14673             a typemap feature for some type, you could do this.
14674
14675                // Do not allow global variables of type 'const char *' to be set.
14676                %typemap(varin) const char * "pass";
14677
14678             It might also be possible to use this to do subtle and
14679             strange things with typemaps.  For example, if you wanted to
14680             make 'blah *' an output value and 'const blah *' an input
14681             parameter, you might do this:
14682
14683                 %typemap(ignore) blah *(blah temp) {
14684                     $1 = &temp;
14685                 }
14686                 %typemap(argout) blah * {
14687                     ... return a value ...
14688                 }
14689                 /* Block unqualified typemaps defined above */
14690                 %typemap(ignore) const blah * "pass";
14691                 %typemap(argout) const blah * "pass";
14692                 %typemap(in)     const blah * {
14693                     ... get input value ...
14694                 }
14695
14696              (This potential applications of typemaps suggested by Greg Stein).
14697             *** NEW FEATURE ***
14698
14699 01/29/2002: cheetah (william fulton)
14700            [Java] Bug fix: No enumerations were wrapped when the -shadow 
14701            commandline option was not specified. Reported by Israel Taller.
14702
14703 01/28/2002: cheetah (william fulton)
14704            [Java] Global arrays are successfully wrapped. In fact they started
14705            mostly working in SWIG-1.3.10.
14706
14707 01/28/2002:richardp
14708            Added first attempt at C++ and -shadow support for PHP4 module,
14709            please test and mail me if any problems/ideas on improving it.
14710
14711            There is a known problem with uninitialized member variables,
14712            please see Examples/php4/sync/README for details.
14713
14714            Also more PHP documentation added to Doc/Manual/Php.html
14715
14716 01/27/2002:beazley
14717            The ANSI C size_t type is now recognized as an integer by default.
14718
14719 01/26/2002:beazley
14720            long long and unsigned long long support added to many language modules.
14721            This is not a portable feature and will require compiler support
14722            for the long long type.  In target languages that do not support
14723            long long (e.g., Tcl and Perl), numbers are converted to a string
14724            of digits.  This prevents their use in arithmetic calculations, but
14725            still allows values to be set from a string.  
14726
14727            long long support requires the use of the strtoll() and strtoull()
14728            functions as well as the 'lld' and 'llu' format specifiers
14729            of sprintf().
14730
14731 01/26/2002:beazley
14732            Fixed [ #501827 ] Delete method is not called.   The Tcl
14733            module wasn't correctly calling destructors when they
14734            were defined using %addmethods.  This has been fixed.
14735            Reported by Reinhard Fobbe.
14736
14737 01/26/2002: beazley
14738            Better support for long long and unsigned long long.  Typemaps
14739            have been included in a number of modules for handling these types.
14740            In addition, the parser has been modified to accept long long
14741            literals such as 1234LL and 1234ULL.
14742
14743 01/27/2002: cheetah (william fulton)
14744            [Java] A C char[] is mapped to a Java String which is the default 
14745            SWIG handling of char[] and char*. It used to be mapped to byte[]. 
14746            Note that a C signed char[] array is mapped to byte[].
14747
14748            *** POTENTIAL INCOMPATIBILITY ***
14749
14750 01/25/2002: beazley
14751            Fixed a problem with return-by-value, C++, and
14752            objects that define no default constructor.
14753            Reported by Joel Reed.
14754
14755 01/25/2002: cheetah (william fulton)
14756            [Java] Overhaul of the Java module. The C code generation is now 
14757            done from typemaps.
14758
14759 01/24/2002: cheetah (william fulton)
14760            [Java] Support for arrays of enum pointers
14761
14762 01/20/2002: cheetah (william fulton)
14763            [Java] Error checking for null Java objects being passed to native 
14764            functions.  Exception thrown now whereas before the JVM crashed.
14765
14766 01/18/2002: cheetah (william fulton)
14767            [Java] Corrected behaviour for functions that take arrays. For 
14768            example, when this c function: 
14769
14770            void arrayfn(int array[]);
14771            
14772            is wrapped the corresponding native function
14773
14774            public final static native void arrayfn(int[] array);
14775
14776            is produced. Previously if the C function made any changes to the 
14777            array elements, these were not reflected back into the Java array. 
14778            This has now been corrected so that the changes are propogated back
14779            to Java and the calling function will see these changes. This is 
14780            how pure Java functions work, ie arrays are passed by reference.
14781
14782 01/15/2002:mkoeppe
14783            [Guile] New file cplusplus.i with C++ typemaps contributed
14784            by Marcio Luis Teixeira <marciot@holly.colostate.edu>.
14785
14786 01/11/2002: cheetah (william fulton)
14787            [Java] Changed mapping of C long to Java type. Was mapped to Java
14788            long, now mapped to Java int. If you want the previous mapping to 
14789            Java long use this approach in your interface file:
14790            
14791              %clear long;
14792              %typemap(jni) long             "jlong"
14793              %typemap(jtype) long           "long"
14794              %typemap(jstype) long          "long"
14795
14796              %clear long[ANY];
14797              %typemap(jni) long[ANY]        "jlongArray"
14798              %typemap(jtype) long[ANY]      "long[]"
14799              %typemap(jstype) long[ANY]     "long[]"
14800              %typemap(in) long[ANY]         {write me for array support}
14801              %typemap(out) long[ANY]        {write me for array support}
14802              %typemap(argout) long[ANY]     {write me for array support}
14803              %typemap(freearg) long[ANY]    {write me for array support}
14804
14805            *** POTENTIAL INCOMPATIBILITY ***
14806
14807            This new mapping is more appropriate when interfacing to 32 bit 
14808            applications which are used in the current 32-bit JVMs. For future 
14809            64-bit JVMs you may have to change these mappings - eg on Unix LP64 
14810            systems, but not on Microsoft 64bit Windows which will be using a 
14811            P64 IL32 model. This may be automated in a future version of SWIG.
14812
14813 01/10/2002:beazley
14814            Fixed [ 501677 ] %init block in wrong place. Reported
14815            by Luigi Ballabio.
14816
14817 01/09/2002: cheetah (william fulton)
14818            [Java] Default support for the long long type. signed long long is 
14819            mapped to a Java long. unsigned long long is mapped to BigInteger.
14820
14821 01/09/2002:beazley
14822            Experimental change to parser to better support mixing of
14823            int, long, short, unsigned, float, and double.   The parser
14824            should now support types like this:
14825     
14826                 short unsigned int
14827                 int   unsigned short
14828                 unsigned short int
14829                 unsigned int short
14830
14831             This change also enables a type of 'long double' (previously
14832             unsupported) to be used.
14833             *** NEW FEATURE ***
14834
14835 01/05/2002: cheetah (william fulton)
14836            [Java] Casting fix for when function return type is a pointer as 
14837            reported by Gary Pennington 2002-01-05. The upper 32bits of the 
14838            64 bit jlong will have contained junk for 32bit pointers.
14839
14840 01/05/2002: cheetah (william fulton)
14841            [Java] Better pointer handling in Java is possible as the 
14842            INPUT, OUTPUT and INOUT typemaps have been added into typemaps.i.
14843
14844 01/05/2002: cheetah (william fulton)
14845            [Java] $null can be used in input typemaps to return early from JNI 
14846            functions that have either void or a non-void return type. Example:
14847
14848              %typemap(check) int * %{ 
14849                if (error) {
14850                  SWIG_exception(SWIG_IndexError, "Array element error");
14851                  return $null;
14852                }
14853              %}
14854
14855            If the typemap gets put into a function with void as return, $null 
14856            will expand to nothing:
14857
14858              void jni_fn(...) {
14859                  if (error) {
14860                    SWIG_exception(SWIG_IndexError, "Array element error");
14861                    return ;
14862                  }
14863                ...
14864              }
14865
14866            otherwise $null expands to zero, where javareturntype is either a 
14867            pointer or a primitive type:
14868
14869              javareturntype jni_fn(...) {
14870                  if (error) {
14871                    SWIG_exception(SWIG_IndexError, "Array element error");
14872                    return 0;
14873                  }
14874                ...
14875              }
14876
14877 01/02/2002: cheetah (william fulton)
14878            [Java] The Java module incorrectly used argout typemaps for 
14879            strings. This is now corrected and the code now resides
14880            in the freearg typemap. The argout array typemaps have been split into 
14881            argout and freearg typemaps. This correction may require some user 
14882            written typemaps to be modified. 
14883            *** POTENTIAL INCOMPATIBILITY ***
14884
14885 12/28/2001: cheetah (william fulton)
14886            [Java] Multi typemaps now working for Java see multimap example.
14887            [Java] Fix for recently introduced bug - freearg typemap code was appearing
14888            before the function call.
14889
14890 12/28/2001: cheetah (william fulton)
14891            [Java] JCALL macro for JNI calls that work in both C and C++ typemaps
14892            have been replaced with JCALL0, JCALL1, JCALL2, JCALL3 and JCALL4 
14893            macros.
14894            *** POTENTIAL INCOMPATIBILITY ***
14895
14896 12/22/2001:beazley
14897            Resolved some inconsistent behavior with %rename and class renaming.
14898            If you specify the following:
14899  
14900                %rename(Foo)  Bar;
14901
14902                class Bar {
14903                public:
14904                     Bar();
14905                     ~Bar();
14906                }
14907
14908            Then the %rename directive applies to the class itself, the constructor,
14909            and the destructor (all will be renamed to Foo).
14910
14911            If a class defines more than one constructor, the overloaded variants
14912            can still be renamed by specifying parameters to %rename.  For example:
14913
14914                %rename(Bar_copy) Bar(Bar &);
14915                class Bar {
14916                public:
14917                      Bar();
14918                      Bar(Bar &);
14919                     ~Bar();
14920                };
14921
14922            There are still some odd corner cases.  If you specify
14923
14924                %rename(Foo) ::Bar;
14925
14926            then only the name of the class is changed and the constructor/destructor
14927            names are left unmodified.  If you specify 
14928
14929                %rename(Foo) *::Bar;
14930
14931            then the names of the constructor/destructor functions are modified but
14932            the name of the class is not.
14933
14934 12/21/2001: cheetah (william fulton)
14935            [Java] jni, jtype and jstype typemaps no longer hardcoded but real 
14936            typemaps. New variable substitution, $javaclassname, can be used in
14937            the jstype typemaps. It is replaced with the Java shadow class name
14938            where applicable.
14939            [Java] Fix for recently introduced bug to do with inheritance when 
14940            using %import.
14941            [Java] A few more bug fixes, todo with %rename and using the kind
14942            with the type, eg 
14943            void fn(union uni myuni, struct str mystr, class cl mycl);
14944
14945 12/20/2001:beazley
14946            Fixed [ #494524 ] Preprocessor bug - apostrophe and #subst.
14947
14948 12/20/2001:beazley
14949            Added SWIG_VERSION preprocessor symbol.   This is a hexadecimal
14950            integer such as 0x010311 (corresponding to SWIG-1.3.11).  This can
14951            be used in the interface as follows:
14952
14953                #if SWIG_VERSION >= 0x010311
14954                /* Use some fancy new feature */
14955                #endif
14956
14957            Note: The version symbol is not defined in the generated SWIG
14958            wrapper file.
14959
14960            *** NEW FEATURE ***
14961
14962 12/20/2001:mkoeppe
14963            [MzScheme]: Renamed mzswig_make_boolean to
14964            swig_make_boolean, as the latter is used in the typemaps.
14965            Reported by Luigi Ballabio.
14966
14967 12/17/2001:mkoeppe
14968            [Guile]: Rewrote list-vector.i using multi-dispatch
14969            typemaps.  Updated pointer-in-out.i.  Make the
14970            deprecated typemap-substitution of "$source" in "argout"
14971            work as before.
14972
14973 12/16/2001:mkoeppe
14974            [Guile]: Fixed macros %values_as_list, %values_as_vector,
14975            %multiple_values to use the proper %pragma syntax.  New
14976            Guile example/test "multivalue"; new Guile run-test for
14977            test-suite item "list-vector" (currently broken).
14978
14979 12/14/2001:mkoeppe
14980            [Guile]: Fixed typemap-substition bug for "varin".  Relaxed
14981            valid-identifier check to allow all R5RS identifiers.
14982
14983
14984 Version 1.3.10 (December 10, 2001)
14985 ==================================
14986
14987 12/08/2001:beazley
14988            Modified %typemap so that %{ ... %} can also be used as a
14989            code block (mostly for completeness).  For example:
14990  
14991               %typemap(in) blah %{
14992                  ...
14993               %}
14994
14995            This form does not introduce a new block scope.  Also, the
14996            code enclosed in %{ ... %} is not processed by the preprocessor.
14997
14998 12/08/2001:beazley
14999            Fixed [ #459614 ] SWIG with multiple TCL interpreters.
15000
15001 12/08/2001:beazley
15002            Fixed [ #417141 ] rubydec.swg is wrong
15003            Reported by Paul Brannan.
15004
15005 12/08/2001:beazley
15006            Fixed [ #410557 ] Problem with %addmethods on NT.
15007            Reported by Magnus Ljung.
15008
15009 12/08/2001:beazley
15010            Fixed [ #445233 ] Enhancement: handle access change.
15011            SWIG now parses (but ignores) C++ access changes for the
15012            the following:
15013
15014              class A {
15015              protected:
15016                 void something() { }
15017              public:
15018                 A() {}
15019              };
15020
15021              class B : private A {
15022              public:
15023                 B() : A() { }
15024              protected:
15025                 A::something;    <---- Parsed, but ignored
15026              };
15027  
15028            Suggested by Krzysztof Kozminski.
15029
15030 12/08/2001: cheetah (william fulton)
15031            Fix for Ruby to work using Visual C++.
15032
15033 12/06/2001:beazley
15034            Fixed [ #465687 ] unsigned short parameters fail.
15035            Reported by Gerald Williams.
15036
15037 12/06/2001:beazley
15038            Fixed SF [ #489594 ] PyString_FromString can't take NULL arg.
15039            Reported by John Merritt.   SWIG now converts string values
15040            to Python using code like this:
15041
15042            resultobj = result ? PyString_FromString(result) : Py_BuildValue("");
15043
15044 12/06/2001:beazley
15045            Fixed SF [ #463561 ] Type conversions not generated.
15046            Reported by Gerald Williams.
15047         
15048 12/04/2001:beazley
15049            Fixed SF [ #470217 ] Tcl default argument handling.
15050            Reported by Shaun Lowry.
15051
15052 12/04/2001:beazley
15053            Fixed SF [ #472088 ] defined(MACRO) expanded everywhere.
15054            Embedded preprocessor directives such as
15055
15056               %#if defined(FOO)
15057
15058            are not expanded by the SWIG preprocessor.
15059            Reported by Gerald Williams.
15060
15061 12/04/2001:beazley
15062            Fixed SF [ #476467 ] Problems with #define & commas.
15063
15064 12/04/2001:beazley
15065            Fixed SF [ #477547 ] wrong declaration of pointer functions.
15066            Bad prototypes in Lib/tcl/ptrlang.i.
15067
15068 12/04/2001:beazley
15069            Fixed SF [ #483182 ] Constants can take args by mistake. 
15070            When swig -perl5 -const is used, constants are declared
15071            with a void prototype.  For example:
15072
15073                 sub ICONST () { $examplec::ICONST }
15074
15075            Patch submitted by Rich Wales.
15076
15077 12/03/2001:beazley
15078            New %exception directive.   This is intended to replace %except.
15079            It works in exactly the same manner except it does not accept a 
15080            language specifier. For example:
15081
15082                %exception {
15083                    try {
15084                       $action
15085                    } 
15086                    catch(SomeError) {
15087                        error
15088                    }
15089                }
15090
15091            %exception is also name aware---allowing it to be applied to
15092            specific declarations in an interface.  For example:
15093
15094               %exception foo {
15095                   ...
15096                   exception for any function/method foo
15097                   ...
15098               }
15099
15100               %exception Foo::bar {
15101                   ...
15102                   exception for method bar in class Foo
15103                   ...
15104               }
15105  
15106               %exception Foo::bar(double) {
15107                   ...
15108                   exception for method bar(double) in class Foo
15109                   ...
15110               }
15111
15112            The semantics of this name matching is exactly the same as for %rename.
15113            *** NEW FEATURE ***
15114            
15115 12/03/2001:beazley
15116            Substantial cleanup of the Python shadow class code.  Shadow classes
15117            used to be created in this rather complicated manner involving about
15118            a half-dozen strings created in bits and pieces.   Shadow classes
15119            are now generated in a more straightforward manner--in the same
15120            order that appears in the interface file.
15121
15122            *** POTENTIAL INCOMPATIBILITY ***
15123            The order in which declarations appear in the shadow file may differ.
15124            
15125 12/03/2001:beazley
15126            The %insert directive (%{ ... %}, %runtime, %header, %wrapper, etc.)
15127            can now be used inside of a class definition.   This has potential
15128            uses when generating shadow class code.  For example:
15129
15130                  class Foo {
15131                      ...
15132                  %insert("shadow") %{
15133                  # Some python code
15134                  def blah(self):
15135                       print "I'm blah!"
15136                  %}
15137                      ...
15138                  };
15139
15140            The support for class code insertion depends on the language module.
15141            However, the intent of this feature is to simplify the task of extending
15142            shadow class code.   In the Python module, this inserts code with the
15143            proper level of indendation (regardless of what was used in the SWIG
15144            interface).
15145            *** NEW FEATURE ***
15146
15147 11/29/2001: cheetah (william fulton)
15148            Modifications for Java and Python modules to work on cygwin.
15149            Unfortunately a lot of the python module has started to produces code 
15150            which cannot be auto-imported using cygwin libtools so most of it is 
15151            still broken.
15152
15153 11/28/2001:beazley
15154            The %rename and %feature directive can now be used inside
15155            of a class definition. For example:
15156
15157              class Foo {
15158                  %rename(foo_i) foo(int);
15159                  %rename(foo_d) foo(double);
15160              public:
15161                  ...
15162                  void foo(int);
15163                  void foo(double);
15164                  ...
15165              };
15166
15167            When used in this manner, the %rename directive only applies
15168            to members of the class in which it appears as well as all
15169            derived classes.  In fact, this is really just the same
15170            as saying:
15171
15172              %rename(foo_i) Foo::foo(int);
15173              %rename(foo_d) Foo::foo(double);
15174              class Foo {
15175                 ...
15176              };
15177
15178            *** NEW FEATURE ***
15179
15180 11/26/2001:beazley
15181            Added the experimental %feature directive.  %feature can be
15182            used to attach arbitrary string attributes to parse tree nodes.
15183            For example:
15184
15185                %feature("except") blah {
15186                    try {
15187                       $function
15188                    } catch (Error) {
15189                        whatever;      
15190                    }
15191                }
15192
15193            or
15194
15195               %feature("set") *::x_set "x";
15196
15197            or
15198
15199               %feature("blah") Foo::bar(int,double) const "spam";
15200
15201            The syntax is borrowed from the %rename directive.  In fact, the
15202            exact same semantics apply (inheritance, matching, etc.).
15203
15204            %feature is a very powerful low-level primitive that can be used to
15205            customize individual language modules and to provide hints to 
15206            any stage of code generation.   Features are attached to
15207            parse tree nodes as attributes with names like "feature:*" where * 
15208            is replaced by the feature name (e.g., "feature:except", "feature:set", 
15209            etc.).   Language modules can then look for the features using 
15210            a simple attribute lookup.
15211
15212            %feature is intended to be a replacement for a number of
15213            older SWIG directives including %except and specialized
15214            pragmas. It is more powerful (due to its parameterized
15215            name matching) and it provides very precise control over
15216            how customization features are attached to individual
15217            declarations.   There are future expansion plans that will
15218            build upon this capability as well.
15219
15220            It's not certain that %feature will ever be used directly
15221            by SWIG users.  Instead, it may be a low-level primitive
15222            that is used in high-level macro definitions.  For instance,
15223            to support properties, you might define a macro like this:
15224
15225            %define %property(name, setf, getf)
15226            %feature("set") setf #name;
15227            %feature("get") getf #name;
15228            %enddef
15229
15230            Which allows a user to specify things like this:
15231
15232            %property(p, get_p, set_p);
15233
15234            class Blah {
15235            public:
15236               int  get_p();
15237               void set_p(int);
15238            };
15239
15240            *** EXPERIMENTAL NEW FEATURE ***
15241   
15242 11/24/2001:beazley
15243            The Tcl module has been expanded with some new features for
15244            managing object ownership.  For example:
15245          
15246                 set c [Circle -args 20]
15247                 $c area             # Invoke a method
15248                 $c -disown          # Releases ownership of the object
15249                 $c -acquire         # Acquires ownership of the object
15250
15251            If Tcl owns the object, its destructor is invoked when the 
15252            corresponding object command is deleted in Tcl.  
15253
15254            To simplify the destruction of objects, the following syntax
15255            can be used:
15256
15257                 $c -delete         # Delete an object
15258
15259            This is an alternative for the more obscure variant of 
15260
15261                 rename $c {}
15262
15263            These features also add functionality at the C API level.
15264            The following functions manage ownership from C and
15265            can be used in typemaps.
15266
15267                 SWIG_Acquire(void *ptr);
15268                 SWIG_Disown(void *ptr);
15269
15270            A new function for constructing instances is also available:
15271
15272                 Tcl_Obj *
15273                 SWIG_NewInstanceObj(Tcl_Interp *interp, void *ptr,
15274                                     swig_type_info *type, int own);
15275
15276            When used in a typemap, this creates a pointer object and
15277            an interpreter command that can be used to issue methods and
15278            access attributes as shown above.
15279            *** NEW FEATURE ***
15280            
15281 11/23/2001:beazley
15282            All Python-related %pragma operations have been eliminated.
15283            Most of these were written for older SWIG versions in order to
15284            compensate for limitations in earlier releases.  In an effort
15285            to reduce the amount of code-clutter and potential for errors,
15286            it is easier to simply eliminate the pragmas and to start over
15287            (if needed).  To be honest, I'm not even sure the pragmas
15288            worked in 1.3.9 and recent releases.
15289
15290            Note: If you need to insert code into the shadow class file
15291            created by SWIG, simply use the %shadow directive like this:
15292
15293               %shadow %{
15294               def some_python_code():         
15295                   print "blah!"
15296               %}
15297
15298            *** POTENTIAL INCOMPATIBILITY ***
15299
15300 11/22/2001:beazley
15301            Sweeping changes to the way in which the Python module handles
15302            shadow classes.   In early implementations, shadow classes were
15303            merely Python wrappers around typed pointer objects. However, 
15304            some users actually wanted to receive the shadow class object in C.
15305            To accomodate this, the dereferencing of the "this" pointer in
15306            a shadow class was moved to C as described in CHANGES [8/8/99].
15307            However, the process of returning pointers to Python was still
15308            somewhat problematic.  Specifically, shadow classes never worked
15309            in situations such as these:
15310
15311              -   Use of any kind of output typemap ('out' or 'argout')
15312              -   Global variables (broken as far as I can tell).
15313
15314            In the past, some users have dealt with this by manually trying
15315            to create shadow class objects themselves from C/C++.  However,
15316            this was difficult because the C wrappers don't really know how
15317            to get access to the corresponding Python class.
15318
15319            The Python module has now been modified to automatically attach
15320            shadow class objects to pointers when they are returned to 
15321            Python.   This process occurs in the function SWIG_NewPointerObj()
15322            so the process is completely transparent to users.    As a result,
15323            shadow classes are now more seamlessly integrated with typemaps
15324            and other features of SWIG.
15325
15326            This change may introduce a number of incompatibilities.  The
15327            SWIG_NewPointerObj() now takes an extra parameter "own" to 
15328            indicate object ownership.   This can be used to return a pointer
15329            to Python that Python should destroy.   In addition, older code
15330            that tries to manually construct shadow class objects or which
15331            expects bare pointers may break---such pointers may already be
15332            encapsulated by a shadow class.
15333            *** POTENTIAL INCOMPATIBILITY ***
15334
15335 11/20/2001:beazley
15336            Modified the %insert directive to accept single braces { ... }.
15337            For example:
15338
15339                 %insert("header") {
15340                    ... some code ...
15341                 }
15342
15343            This works exactly like %{ ... %} except that the code in the
15344            braces is processed using the preprocessor.   This can be useful
15345            in certain contexts such as low-level code generation in 
15346            language modules.
15347            *** NEW FEATURE ***
15348            
15349 11/20/2001:beazley
15350            Command line options are now translated into preprocessor
15351            symbols.  For example:
15352         
15353               ./swig -python -shadow -module blah interface.i
15354
15355            Creates the symbols:
15356
15357               SWIGOPT_PYTHON 1
15358               SWIGOPT_SHADOW 1
15359               SWIGOPT_MODULE blah
15360               
15361            Modules can look for these symbols to alter their code generation
15362            if needed.
15363            *** NEW FEATURE ***
15364              
15365 11/20/2001:beazley
15366            Massive overhaul of the Perl5 module.  A lot of code generation is
15367            now driven by tables and typemaps.   The generated wrapper code 
15368            also makes use of tables to install constants, variables, and
15369            functions instead of inlining a bunch of procedure calls.  The
15370            separate variable initialization function is gone.   Most
15371            code generation is controlled via the perl5.swg file in the
15372            library.
15373            *** POTENTIAL INCOMPATIBILITY ***
15374            
15375 11/13/2001:beazley
15376            Added parsing support for the C++ typename keyword.  Primarily this
15377            is added to better support templates.  For example:
15378
15379              template<typename T> void  blah(C& v) {
15380                  typename C::iterator i = v.begin();
15381              }
15382
15383            Note: typename is supported in the parser in the same way as 'struct'
15384            or 'class'.  You probably shouldn't use it anywhere except in templates.
15385            *** NEW FEATURE ***
15386
15387 11/11/2001:beazley
15388            Massive overhaul of the language module API.   Most functions now
15389            use a common, very simple,  API.   There are also a number of
15390            interesting semantic side-effects of how code is actually generated.
15391            Details will be forthcoming in Doc/Manual/Extending.html.
15392
15393            *** POTENTIAL INCOMPATIBILITY *** Language modules written for
15394            previous versions of SWIG will no longer work,
15395
15396 11/10/2001:beazley
15397            Fixed a very subtle bug due to unnamed class wrapping. For example, if
15398            you did this
15399
15400               typedef struct {
15401                   int x,y;
15402               } gdPoint, *gdPointPtr;
15403
15404               void foo(gdPointPtr x);
15405
15406            Then the foo function would get a type-error.   The problem has
15407            to do with internal typedef handling and the fact that the typedef
15408            declarations after the struct appear later in the parse tree.
15409            It should work now.  Problem reported by Vin Jovanovic.
15410
15411 11/09/2001:beazley
15412            Subtle change to "out" typemaps (and related variations).  The name
15413            that is attached to the typemap is now the raw C identifier that
15414            appears on a declaration.  This changes the behavior of
15415            member functions.  For example:
15416
15417                %typemap(out) int foo {
15418                   ...
15419                }
15420
15421                class Blah {
15422                    public:
15423                       int foo();    // typemap gets applied
15424                }
15425             
15426            Previous versions never really specified how this was supposed to
15427            work.  In SWIG1.1, you could probably write a typemap for the
15428            wrapper name like this:
15429
15430                 %typemap(out) int Blah_foo { ... }
15431
15432            However, this old behavior is now withdrawn and not supported. 
15433            Just use the member name without any sort of special prefix.
15434            *** POTENTIAL INCOMPATIBILITY ***
15435
15436 11/06/2001:beazley
15437            Changes to Tcl module initialization:
15438
15439            (1) SWIG now automatically includes the code needed to work with
15440                 Tcl stubs.  Simply compile with -DUSE_TCL_STUBS.
15441
15442            (2) SWIG now automatically calls Tcl_PkgProvide to register
15443                a package name.  The package name is the same as the name
15444                specified with the %module directive.  The version number is
15445                set to "0.0" by default.  To change the version number, use
15446                swig -pkgversion 1.2 interface.i.
15447
15448            *** POTENTIAL INCOMPATIBILITY ***
15449            Modules that provided stubs and Tcl_PkgProvide on their own might
15450            break.  Simply remove that code.
15451
15452 11/05/2001:beazley
15453            Changed code generation of constants in the Tcl module.  Constants
15454            are now stored in a large table that get installed at module startup.
15455            There are also no longer any static variables so it should generate
15456            somewhat less code.
15457
15458 11/04/2001:beazley
15459            The "const" typemap has been renamed to "constant" in many language
15460            modules.  "const" is a C keyword which made the handling of the typemap
15461            directive somewhat awkward in the parser.
15462            *** POTENTIAL INCOMPATIBILITY ***
15463
15464 11/04/2001:beazley
15465            %typemap directive can now accept nearly arbitrary keyword parameters.
15466            For example:
15467
15468               %typemap(in,parse="i",doc="integer") int "...";
15469
15470            The purpose of the keyword parameters is to supply code generation
15471            hints to the target language module.   The intepretation of the
15472            parameters is language specific.
15473            *** NEW FEATURE ***
15474
15475 11/04/2001:beazley
15476            Slight semantic change to internal call/return by value handling.
15477            In previous versions of SWIG, call-by-value was translated
15478            into pointers.  For example:
15479
15480                double dot_product(Vector a, Vector b);
15481
15482            turned into this:
15483
15484                double wrap_dot_product(Vector *a, Vector *b) {
15485                   return dot_product(*a,*b);
15486                }
15487
15488            This translation was normally performed by the SWIG core, outside
15489            of the control of language modules.  However, a side effect
15490            of this was a lot of bizarre typemap behavior.   For example,
15491            if you did something like this:
15492
15493                 %typemap(in) int32 {
15494                     ...
15495                 }
15496
15497            You would find that int32 was transformed into a pointer everywhere!
15498            (needless to say, such behavior is unexpected and quite awkward to
15499            deal with).  To make matters worse, if a typedef was also used,
15500            the pointer behavior suddenly disappeared.
15501
15502            To fix this, the pointer transformation is now pushed to the
15503            language modules.   This produces wrappers that look roughly
15504            like this:
15505
15506                double wrap_dot_product(Vector *a, Vector *b) {
15507                   Vector arg1 = *a;
15508                   Vector arg2 = *b;
15509                   return dot_product(arg1,arg2);
15510                }
15511
15512            This change also makes it easy to define typemaps for
15513            arbitrary undefined types.  For example, you can do this (and it
15514            will work regardless what int32 is):
15515
15516                %typemap(in) int32 {
15517                   $1 = (int32) PyInt_AsLong($input);
15518                }
15519
15520            *** POTENTIAL IMCOMPATIBILITY ***
15521            This change may break call/return by value code generation in
15522            some language modules.
15523
15524 11/03/2001:beazley
15525            Changed the name of the default typemaps to the following:
15526
15527                %typemap() SWIGTYPE  { 
15528                    ... an object ...
15529                }
15530                %typemap() SWIGTYPE * {
15531                    ... a pointer ...
15532                }
15533                %typemap() SWIGTYPE & {
15534                    ... a reference ...
15535                }
15536                %typemap() SWIGTYPE [] {
15537                    ... an array ...
15538                }
15539                %typemap() enum SWIGTYPE {
15540                   ... an enum value ...
15541                }
15542                %typemap() SWIGTYPE (CLASS::*) {
15543                    ... pointer to member ...
15544                }
15545
15546
15547            These types are used as the default for all types that don't match
15548            anything else.  See CHANGES log entry for 8/27/2000 for the
15549            old behavior.  The role of these types is also described in 
15550            Doc/Manual/Typemaps.html
15551
15552            *** POTENTIAL INCOMPATIBILITY ***
15553           
15554 10/25/2001:beazley
15555            Modified Guile and Mzscheme modules to support
15556            multi-argument typemaps.
15557
15558 10/25/2001: cheetah (william fulton)
15559            [Java] Fix to handle pointers to arrays.
15560
15561 10/24/2001:beazley
15562            Defining a typemap rule for enum SWIGENUM can now be used
15563            to define default behavior for enum variables.
15564
15565 10/22/2001:beazley
15566            Ruby module modified to support multi-argument typemaps.
15567
15568 10/22/2001:beazley
15569            The Ruby module can now handle functions with an arbitrary
15570            number of arguments.  Previous versions were limited to 
15571            to functions with only 9 or 16 arguments depending on
15572            the use of default arguments.   Note: from some inspection
15573            of the Ruby interpreter source, the new approach might be
15574            a little faster as well.
15575
15576 10/18/2001:beazley
15577            Fixed a bug with forward class declarations and
15578            templates.
15579
15580                  class Foo <S,T>;
15581
15582            Bug reported by Irina Kotlova.
15583
15584 10/16/2001:beazley
15585            Support for multivalued typemaps added.  The typemaps
15586            are specified using the syntax below.   Within each
15587            typemap, variable substitution is handled as follows:
15588
15589               %typemap(in) (int argc, char *argv[]) {
15590                   $arg;  // The input object in the target language
15591                   $1;    // C local variable for first argument
15592                   $2;    // C local variable for second argument
15593
15594                   // These variables refer to either argument
15595                   $1_type, $1_ltype, $1_basetype, etc...  (argc)
15596                   $2_type, $2_ltype, $2_basetype, etc...  (argv[])
15597
15598                   // Array dimension of argv
15599                   $2_dim0
15600               }
15601
15602            Basically any variable that was available in normal typemaps
15603            is available for either argument by prefacing the variable
15604            name by '$n_' where n is the argument position.
15605
15606            Notes:  
15607            (1) Multi-valued typemaps can only be applied to a single
15608                object in the target scripting language.   For example,
15609                you can split a string into a (char *, int) pair or
15610                split a list into a (int, char []) pair.  It is not
15611                possible to map multiple objects to multiple arguments.
15612
15613            (2) To maintain compatibility with older SWIG versions, the
15614                variables such as $target and $type are preserved and
15615                are mapped onto the first argument only.
15616
15617            (3) This should not affect compatibility with older code.
15618                Multi-valued typemaps are an extension to typemap handling.
15619                Single valued typemaps can be specified in the usual
15620                way.
15621
15622            The old $source and $target variables are officially
15623            deprecated.  Input variables are referenced through
15624            $arg$ and output values are reference through $result$.
15625
15626            *** NEW FEATURE ***
15627
15628 10/16/2001:beazley
15629            Added parsing support for multivalued typemaps.  The syntax
15630            is a little funky, but here goes:
15631
15632               // Define a multivalued typemap
15633               %typemap(in) (int argc, char *argv[]) {
15634                     ... typemap code ...
15635               }
15636
15637               // Multivalued typemap with locals
15638               %typemap(in) (int argc, char *argv[])(int temp) {
15639                     ... typemap code ...
15640               }
15641               
15642               // Copy a multivalued typemap
15643               %typemap(in) (int argcount, char **argv) = (int argc, char *argv[]);
15644
15645               // Apply a multivalued typemap
15646               %apply (int argc, char *argv[]) { (int argcount, char **argv) };
15647
15648            Note: this extra parsing support is added for future extension.
15649            No language modules currently support multi-valued typemaps.
15650
15651 10/11/2001:beazley
15652            Modified the typemap matching code to discard qualifiers when
15653            checking for a match.   For example, if you have a declaration
15654            like this:
15655
15656                  void blah(const char *x);
15657
15658            The typemap checker checks for a match in the following order:
15659
15660                  const char *x
15661                  const char *
15662                  char *x
15663                  char *
15664
15665            If typedef's are involved, qualifier stripping occurs before
15666            typedef resolution.  So if you had this,
15667
15668                 typedef char *string;
15669                 void blah(const string x);
15670
15671            typemap checking would be as follows:
15672
15673                 const string x
15674                 const string
15675                 string x
15676                 string
15677                 const char *x
15678                 const char *
15679                 char *x
15680                 char *
15681
15682            The primary reason for this change is to simplify the implementation
15683            of language modules.  Without qualifier stripping, one has to write
15684            seperate typemaps for all variations of const and volatile (which
15685            is a pain).
15686
15687            *** POTENTIAL INCOMPATIBILITY ***  Typemaps might be applied in
15688            places where they weren't before.
15689
15690
15691 10/9/2001: beazley
15692            SWIG now generates wrappers that properly disambiguate
15693            overloaded methods that only vary in constness.  For
15694            example:
15695
15696                class Foo {
15697                   ...
15698                   void blah();
15699                   void blah() const;
15700                   ...
15701                };
15702
15703            To handle this, the %rename directive can be used normally.
15704            
15705                %rename(blah_const) blah() const;
15706
15707            In the resulting wrapper code, method calls like this
15708            are now generated:
15709
15710                (obj)->blah()               // Non-const version
15711                ((Foo const *)obj)->blah()  // const version
15712
15713            This should force the right method to be invoked.
15714            Admittedly, this is probably obscure, but we might
15715            as well get it right.
15716
15717 10/8/2001: beazley
15718            The preprocessor now ignores '\r' in the input.
15719            This should fix the following bug:
15720            [ #468416 ] SWIG thinks macro defs are declarations?
15721
15722 10/8/2001: beazley
15723            Added support for ||, &&, and ! in constants.  This
15724            fixes SF [ #468988 ] Logical ops break preprocessor.
15725            However, at this time, constants using these operators
15726            are not supported (the parser will issue a warning).
15727
15728 10/4/2001: beazley
15729            Added -show_templates command line option.  This makes
15730            SWIG display the code it actually parses to generate
15731            template wrappers.  Mostly useful for debugging.
15732            *** NEW FEATURE ***
15733
15734 10/4/2001: beazley
15735            Change to semantics of %template directive.  When
15736            using %template, the template arguments are handled
15737            as types by default.  For example:
15738
15739                 %template(vecint) vector<int>;
15740                 %template(vecdouble) vector<double>;
15741
15742            To specify a template argument that is *not* a type, you
15743            need to use default-value syntax. For example:
15744
15745                 %template(vecint) vector<int,int=50>;
15746                 %template(vecdouble) vector<int,size=100>;
15747
15748            In this case, the type name doesn't really matter--only
15749            the default value (e.g., 50, 100) is used during
15750            expansion.  This differs from normal C++, but I couldn't
15751            figure out a better way to do it in the parser.  Might
15752            implement an alternative later.
15753            *** POTENTIAL INCOMPATIBILITY ***
15754        
15755 10/4/2001: beazley
15756            Major changes to template handling in order to provide
15757            better integration with the C++ type-system. The main
15758            problem is as follows:
15759
15760            Suppose you have a template like this:
15761
15762               template<class T> void blah(const T x) { stuff };
15763                    
15764            Now suppose, that you instantiate the template on a
15765            type like this in SWIG:
15766
15767               %template(blahint) blah<int *>;
15768
15769            In C++, this is *supposed* to generate code like this:
15770
15771               void blah(int *const x) { stuff };
15772
15773            However, in SWIG-1.3.9, the template substitution gets it wrong
15774            and produces
15775
15776               void blah(const int *x) { stuff };
15777
15778            (notice the bad placement of the 'const' qualifier).
15779
15780            To fix this, the SWIG parser now generates implicit typedefs
15781            for template type arguments that produces code roughly
15782            equivalent to doing this:
15783
15784               typedef int *__swigtmpl1;
15785               %template(blahint) blah<__swigtmpl1>;
15786
15787            which generates code like this:
15788
15789               void blah(const __swigtmpl1 x) { stuff };
15790
15791            Since this is correct in both C++ and SWIG, it provides the right
15792            semantics and allows everything to compile properly.  However,
15793            to clean up the generated code a little bit, the parser keeps
15794            track of the template types and performs back-substitution to
15795            the original type when building the parse tree.  Thus, even
15796            though the implicit typedef is used in the input and may appear
15797            in the generated wrapper file (for proper compilation), the parse
15798            tree will hide a lot of these details.   For example:
15799
15800               void blah(const __swigtmpl1 x) { stuff };
15801
15802            will look like it was declared as follows (which is what
15803            you want):
15804
15805               void blah(int *const x) { stuff }
15806
15807            The only place you are likely to notice the typedef hack
15808            is in bodies of template functions.  For example, if you
15809            did this,
15810
15811               template<class T> class blah {
15812                    ...
15813                    %addmethods {
15814                        void spam() {
15815                           T  tempvalue;
15816                           ...
15817                        }
15818                    }
15819               }
15820
15821            you will find that 'T tempvalue' got expanded into some
15822            strange typedef type.  This *still* compiles correctly 
15823            so it's not a big deal (other than looking kind of ugly
15824            in the wrapper file).
15825
15826 10/4/2001: beazley
15827            Fixed some inheritance problems in Tcl Object interface.
15828
15829 10/1/2001: beazley
15830            Tcl module has changed to use byte-backed pointer strings.  This
15831            implementation should be safe on 64-bit platforms.  However,
15832            the order in which digits appear in pointer values no longer
15833            directly corresponds to the actual numerical value of a
15834            pointer (on little-endian machines, pairs of digits appear
15835            in reverse order).
15836
15837 10/1/2001: beazley
15838            Perl5 module is now driven by a configuration file 'perl5.swg'
15839            in the SWIG library.
15840
15841 10/1/2001: beazley
15842            The perl5 module no longer tries to apply the "out" typemap
15843            in code generated for magic variables.  I'm surprised that
15844            this ever worked at all (since all of the code that was there
15845            was wrong anyways).   Use the "varout" typemap to handle
15846            global variables.
15847
15848 10/1/2001: beazley
15849            Fixed a bug related to character array members of structures.
15850            For example:
15851
15852                 struct Foo {
15853                    char name[32];
15854                 };
15855
15856            SWIG is normally supposed to return a string, but this was
15857            broken in 1.3.9.   The reason it was broken was actually
15858            due to a subtle new feature of typemaps.  When a data member
15859            is set to an array like this, the return type of the related
15860            accessor function is actually set to an array.  This means
15861            that you can now write typemaps like this:
15862
15863               %typemap(python,out) char [ANY] {
15864                  $target = PyString_FromStringAndSize($source,$dim0);
15865               }
15866
15867            This functionality can be used to replace the defunct
15868            memberout typemap in a more elegant manner.
15869
15870 9/29/2001: beazley
15871            Some further refinement of qualified C++ member functions.
15872            For example:
15873
15874                class Foo {
15875                   ...
15876                   void foo() const;
15877                   ...
15878                };
15879
15880            (i) The SWIG parser was extended slightly to allow 'volatile'
15881            and combinations of 'const' and 'volatile' to be used.  This
15882            is probably rare, but technically legal.  Only added for
15883            completeness.
15884
15885            (ii) For the purposes of overloading, qualified and non-qualified
15886            functions are different.  Thus, when a class has methods like this:
15887
15888                  void foo();
15889                  void foo() const;
15890
15891            Two distinct methods are declared.  To deal with this, %rename
15892            and similar directives have been extended to recognize const.
15893            Thus, one can disambiguate the two functions like this:
15894
15895                 %rename(fooconst) Foo::foo() const;
15896
15897            or simply ignore the const variant like this:
15898
15899                 %ignore Foo::foo() const;
15900
15901            Note: SWIG currently has no way to actually invoke the const
15902            member since the 'const' is discarded when generating wrappers
15903            for objects.  
15904
15905 9/27/2001: beazley
15906            New directive. %namewarn can be used to issue warning
15907            messages for certain declaration names.   The name
15908            matching is the same as for the %rename directive.
15909            The intent of this directive is to issue warnings for
15910            possible namespace conflicts.  For example:
15911
15912               %namewarn("print is a python keyword") print;
15913
15914            The name matching algorithm is performed after a name
15915            has been resolved using %rename.  Therefore, a
15916            declaration like this will not generate a warning:
15917
15918               %rename("Print") print;
15919               ...
15920               void print();    /* No warning generated */
15921
15922            Since the warning mechanism follows %rename semantics, it is
15923            also to issue warnings for specific classes or just for
15924            certain member function names.
15925
15926            (Dave - I've been thinking about adding something like this
15927            for quite some time.  Just never got around to it)
15928            *** NEW FEATURE ***
15929
15930
15931 9/27/2001: beazley
15932            Enhanced the %ignore directive so that warning messages
15933            can be issued to users.   This is done using %ignorewarn
15934            like this:
15935
15936              %ignorewarn("operator new ignored") operator new;
15937
15938            The names and semantics of %ignorewarn is exactly the 
15939            same as %ignore. The primary purpose of this directive
15940            is for module writers who want to ignore certain types
15941            of declarations, but who also want to alert users about it.
15942            A user might also use this for debugging (since messages
15943            will appear whenever an ignored declaration appears).
15944            *** NEW FEATURE ***
15945
15946 9/26/2001: beazley
15947            Super-experimental support for overloaded operators. 
15948            This implementation consists of a few different parts.
15949
15950            (i) Operator names such as 'operator+' are now allowed
15951            as valid declarator names.  Thus the 'operator' syntax
15952            can appear *anyplace* a normal declarator name was used
15953            before.  On the surface, this means that operators can
15954            be parsed just like normal functions and methods. 
15955            However, it also means that operator names can be used
15956            in many other SWIG directives like %rename.  For example:
15957
15958             %rename(__add__) Complex::operator+(const Complex &);
15959
15960            (ii) Operators are wrapped *exactly* like normal functions
15961            and methods.  Internally, the operator name is used 
15962            directly meaning that the wrapper code might contain
15963            statements like this:
15964
15965                 arg0->operator*((Complex const &)*arg1);
15966
15967            This all seems to parse and compile correctly (at least
15968            on my machine).
15969
15970            (iii) SWIG will no longer wrap a declaration if its symbol
15971            table name contains illegal identifier characters.  If
15972            illegal characters are detected, you will see an error
15973            like this:
15974  
15975                 Warning. Can't wrap operator* unless renamed to a valid identifier.
15976
15977            The only way to fix this is to use %rename or %name to bind
15978            the operator to a nice name like "add" or something. Note:
15979            the legal identifier characters are determined by the target
15980            language.
15981
15982            There are certain issues with friend functions and operators.
15983            Sometimes, friends are used to define mixed operators such
15984            as adding a Complex and a double together.  Currently, SWIG
15985            ignores all friend declarations in a class.  A global operator
15986            declaration can probably be made to work, but you'll have to
15987            rename it and it probably won't work very cleanly in the
15988            target language since it's not a class member.
15989
15990            SWIG doesn't know how to handle operator specifications 
15991            sometimes used for automatic type conversion. For example:
15992
15993            class String {
15994               ...
15995               operator const char*();
15996               ...
15997            };
15998
15999            (this doesn't parse correctly and generates a syntax error).
16000
16001            Also: operators no longer show up as separate parse-tree
16002            nodes (instead they are normal 'cdecl' nodes).  I may
16003            separate them as a special case later.
16004
16005            See Examples/python/operator for an example.
16006
16007            *** SUPER-EXPERIMENTAL NEW FEATURE ***
16008
16009 Version 1.3.9 (September 25, 2001)
16010 ==================================
16011
16012 9/25/2001: beazley
16013            Fixed parsing problem with type declarations like 
16014            'char ** const'.  SWIG parsed this correctly, but the
16015            internal type was represented incorrectly (the pointers
16016            and qualifiers were in the wrong order).
16017
16018 9/25/2001: beazley
16019            Withdrew experimental feature (noted below) that was
16020            causing serious parsing problems.
16021
16022 Version 1.3.8 (September 23, 2001)
16023 ==================================
16024
16025 9/23/2001: beazley
16026            Included improved distutils setup.py file in the Tools 
16027            directory (look for the setup.py.tmpl file).  Contributed by
16028            Tony Seward.
16029
16030 9/23/2001: beazley
16031            Included two new RPM spec files in the Tools directory. Contributed
16032            by Tony Seward and Uwe Steinmann.
16033   
16034 9/21/2001: beazley
16035            Fixed SF Bug [ #463635 ] Perl5.swg does not compile in Visual C++
16036
16037 9/21/2001: beazley
16038            Two new directives control the creation of default
16039            constructors and destructors:
16040
16041                 %nodefault
16042                 %makedefault
16043
16044            These replace %pragma nodefault and %pragma makedefault.
16045            (old code will still work, but documentation will only
16046            describe the new directives).
16047
16048 9/21/2001: beazley
16049            Fixed SF Bug [ #462354 ] %import broken in 1.3.7.
16050
16051 9/20/2001: beazley
16052
16053            Parser modified to ignore out-of-class constructor
16054            and destructor declarations.  For example:
16055
16056                inline Foo::Foo() :
16057                     Bar("foo")
16058                { 
16059                } 
16060
16061                inline Foo::~Foo() {
16062                }
16063
16064            Suggested by Jason Stewart.
16065            *** EXPERIMENTAL FEATURE ***
16066
16067 9/20/2001: beazley
16068            Modified the parser to ignore forward template class
16069            declarations.  For example:
16070
16071               template <class V, long S> class MapIter;
16072
16073            Suggested by an email example from Irina Kotlova.
16074
16075 9/20/2001: beazley
16076            Fixed problem with undeclared tcl_result variable in 
16077            the "out" typemap for Tcl.  Reported by Shaun Lowry.
16078
16079 9/20/2001: beazley
16080            Incorporated changes to make SWIG work with ActivePerl.  
16081            Contributed by Joel Reed.
16082
16083 9/20/2001: beazley
16084            Slight change to the parsing of C++ constructor initializers.
16085            For example:
16086
16087            class Foo : public Bar {
16088            public:
16089                   Foo() : Bar(...) {...}
16090            };
16091
16092            SWIG now discards the contents of the (...) regardless of 
16093            what might enclosed (even if syntactically wrong).  SWIG
16094            doesn't need this information and there is no reason to
16095            needless add syntax rules to handle all of the possibilities
16096            here.
16097
16098 9/20/2001: beazley
16099            Change to typemaps for structure members.  If you have a
16100            structure like this:
16101
16102               struct Vector {
16103                 int *bar;
16104               };
16105
16106            The member name 'bar' is now used in any accessor functions.
16107            This allows the "in" typemap to be used when setting the value.
16108            For example, this typemap
16109
16110                %typemap(python,in) int *bar {
16111                    ...
16112                }
16113
16114            now matches Vector::bar.  It should be noted that this will also
16115            match any function with an argument of "int *bar" (so you should
16116            be careful).
16117            *** NEW FEATURE. POTENTIAL INCOMPATIBILITY ***
16118
16119 9/20/2001: beazley
16120            Fixed SF bug #462642 setting string values in structures
16121
16122 9/20/2001: beazley
16123            Fixed SF bug #462398 problem with nested templates.
16124
16125 9/20/2001: beazley
16126            Fixed SF bug #461626 problem with formatting and C++ comments.
16127             
16128 9/20/2001: beazley
16129            Fixed SF bug #462845 Wrong ownership of returned objects.
16130            
16131 9/19/2001: beazley
16132            Fixed SF bug #459367.  Default constructors for classes
16133            with pure virtual methods.
16134
16135 9/19/2001: beazley
16136            Fixed problem with default arguments and class scope.  For
16137            example:
16138
16139                class Foo {
16140                public:
16141                   enum bar { FOO, BAR };
16142                   void blah(bar b = FOO);
16143                   ...
16144                }
16145
16146            SWIG now correctly generates a default value of "Foo::FOO" for
16147            the blah() method above.  This used to work in 1.1, but was
16148            broken in 1.3.7.   Bug reported by Mike Romberg.
16149
16150 Version 1.3.7  (September 3, 2001)
16151 ==================================
16152
16153 9/02/2001: beazley
16154            Added special %ignore directive to ignore declarations.  This
16155            feature works exactly like %rename.  For example:
16156
16157              %ignore  foo;        // Ignore all declarations foo
16158              %ignore  ::foo;      // Only ignore foo in global scope
16159              %ignore  Spam::foo;  // Only ignore in class Spam
16160              %ignore  *::foo;     // Ignore in all classes
16161
16162            %ignore can also be parameterized.  For example:
16163
16164              %ignore foo(int);
16165              %ignore ::foo(int);
16166              %ignore Spam::foo(int);
16167              %ignore *::foo(int);
16168
16169            *** NEW FEATURE ***
16170             
16171
16172 9/02/2001: cheetah (william fulton)
16173            [Java] shadowcode pragma modified so that the code that is output 
16174            in the shadow file is placed relative to where it is placed in the 
16175            c/c++ code. This allows support for JavaDoc function comments. 
16176
16177 9/01/2001: beazley
16178            Fixed SF Patch [ #447791 ] Fix for python -interface option.
16179            Submitted by Tarn Weisner Burton.
16180
16181 9/01/2001: beazley
16182            SWIG no longer generates default constructors/destructors
16183            for a class if it only defines a private/protected constructor
16184            or destructor or if any one of its base classes only has
16185            private constructors/destructors.  This was reported in
16186            SF Patch [ #444281 ] nonpublic/default/inhereted ctor/dtor
16187            by Marcelo Matus.
16188
16189 9/01/2001: beazley
16190            Added patch to Perl5 module that allows constants to be
16191            wrapped as constants that don't require the leading $.
16192            This feature is enabled using the -const option.
16193            Patch contributed by Rich Wales.
16194            *** NEW FEATURE ***
16195
16196 8/31/2001: beazley
16197            Added parsing support for the 'volatile' type qualifier.
16198            volatile doesn't mean anything to SWIG, but it is
16199            needed to properly generate prototypes for declarations
16200            that use it.  It's also been added to make the SWIG type
16201            system more complete.
16202            *** NEW FEATURE ***
16203
16204 8/30/2001: beazley
16205            Added support for parameterized %rename directive.  *** This
16206            new feature can be used to greatly simplify the task of
16207            resolving overloaded methods and functions. ***
16208            
16209            In prior versions of SWIG, the %rename directive was
16210            used to consistently apply an identifier renaming. For 
16211            example, if you said this:
16212
16213                 %rename foo bar;
16214
16215            Every occurrence of 'foo' would be renamed to 'bar'. 
16216            Although this works fine for resolving a conflict with a
16217            target language reserved word, it is useless for
16218            for dealing with overloaded methods.    This is because
16219            all methods are simply renamed to the same thing 
16220            (generating the same conflict as before).
16221
16222            Therefore, the only way to deal with overloaded methods
16223            was to go through and individually rename them all using
16224            %name.  For example:
16225
16226              class Foo {
16227              public:
16228                  virtual void bar(void);
16229                  %name(bar_i) virtual void bar(int);
16230                  ...
16231              };
16232
16233            To make matters worse, you had to do this for all
16234            derived classes too.
16235
16236              class Spam : public Foo {
16237              public:
16238                  virtual void bar(void);
16239                  %name(bar_i) virtual void bar(int);
16240                  ...
16241              };
16242
16243            Needless to say, this makes it extremely hard to resolve
16244            overloading without a lot of work and makes it almost
16245            impossible to use SWIG on raw C++ .h files.
16246
16247            To fix this, %rename now accepts parameter declarators.
16248            The syntax has also been changed slightly.  For example,
16249            the following declaration renames all occurrences of 'bar(int)'
16250            to 'bar_i', leaving any other occurrence of 'bar' alone.
16251
16252              %rename(bar_i) bar(int);
16253
16254            Using this feature, you can now selectively rename 
16255            certain declarations in advance.  For example:
16256
16257              %rename(bar_i) bar(int);
16258              %rename(bar_d) bar(double);
16259
16260              // Include raw C++ header    
16261              %include "header.h"
16262
16263            When %rename is used in this manner, all occurrence of bar(int)
16264            are renamed wherever they might occur.  More control is obtained
16265            through explicit qualification. For example,
16266
16267               %rename(bar_i) ::bar(int);
16268
16269            only applies the renaming if bar(int) is defined in the global scope.
16270            The declaration,
16271      
16272               %rename(bar_i) Foo::bar(int);
16273
16274            applies the renaming if bar(int) is defined in a class Foo.
16275            This latter form also supports inheritance.  Therefore, if you
16276            had a class like this:
16277
16278                class Spam : public Foo {
16279                public:
16280                    void bar(int);
16281                }
16282
16283            The Spam::bar(int) method would also be renamed (since Spam 
16284            is a subclass of Foo).   This latter feature makes it easy
16285            for SWIG to apply a consistent renaming across an entire
16286            class hierarchy simply by specifying renaming rules for
16287            the base class.
16288
16289            A class wildcard of * can be used if you want to renaming
16290            all matching members of all classes.  For example:
16291
16292               %rename(bar_i) *::bar(int);
16293
16294            will rename all members bar(int) that are defined in classes.
16295            It will not renamed definitions of bar(int) in the global
16296            scope.
16297
16298            The old use of %rename is still supported, but is somewhat
16299            enhanced.  
16300
16301               %rename(foo) bar;      // Renames all occurrences of 'bar'.
16302               %rename(foo) ::bar;    // Rename all 'bar' in global scope only.
16303               %rename(foo) *::bar;   // Rename all 'bar' in classes only.
16304               %rename(foo) Foo::bar; // Rename all 'bar' defined in class Foo.
16305
16306            *** NEW FEATURE ***
16307
16308 8/30/2001: beazley
16309            Added support for data-member to member-function 
16310            transformation.  For example, suppose you had a
16311            structure like this:
16312
16313                 struct Vector {
16314                     double x,y;
16315                 };
16316
16317            Now suppose that you wanted to access x and y 
16318            through a member function interface instead 
16319            of the usual SWIG behavior. For example:
16320
16321               f.set_x(3.4)      # instead of f.x = 3.4
16322               x = f.get_x()     # instead of x = f.x
16323
16324            To do this, simply use the new %attributefunc
16325            directive.  For example:
16326
16327               %attributefunc(get_%s,set_%s)
16328               struct Vector {
16329                  double x,y;
16330               };
16331               %noattributefunc
16332
16333            The arguments to %attributefunc are C-style printf
16334            format strings that determine the naming convention
16335            to use.  %s is replaced with the actual name of the
16336            data member. SWIG provides a number of printf
16337            extensions that might help.  For example, if you
16338            wanted to title case all of the attributes, you
16339            could do this:
16340
16341               %attributefunc(get%(title)s,set%(title)s);
16342
16343            This will turn an attribute 'bar' to 'getBar()' and 'setBar()'.
16344
16345            (someone requested this long ago, but I finally figured
16346            how to implement it in a straightforward manner).
16347            *** EXPERIMENTAL NEW FEATURE ***
16348            
16349 8/30/2001: beazley
16350            SWIG now automatically generates default constructors
16351            and destructors if none are defined.  This used to be
16352            enabled with a command line switch -make_default, but
16353            most people want these functions anyways.  To turn
16354            off this behavior use the -no_default option or include
16355            the following pragma in the interface file:
16356  
16357                  %pragma no_default;
16358   
16359            This may break certain interfaces that defined their
16360            own constructors/destructors using the same naming
16361            convention as SWIG.  If so, you will get duplicate
16362            symbols when compiling the SWIG wrapper file.
16363            *** POTENTIAL INCOMPATIBILITY ***
16364
16365 8/29/2001: beazley
16366            Changes to Perl5 shadow class code generation.  Iterators
16367            are no longer supported (FIRSTKEY, NEXTKEY).  Also, attribute
16368            access has been changed to rely on inheritance in order
16369            to provide better behavior across modules.  
16370
16371 8/28/2001: beazley
16372            Various obscure improvements to the type system and classes.
16373            Strange declarations like this are now wrapped correctly
16374            (i.e., the generated wrapper code doesn't cause the C++
16375             compiler to die with a type error).
16376
16377             class Foo {
16378             public:
16379                  typedef double Real;
16380                  Real foo(Real (*op)(Real,Real), Real x, Real y);
16381             };
16382
16383            Inheritance of types is also handled correctly.
16384            
16385 8/28/2001: beazley
16386            Changes to class wrappers.   When SWIG sees two classes like this,
16387  
16388            class X {
16389            public:
16390              void foo();
16391              ...
16392            }
16393  
16394            class Y : public X {
16395            public:
16396              void bar();
16397              ...
16398            }
16399  
16400            it now only generates two wrapper functions:
16401  
16402              X_foo(X *x) { x->foo(); }
16403              Y_bar(Y *y) { y->bar(); }
16404  
16405            Unlike SWIG1.15, the foo() method does *not* propagate to a wrapper
16406            function Y_foo(). Instead, the base class method X_foo() must be
16407            used.
16408
16409            This change should not affect modules that use shadow classes, but
16410            it might break modules that directly use the low-level C wrappers.
16411            This change is being made for a number of reasons:
16412
16413                -  It greatly simplifies the implementation of SWIG--especially
16414                   with anticipated future changes such as overloaded methods.
16415
16416                -  It results in substantially less wrapper code--especially
16417                   for big C++ class hierarchies (inherited declarations
16418                   are no longer copied into every single derived class).
16419
16420                -  It allows for better code generation across multiple
16421                   SWIG generated modules (code isn't replicated in
16422                   every single module).
16423
16424            *** POTENTIAL INCOMPATIBILITY ***                                    
16425
16426 8/22/2001: cheetah (william fulton)
16427            Provided some Windows documentation in the Win directory and some
16428            Visual C++ project files for running examples on Windows.
16429
16430 8/28/2001: mkoeppe
16431            [Guile] Handle renamed overloaded functions properly;
16432            thanks to Marc Zonzon <Marc.Zonzon@univ-rennes1.fr> for the
16433            patch.  See the new test case name_cxx.
16434
16435 8/27/2001: mkoeppe
16436            [Tcl] Removed lots of warnings issued by the Sun Forte
16437            compilers, which were caused by mixing function pointers
16438            of different linkages (C++/C). 
16439
16440 8/23/2001: mkoeppe
16441            Improved the MzScheme module by porting Guile's pointer
16442            type checking system and making type dispatch
16443            typemap-driven. 
16444
16445 8/22/2001: beazley
16446            Entirely new symbol table processing.   SWIG should be able to
16447            report much better error messages for multiple declarations. 
16448            Also, the new symbol table allows for overloaded functions
16449            (although overloading isn't quite supported in the language
16450            modules yet).
16451
16452 8/22/2001: cheetah (william fulton)
16453            * [Java] %new support added.
16454            * [Java] Package JNI name refixed!
16455
16456 8/19/2001: beazley
16457            Python module modified to support pointers to C++ members.  This
16458            is an experimental feature.
16459            *** NEW FEATURE ***
16460      
16461 8/19/2001: beazley
16462            Added limited parsing and full type-system support for pointers to
16463            members. None of SWIG's language modules really know how to deal with
16464            this so this is really only provided for completeness and future
16465            expansion.  Note: SWIG does not support pointers to members which 
16466            are themselves pointers to members, references to pointers to members,
16467            or other complicated declarations like this.
16468            *** NEW FEATURE ***
16469
16470 8/19/2001: beazley
16471            SWIG is much better at parsing certain C++ declarations. Operators and
16472            friends generally don't cause anymore syntax errors.  However, neither
16473            are really supported.
16474
16475 8/18/2001: beazley
16476            Added *highly* experimental support for wrapping of C++
16477            template declarations.  Since C++ templates are essentially
16478            glorified macros and SWIG has a fully operational C 
16479            preprocessor with macro support, the parser now converts
16480            template declarations to macros.  For example, a function
16481            template like this
16482
16483                template<class T> T max(T a, T b);
16484
16485            is internally converted into a macro like this:
16486
16487                %define %_template_max(__name,T)
16488                %name(__name) T max(T a, T b);
16489                %enddef
16490
16491            To instantiate a version of the template, a special %template declaration
16492            is used like this:
16493
16494                %template(maxint) max<int>;          
16495                %template(maxdouble) max<double>;
16496
16497            The parameter to the %template directive must be proper C identifier that's
16498            used to uniquely name the resulting instantiation.   When used, the
16499            the expanded macro looks like this:
16500
16501               %name(maxint) int max(int a, int b);
16502               %name(maxdouble) double max(double a, double b);
16503
16504            A similar technique is used for template classes.   For instance:
16505
16506               template<class T> class vector {
16507                  T *data;
16508                  int sz;
16509               public:
16510                  vector(int nitems);
16511                  T *get(int n);
16512                  ...
16513               };
16514
16515            Gets converted into a macro like this:
16516
16517               %define %_template_vector(__name, T)
16518               %{
16519               typedef vector<T> __name;
16520               %}
16521               class __name {
16522                  T *data;
16523                  int sz;
16524               public:
16525                  __name(int nitems);
16526                  T *get(int n);
16527                  ...
16528               };
16529               typedef __name vector<T>;
16530               %enddef
16531
16532            An a specific instantiation is created in exactly the same way:
16533
16534              %template(intvec) vector<int>;
16535
16536            The resulting code parsed by SWIG is then:
16537
16538               %{
16539               typedef vector<int> intvec;
16540               %}
16541               class intvec {
16542                   int *data;
16543                   int sz;
16544               public:
16545                   intvec(int nitems);
16546                   int *get(int n);
16547                   ...
16548               };
16549               typedef intvec vector<int>;
16550
16551            Note: the last typedef is non-standard C and is used by SWIG to provide
16552            an association between the name "intvec" and the template type 
16553            "vector<int>".
16554
16555            CAUTION:  This is an experimental feature and the first time SWIG has
16556            supported C++ templates.   Error reporting is essential non-existent.
16557            It will probably break in certain cases.
16558            *** EXPERIMENTAL NEW FEATURE ****
16559
16560 8/15/2001: beazley
16561            Change to wrapping of multi-dimensional arrays.  Arrays
16562            are now properly mapped to a pointer to an array of
16563            one less dimension.  For example:
16564
16565                 int [10];              -->  int *
16566                 int [10][20];          -->  int (*)[20];
16567                 int [10][20][30];      -->  int (*)[20][30];
16568
16569            This change may break certain SWIG extensions because
16570            older versions simply mapped all arrays into a single
16571            pointer such as "int *".   Although possibly unusual, 
16572            the new version is correct in terms of the C type system.
16573            *** POTENTIAL INCOMPATIBILITY ***
16574     
16575 8/06/2001: cheetah (william fulton)
16576            * [Java] Array setters generated for struct/class array members.
16577
16578 8/13/2001: beazley
16579            Many improvements to Tcl/Perl/Python modules to better
16580            work with multiple interface files and the %import directive.
16581
16582 8/13/2001: beazley
16583            Fixed up the behavior of %import in the Python module.
16584            SWIG no longer pollutes the module namespace by using
16585            'from module import *' to refer to the other module. 
16586            Instead, it does a proper 'import module'.   Also, SWIG
16587            may work a lot better when importing modules that include
16588            references to other imported modules.
16589
16590 8/13/2001: mkoeppe
16591            Added new typemap substitutions, generalizing those of the
16592            Guile-specific 5/27/2001 changes: 
16593            * $descriptor is the same as SWIGTYPE$mangle, but also
16594              ensures that the type descriptor of this name gets
16595              defined.
16596            * $*type, $*ltype, $*mangle, $*descriptor are the same as
16597              the variants without star, but they REMOVE one level of
16598              pointers from the type. (This is only valid for pointer 
16599              types.)
16600            * $&type, $&ltype, $&mangle, $&descriptor are the same as
16601              the variants without ampersand, but they ADD one level of
16602              pointers to the type.
16603            The Guile-specific substitution $basedescriptor was removed
16604            because it was useless.
16605
16606 8/12/2001: beazley
16607            The %extern directive is now deprecated and withdrawn.  The
16608            purpose of this directive was to import selected definitions
16609            from other interface files and headers.  However, the same
16610            functionality is better handled through %import.   This
16611            leaves SWIG with two file inclusion directives:
16612
16613               %include filename     - Inserts into current interface
16614               %import filename      - Import types and classes from 
16615                                       another module
16616
16617            *** POTENTIAL INCOMPATIBILITY ***
16618
16619 8/09/2001: beazley
16620            Added new support for wrapping C/C++ callback functions. 
16621            A common problem with some C libraries is that many
16622            functions take a function pointer as an argument. For example:
16623
16624               int do_op(..., int (*op)(int,int), ...);
16625
16626            Unfortunately, the only way to call such a function is to
16627            pass it a function pointer of some compatible type.  In
16628            previous versions of SWIG, you had to solve this problem
16629            with some really gross hacks.  For example, if you wanted to
16630            use the following function as a callback,
16631
16632                int foo(int, int);
16633
16634            you had to install a pointer to it as a constant.  For example:
16635
16636                %constant int (*FOO)(int,int) = foo;
16637
16638            or 
16639
16640                const int (*FOO)(int,int) = foo;
16641
16642            or if you had a really old SWIG version:
16643
16644                typedef int (*OP_FUNC)(int,int);
16645                int do_op(..., OP_FUNC, ...);
16646                const OP_FUNC FOO = foo;
16647
16648            
16649            Now, you can do one of two things:
16650
16651                %constant int foo(int,int);
16652
16653            This creates a constant 'foo' of type int (*)(int,int).
16654            Alternatively, you can do this:
16655
16656                %callback("%s");
16657                int foo(int,int);
16658                int bar(int,int);
16659                %nocallback;
16660
16661            In this case, the functions are installed as constants where
16662            the name is defined by the format string given to %callback().
16663            If the names generated by the format string differ from the
16664            actual function name, both a function wrapper and a callback 
16665            constant are created.  For example:
16666
16667                %callback("%(upper)s");
16668                int foo(int,int);
16669                int bar(int,int);
16670                %nocallback;
16671            
16672            Creates two wrapper functions 'foo', 'bar' and additionally
16673            creates two callback constants 'FOO', 'BAR'.
16674
16675            Note: SWIG still does not provide automatic support for 
16676            writing callback functions in the target language.
16677            *** NEW FEATURE ***
16678
16679 8/06/2001: cheetah (william fulton)
16680            * struct nesting fixes as per SF bug #447488.
16681
16682 8/03/2001: beazley
16683            The %name directive now applies to constants created with
16684            #define and %constant.  However, most language modules
16685            were never written to support this and will have to be
16686            modified to make it work.  Tcl, Python, and Perl modules
16687            are working now.
16688            *** NEW FEATURE ***
16689
16690 8/03/2001: beazley
16691            Massive changes and simplification of C declaration parsing.
16692            Although SWIG is still not a full C parser, its ability
16693            to handle complex datatypes including pointers to functions
16694            and pointers to arrays has been vastly improved.  
16695
16696 8/03/2001: cheetah (william fulton)
16697            * Distribution fixes: autoconf no longer needed to install SWIG.
16698
16699 8/02/2001: beazley
16700            Removed two undocumented parsing features.  SWIG no longer
16701            supports out-of-class static function or variable
16702            declarations.  For example:
16703
16704                 static int Foo::bar;
16705
16706            This feature may return if there is sufficient demand. 
16707            However, since SWIG is most often used with header files,
16708            it is more likely for these definitions to be included
16709            in the class definition.
16710            *** POTENTIAL INCOMPATIBILITY ***
16711
16712 8/02/2001: cheetah (william fulton)
16713            * Cleanup of the GIFPlot examples. Upgraded Java GIFPlot example.
16714
16715 8/01/2001: cheetah (william fulton)
16716            * [Java] Efficiency changes: _cPtr used where possible rather than
16717              getCPtr(). Bug fixes for inheritance - derived class sometimes
16718              didn't delete the c memory when _delete() was called.
16719            * [Java] Abstract c++ classes are wrapped with a java abstract shadow
16720              class. Also a pure virtual function is mapped with an abstract method.
16721            * The default output file has always been <module>_wrap.c. It is now
16722              <module>_wrap.cxx if the -c++ commandline option is passed to swig.
16723              This has been done as otherwise c++ code would appear in a c file.
16724            *** POTENTIAL INCOMPATIBILITY *** 
16725
16726 7/31/2001: beazley
16727            Modified the %constant directive to be more C-like in syntax.
16728            The syntax is now:
16729
16730                 %constant NAME = VALUE;
16731                 %constant TYPE NAME = VALUE;
16732  
16733            For example:
16734
16735                 %constant Foo *Bar = &Spam;
16736
16737            A more subtle case is as follows:
16738
16739                %constant int (*FOO)(int,int) = blah;
16740
16741            *** POTENTIAL INCOMPATIBILITY ***  Modules that were using
16742            the %constant directive directly will need to be modified.
16743       
16744 7/30/2001: beazley
16745            Removed obscure and undocumented form of the %inline directive:
16746
16747                %inline int blah(int a, int b) {
16748                   ...
16749                }
16750
16751            *** POTENTIAL INCOMPATIBILITY *** 
16752            (note: this feature was never documented and is withdrawn)
16753
16754 7/30/2001: beazley
16755            Removed support for functions with no explicitly declared
16756            return type.  For example:
16757
16758                   foo(int);
16759
16760            In C, such functions were implicitly assumed to return an 'int'.
16761            In C++, this is illegal.  Either way, it's considered bad
16762            style.  Removing support for this in SWIG will simplify
16763            certain issues in parsing.
16764            *** POTENTIAL INCOMPATIBILITY ***
16765
16766 7/30/2001: mkoeppe
16767            * Partial merge from the CVS trunk.  The Source/DOH directory
16768              and most of the Source/Swig directory is up-to-date now.
16769            * [Guile] %scheme is now a macro for %insert("scheme").  
16770              New syntax:  %scheme "FILENAME"; 
16771              New syntax:  %scheme %{ SCHEME-CODE %}
16772              New macros %multiple_values, %values_as_list,
16773              %values_as_vector. 
16774
16775 7/29/2001: beazley
16776            %readonly and %readwrite have been turned into SWIG pragmas.
16777            %pragma(swig) readonly and %pragma(swig) readwrite.  Macros
16778            are used to provide backwards compatibility.
16779
16780 7/29/2001: beazley
16781            Minor changes to %pragma directive.  %pragma must always
16782            be directed to a specific language.  For example:
16783
16784               %pragma(swig) make_default;
16785               %pragma(perl5) include = "blah.i";
16786
16787            Also extended the pragma directive to allow code blocks
16788  
16789               %pragma(foo) code = %{
16790                   ... some code ...
16791               %}
16792
16793            *** POTENTIAL INCOMPATIBILITY ***
16794
16795 7/29/2001: beazley
16796            Change to the way 'const' variables are wrapped.  In 
16797            previous versions of SWIG, a 'const' variable was
16798            wrapped as a constant.   Now, 'const' variables are
16799            wrapped as read-only variables.  There are several
16800            reasons for making this change, mostly pertaining to
16801            subtle details of how 'const' actually works. 
16802
16803            This will probably break old interfaces that used 'const'
16804            to create constants.   As a replacement, consider using this:
16805
16806            const int a = 4;   ===>   %constant int a = 4;
16807            *** POTENTIAL INCOMPATIBILITY ***
16808
16809 7/29/2001: beazley
16810            Reorganization and simplification of type parsing.
16811            Types with 'const' should work correctly now.
16812
16813 7/29/2001: beazley
16814            Most swig directives related to the documentation system
16815            are now deprecated.
16816
16817 7/29/2001: beazley
16818            Removed support for Objective-C in order to simplify
16819            parser reconstruction.  Will return if there is sufficient
16820            demand.
16821            *** POTENTIAL INCOMPATIBILITY ***
16822
16823 7/29/2001: beazley
16824            Code inclusion has been modified in the parser.  A common
16825            directive %insert is now used for everything.  This
16826            inserts a file into the output:
16827
16828                %insert(header) "foo.swg"
16829
16830            This inserts some inline code into the output
16831
16832                %insert(header) %{
16833                    ... some code ... 
16834                %}
16835
16836            There are five predefined targets for the insert directive:
16837
16838                "header"    - Header section of wrapper file
16839                "runtime"   - Runtime section of wrapper file
16840                "wrapper"   - Wrapper section
16841                "init"      - Initialization function
16842                "null"      - Nothing. Discard.
16843
16844            The following directives are still supported, but are
16845            now defined in terms of macros:
16846
16847                %{ ... %}           -> %insert(header)  %{ ... %}
16848                %init %{ ... %}     -> %insert(init)    %{ ... %}
16849                %wrapper %{ ... %}  -> %insert(wrapper) %{ ... %}
16850                %runtime %{ ... %}  -> %insert(runtime) %{ ... %}
16851
16852            Language modules can define new named targets by using the
16853            C API function Swig_register_filebyname() (see main.cxx).
16854            For example, if you wanted to expose a shadow class file,
16855            you could do this:
16856
16857               Swig_register_filebyname("shadow", f_shadow);
16858
16859            Then in the interface file:
16860
16861               %insert(shadow) %{ ... %}
16862
16863            Note: this change should not affect any old interfaces, but
16864            does open up new possibilities for enhancements.
16865
16866 7/29/2001: beazley
16867            SWIG now always includes a standard library file 'swig.swg'.
16868            This file defines a large number of macro definitions
16869            that define the behavior of various SWIG directives.
16870            Previously, all SWIG directives were handled as special
16871            cases in the parser.  This made the parser a large 
16872            bloated mess.  Now, the parser is stripped down to a few
16873            simple directives and macros are used to handle everything else.
16874
16875 7/26/2001: cheetah (william fulton)
16876            * Fixes for Sourceforge bug #444748 - new testcase cpp_static:
16877              [TCL] Class with just static member variable/function fix
16878              [Java] Fixed static variables support
16879              [Ruby] Static variables workaround removed
16880
16881 7/27/2001: mkoeppe
16882            * stype.c (SwigType_default): Strip qualifiers first. The
16883              default type of "int * const" is now "SWIGPOINTER *".
16884            * main.cxx: Define "__cplusplus" in SWIG's preprocessor if
16885              in C++ mode.
16886            * [Guile]: Added some support for arrays and C++
16887              references, fixing the "constant_pointers" test case.
16888            * Moved most tests from the old Guile-specific test-suite
16889              to the new test-suite.  Also moved perl5/pointer-cxx
16890              example there.
16891
16892 7/26/2001: cheetah (william fulton)
16893            * Test-suite added.
16894            * Initial testcases: constant_pointers cpp_enum defines
16895              sizeof_pointers unions virtual_destructor
16896            * Make clean improvements.
16897
16898 7/24/2001: cheetah (william fulton)
16899            * [Java] Underscores in the package name and/or module name
16900            no longer give linking problems.
16901
16902 7/17/2001: cheetah (william fulton)
16903            * More parser bug fixes for constant pointers
16904
16905 7/19/2001: mkoeppe
16906            * [Guile] Aesthetic improvement in variable wrappers.
16907
16908 7/18/2001: beazley
16909            * Fixed core-dump problem in pointer library when 
16910              freeing character arrays.
16911              SF Bug [ #415837 ] pointer lib core dump
16912
16913 7/18/2001: beazley
16914            * Fixed problem with default destructors and shadow
16915              classes.  SF bug #221128.
16916
16917 7/18/2001: beazley
16918            * To provide better line-number tracking in interfaces
16919              with lots of macros, special locator comments are
16920              now generated by the SWIG preprocessor.  For example:
16921
16922                  /*@foo.i,42,BLAH@*/expanded macro/*@@*/
16923
16924              The first /*@...@*/ sequence sets the context
16925              to point to the macro code.  The /*@@*/ comment
16926              terminates the context.  The SWIG parser should
16927              ignore all of the locator comments as should
16928              the C compiler (should such comments end up
16929              in generated wrapper code).
16930
16931 7/18/2001: mkoeppe
16932            * The parser now handles severely constified types in
16933            typemaps.  This introduced a new shift/reduce conflict, but
16934            only with a heuristic function-pointer catch-all rule.  
16935            * [Guile]: Added typemaps for severely constified types. 
16936            * Fixed the "template-whitespace" problem by canonicalizing
16937              whitespace, especially around angle brackets and commas. 
16938
16939 7/17/2001: mkoeppe
16940            * [Guile]: A Scheme file is emitted if the -scmstub FILE.SCM
16941            command-line option is used.  The %scheme directive
16942            (implemented as a macro for a pragma) allows to insert
16943            arbitrary code here.  In "simple" and "passive" linkage,
16944            the file gets filled with define-module and export
16945            declarations.
16946
16947 7/17/2001: cheetah (william fulton)
16948            * Parser bug fix to support constant pointers, eg int* const ptr.
16949            Fixed everywhere - variables, parameters, return types etc. Note that
16950            when wrapping a constant pointer variable only the getter is generated.
16951
16952 7/17/2001: mkoeppe
16953            * Fixed SF bug #441470 (#define X "//" would not be parsed,
16954              see test-suite entry "preproc-1"), reported by T. W. Burton
16955              <twburton@users.sf.net>.
16956            * Changed the type of character constants to "char", rather
16957              than "char *".  Changed the individual language modules
16958              to keep the old behaviour, except for the Guile module,
16959              where it is desired to make them Scheme characters.  This
16960              fixes SF bug #231409, test-suite entry "char-constant".
16961            * Applied patch for DOH/Doh/memory.c by Les Schaffer
16962              <schaffer@optonline.net> (avoid required side effects in
16963              assert). 
16964
16965 7/17/2001: cheetah (william fulton)
16966            * Bug fix in parser for virtual destructor with void as parameter
16967            * Bug fix in parser #defines embedded within classes/structs/unions
16968            Consequently %constant can now also be placed within a struct/class/union.
16969            * Bug fix in parser to allow sizeof(*I_am_a_pointer) within a #define
16970
16971 7/16/2001: mkoeppe
16972            * Added changes for the Macintosh contributed by Luigi
16973            Ballabio <ballabio@mac.com>. 
16974            * Some "const" fixes in the code.
16975            * [Guile]: Made the constant-wrapper functions much shorter.
16976
16977 7/13/2001: mkoeppe
16978            * [Guile]: Some "const" fixes for Guile version 1.3.4.
16979            * Handle anonymous arguments with default values and static
16980              array members of classes.  Both bugs reported by Annalisa Terracina
16981              <annalisa.terracina@datamat.it>; see the files
16982              Examples/guile/test-suite/static-array-member.i and
16983              anonymous-arg.i.
16984
16985 Version 1.3.6  (July 9, 2001)
16986 =============================
16987
16988 7/09/2001: cheetah (william fulton)
16989            * GIFPlot examples: FOREGROUND and BACKGROUND definition missing 
16990            after TRANSPARENT #define fix in GIFPlot
16991
16992 7/03/2001: beazley
16993            Fixed up the version numbers so that the release is known
16994            as 1.3.6.  All future releases should have a similar
16995            version format.
16996
16997 7/02/2001: mkoeppe
16998            * [Python]: Prevent the problem of self.thisown not being
16999            defined if the C++ class constructor raised an exception.
17000            Thanks to Luigi Ballabio <ballabio@mac.com>.
17001
17002 6/29/2001: mkoeppe
17003            * More portability fixes; fixed "gcc -Wall" warnings.
17004
17005 6/29/2001: cheetah (william fulton)
17006            * GIFPlot examples: TRANSPARENT #define multiple times on Solaris 
17007            (clashes with stream.h).
17008            * Multiple definition bug fix for shadow classes. The perl and python 
17009            modules had workarounds which have been replaced with fixes in 
17010            the core. Many of the Language::cpp_xxxx functions now set a 
17011            flag which the derived classes can access through 
17012            is_multiple_definition() to see whether or not code should be 
17013            generated.  The code below would have produced varying degrees 
17014            of incorrect shadow class code for the various modules:
17015            class TestClass
17016            {
17017            public:
17018              TestClass() {};
17019              TestClass(int a) {};
17020              ~TestClass() {};
17021              unsigned long xyz(short k) {};
17022              unsigned long xyz(int n) {};
17023              static void static_func() {};
17024              static void static_func(int a) {};
17025            };
17026            void delete_TestClass(int a);
17027
17028 6/27/2001: mkoeppe
17029            * [Perl] Another const-related portability fix.
17030
17031 6/26/2001: cheetah (william fulton)
17032            * [Java] Added in cpp_pragma() support with a host of new pragmas - see 
17033            jswig.html. These are designed for better mixing of Java and c++. It 
17034            enables the user to specify pure Java classes as bases and/or interfaces 
17035            for the wrapped c/c++.
17036            * [Java] Old pragmas renamed. Warning given for the moment if used.
17037           *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
17038
17039 6/25/2001: mkoeppe
17040            * Incorporated more build changes contributed by Wyss Clemens
17041            <WYS@helbling.ch> for swig/ruby on cygwin.
17042
17043 6/20/2001: cheetah (william fulton)
17044            * Makefile mods so that 'make check' uses the swig options in the makefiles
17045            * [Java] Removed Generating wrappers message
17046            * [Java] NULL pointer bug fix
17047            * [Java] Bug fix for Kaffe JVM
17048
17049 6/20/2001: mkoeppe
17050            * SWIG_TypeQuery from common.swg now returns a
17051            swig_type_info* rather than a void*.  This fixes a problem
17052            when using pointer.i and C++, as illustrated by the new
17053            test-suite example perl5/pointer-cxx.
17054            * Portability fixes (const char *). 
17055            * Incorporated build changes contributed by Wyss Clemens
17056            <WYS@helbling.ch>, which make swig runnable on cygwin.
17057
17058 6/19/2001: cheetah (william fulton)
17059            * [Java] Bug fix for SF bug #211144. This fix is a workaround 
17060              until fixed in the core.
17061
17062 6/19/2001: mkoeppe
17063            * [Guile]: Portability fixes for use with the Sun Forte
17064            compilers. 
17065            * [Tcl]: Portability fix (const char *).
17066            * [Tcl]: Configure now first tries to find a tclConfig.sh
17067            file in order to find the Tcl include directory, library
17068            location and library name.
17069            * [Python]: Added a few possible library locations.
17070
17071 6/18/2001: mkoeppe
17072            * [Guile]: Don't call scm_c_export if nothing is to be
17073              exported.  Don't warn on %module if module has been set
17074              already (this frequently occurs when %import is used).
17075
17076 6/16/2001: mkoeppe
17077            * [Guile]: New "passive" linkage, which is appropriate for
17078              multi-module extensions without Guile module magic.
17079
17080 6/15/2001: mkoeppe
17081            * [Guile]: Fixed printing of smobs (space and angle were
17082              missing). 
17083            * Properly generate type information for base classes
17084              imported with the %import directive.  Thanks to Marcelo
17085              Matus <mmatus@acms.arizona.edu> for the report and the
17086              patch; this closes SF bug #231619; see also
17087              Examples/guile/test-suite/import*. 
17088            * [Guile]: Fix casting between class and base class; the
17089              runtime type system had it the wrong way around; see
17090              Examples/guile/test-suite/casts.i
17091            * Make typemaps for SWIGPOINTER * with arg name take
17092              precedence over those without arg name, to match normal
17093              typemap precedence rules.
17094            * Fixed the random-line-numbers problem reported as SF bug
17095              #217310; thanks to Michael Scharf <scharf@users.sf.net>.
17096            * [Guile]: Handle the %name and %rename directives.
17097            * New syntax: %name and %rename now optionally take double
17098              quotes around the scripting name.  This is to allow scripting
17099              names that aren't valid C identifiers.
17100
17101 6/14/2001: beazley
17102            Made a minor change to the way files are loaded in
17103            order to get file/line number reporting correct in
17104            the preprocessor.
17105
17106 6/14/2001: mkoeppe
17107            * The parser now understands the (non-standard) "long long"
17108              types. It is up to the individual language modules to
17109              provide typemaps if needed. Reported by Sam Steingold, SF
17110              bug #429176.
17111            * The parser now understands arguments like "const int *
17112              const i". This fixes SF bug #215649.
17113            * Fixed the Guile test-suite.
17114
17115 6/13/2001: mkoeppe
17116            Partial merge from the CVS trunk at tag
17117            "mkoeppe-merge-1". This covers the following changes:
17118
17119 | 01/16/01: ttn
17120 |          Wrote table of contents for Doc/engineering.html.  Added section
17121 |          on CVS tagging conventions.  Added copyright to other docs.
17122 | 9/25/00 : beazley
17123 |          Modified the preprocessor so that macro names can start with a '%'.
17124 |          This may allow new SWIG "directives" to be defined as macros instead
17125 |          of having to be hard-coded into the parser.  
17126 |
17127 | *** Also a yet-to-be-documented quoting mechanism with backquotes
17128 | *** has been implemented?
17129
17130 6/13/2001: mkoeppe
17131          * When configure does not find a language, don't use default
17132            paths like /usr/local/include; this only causes build
17133            problems.
17134          * New directory: Examples/Guile/test-suite, where a few
17135            bugs in 1.3a5 are demonstrated. 
17136          * Handle C++ methods that have both a "const" and a "throw"
17137            directive (see Examples/Guile/test-suite/cplusplus-throw.i); 
17138            thanks to Scott B. Drummonds for the report and the fix. 
17139          * Handle C++ pointer-reference arguments (like "int *& arg") 
17140            (see Examples/Guile/test-suite/pointer-reference.i,
17141            reported as SF bug #432224).
17142          * [Ruby] Fixed typo in rubydec.swg; thanks to Lyle Johnson!
17143          * Don't stop testing when one test fails.
17144          * [Guile, MzScheme] Don't print "Generating wrappers...".
17145
17146 6/12/2001: mkoeppe
17147            [Guile] VECTORLENINPUT and LISTLENINPUT now have separate
17148            list length variables. TYPEMAP_POINTER_INPUT_OUTPUT
17149            attaches argument documentation involving SCM_TYPE to the
17150            standard pointer typemaps. INOUT is now an alias for BOTH.
17151
17152 6/12/2001: cheetah (william fulton)
17153            Some Java documentation added.
17154            [Java] Fixed bugs in import pragma and shadow pragma. 
17155
17156 6/12/2001: mkoeppe
17157            Fix declarations of SWIG_define_class
17158            (Lib/ruby/rubydec.swg) and SWIG_TypeQuery
17159            (Lib/common.swg). Thanks to Lyle Johnson
17160            <ljohnson@resgen.com> for the patches.
17161
17162 6/11/2001: mkoeppe
17163            [Guile] Use long instead of scm_bits_t; this makes the
17164            generated wrapper code compatible with Guile 1.3.4
17165            again. Thanks to Masaki Fukushima for pointing this out.
17166
17167 6/11/2001: cheetah (william fulton)
17168            The generic INSTALL file from autoconf added. Few changes to README file.
17169
17170 6/11/2001: mkoeppe
17171            Fixed typo in Makefile.in; thanks to Greg Troxel
17172            <gdt@ir.bbn.com>. 
17173
17174 6/08/2001: cheetah (william fulton)
17175            make check works again. Examples/GIFPlot configure generated by
17176            top level autoconf now.
17177
17178 6/08/2001: mkoeppe
17179            Another build change: The new script autogen.sh runs
17180            autoconf in the appropriate directories.  The top-level
17181            configure also configures in Examples/GIFPlot.
17182
17183 6/07/2001: mkoeppe
17184            Made the Makefile work with non-GNU make again.
17185
17186 6/07/2001: cheetah (william fulton)
17187            [Java] Class/struct members that are arrays of pointers to classes/structs -
17188            Shadow class's get/set accessors now use Java classes instead of longs (pointers).
17189            [Java] Shadow classes will now clean up memory if function return type 
17190            is a class/struct.
17191            [Java] New example called reference based on the same example from other modules.
17192
17193 6/06/2001: mkoeppe
17194            New configure option --with-release-suffix allows for
17195            attaching a suffix to the swig binary and the swig runtime
17196            libraries.  Minor changes to the build system.  "swig
17197            -swiglib" works again.  If invoked with the new option
17198            "-ldflags", SWIG prints a line of linker flags needed to
17199            link with the runtime library of the selected language
17200            module. 
17201
17202 6/06/2001: mkoeppe
17203            [Guile] gswig_list_p is an int, not a SCM.  This typo
17204            caused warnings when compiling with a Guile configured with
17205            strict C type checking. In INPUT and BOTH typemaps
17206            generated by the SIMPLE_MAP macro, use the SCM_TO_C
17207            function to convert from Guile to C (rather than C_TO_SCM).
17208            Use scm_intprint to print pointers (rather than
17209            sprintf). Allow using "-linkage" instead of "-Linkage". 
17210
17211 6/05/2001: cheetah (william fulton)
17212            [Java] Mods for using inherited c++ classes from Java
17213            [Java] New example called class based on the same example from other modules
17214
17215 6/05/2001: cheetah (william fulton)
17216            [Java] destructor (_delete()) was not aware of %name renaming
17217            [Java] extends baseclass did not know about %name renaming
17218            [Java] extends baseclass did extend even when the baseclass was not known to swig
17219            [Java] sometimes enum-declarations occured before the Java class declaration
17220            [Java] unrelated enum initialisations no longer appear in Java class
17221            [Java] if module ends in '_' correct JNI names are now produced
17222
17223 6/04/2001: cheetah (william fulton)
17224            [Java] Shadow class mods - Modified constructor replaces
17225            newInstance(). _delete() now thread safe. getCPtr() replaces
17226            _self. _selfClass() removed as now redundant. 
17227           *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
17228
17229            [Java] Not all output java files had SWIG banner. New banner.
17230
17231            [Java] Shadow class finalizers are output by default: Command
17232            line option -finalize deprecated and replaced with -nofinalize.
17233           *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE ***
17234
17235 6/ 1/2001: mkoeppe
17236            [Guile] Cast SCM_CAR() to scm_bits_t before shifting it.
17237            This is required for compiling with a Guile configured with
17238            strict C type checking.  
17239
17240 6/ 1/2001: mkoeppe
17241            Added configure option "--with-swiglibdir".
17242
17243 5/31/2001: mkoeppe
17244            [Guile] Support multiple parallel lists or vectors in
17245            the typemaps provided by list-vector.i.  New typemaps file,
17246            pointer-in-out.i. 
17247
17248 5/25/2001: cheetah (william fulton)
17249            [Java] HTML update for examples.
17250
17251 5/28/2001: mkoeppe
17252            Minor changes to the build system.  Added subdirectory for
17253            Debian package control files.
17254
17255 5/28/2001: mkoeppe
17256            [Guile] Build a runtime library, libswigguile.
17257
17258 5/28/2001: mkoeppe
17259            [Guile] New typemap substitution $*descriptor.  Use the {}
17260            syntax, rather than the "" syntax for the standard
17261            typemaps, in order to work around strange macro-expansion
17262            behavior of the SWIG preprocessor.  This introduces some
17263            extra braces.
17264
17265 5/27/2001: mkoeppe
17266            [Guile] Handle pointer types with typemaps, rather than
17267            hard-coded. New typemap substitutions $descriptor,
17268            $basedescriptor; see documentation. Some clean-up in the
17269            variable/constants wrapper generator code.  New convenience
17270            macro SWIG_Guile_MustGetPtr, which allows getting pointers
17271            from smobs in a functional style.  New typemap file
17272            "list-vector.i", providing macros that define typemaps for
17273            converting between C arrays and Scheme lists and vectors.
17274
17275 5/25/2001: cheetah (william fulton)
17276            [Java] STL string moved into its own typemap as it is c++ code and 
17277            it break any c code using the typemaps.i file.
17278            - Fixes for wrappers around global variables - applies to primitive 
17279            types and user types (class/struct) and pointers to these.
17280            - Structure member variables and class public member variables getters 
17281            and setters pass a pointer to the member as was in 1.3a3 and 1.1 
17282            (1.3a5 was passing by value)
17283            - Parameters that were arrays and return types were incorrectly 
17284            being passed to create_function() as pointers.
17285            - Fix for arrays of enums. 
17286            [Java] Updated java examples and added two more.
17287            [Java] Java module updated from SWIG1.3a3 including code cleanup etc.
17288            [Java] enum support added.
17289            [Java] Array support implemented
17290            [Java] Shadow classes improved - Java objects used rather than 
17291            longs holding the c pointer to the wrapped structure/c++class
17292
17293 5/22/2001: mkoeppe
17294            [Guile] Fixed extern "C" declarations in C++ mode. Thanks
17295            to Greg Troxel <gdt@ir.bbn.com>.
17296
17297 5/21/2001: mkoeppe
17298            [Guile] New linkage "module" for creating Guile modules for
17299            Guile versions >= 1.5.0. 
17300
17301 4/18/2001: mkoeppe
17302            [MzScheme] Added typemaps for passing through Scheme_Object
17303            pointers. 
17304
17305 4/9/2001 : mkoeppe 
17306            [MzScheme] Added typemaps for `bool'.  Inclusion of headers
17307            and support routines is now data-driven via mzscheme.i.
17308            Headers come from the new file mzschemdec.swg.  Don't abort
17309            immediately when a type-handling error is reported.  When
17310            searching for typemaps for enums, fall back to using int,
17311            like the Guile backend does.  Support char constants.  Emit
17312            correct wrapper code for variables.
17313
17314 3/12/2001: mkoeppe
17315            [Guile] Fixed typemaps for char **OUTPUT, char **BOTH.
17316
17317 3/2/2001 : mkoeppe 
17318            [Guile] Every wrapper function now gets a boolean variable
17319            gswig_list_p which indicates whether multiple values are
17320            present. The macros GUILE_APPEND_RESULT, GUILE_MAYBE_VALUES
17321            and GUILE_MAYBE_VECTOR use this variable, rather than
17322            checking whether the current return value is a list. This
17323            allows for typemaps returning a list as a single value (a
17324            list was erroneously converted into a vector or a
17325            multiple-value object in this case).
17326
17327 3/1/2001 : mkoeppe
17328            [Guile] Added support for returning multiple values as
17329            vectors, or passing them to a muliple-value
17330            continuation. By default, multiple values still get
17331            returned as a list.
17332
17333 3/1/2001 : mkoeppe
17334            [Guile] Added a "beforereturn" pragma. The value of this
17335            pragma is inserted just before every return statement.
17336
17337 3/1/2001 : mkoeppe
17338            [Guile] Added support for Guile 1.4.1 procedure
17339            documentation formats, see internals.html.
17340
17341 2/26/2001: mkoeppe
17342            [Guile] Made the wrapper code compile with C++ if the
17343            "-c++" command-line switch is given.  Thanks to
17344            <monkeyiq@dingoblue.net.au>. 
17345
17346 2/26/2001: mkoeppe
17347            [Guile] Now two type tables, swig_types and
17348            swig_types_initial, are used, as all other SWIG language
17349            modules do.  This removes the need for the tricky
17350            construction used before that the broken Redhat 7.0 gcc
17351            doesn't parse. Reported by <monkeyiq@dingoblue.net.au>. 
17352
17353 2/26/2001: mkoeppe
17354            [Guile] Fixed typemaps for char *OUTPUT, char *BOTH; a bad
17355            free() would be emitted.  Added typemap for SCM.
17356
17357
17358 Version 1.3 Alpha 5 
17359 ===================
17360
17361 9/19/00 : beazley
17362           [Python] Python module generates more efficient code for
17363           creating the return value of a wrapper function. Modification
17364           suggested by Jon Travis.
17365
17366 9/19/00 : beazley
17367           Library files specified with the -l option are now included at the
17368           end of the interface file (reverting to the old behavior).
17369
17370 9/19/00 : beazley
17371           Fixed some problems with enum handling.  enums are now manipulated as
17372           'int', but cast into the enum type when values are passed to the 
17373           corresponding C function.
17374
17375 9/19/00 : mkoeppe
17376           [Guile] Removed "-with-smobs" command-line option, as this is the
17377           default now.  Added "-emit-setters" command-line option,
17378           which turns on generating procedures-with-setters; see
17379           internals.html.
17380
17381 9/18/00 : mkoeppe
17382           Incorporated patch #101430, fixing bugs in the Guile module: 
17383           1. Some arguments were erroneously taken as *optional* arguments when
17384              ignored arguments were present. 
17385           2. Guile 1.3.4 was not supported since functions introduced in Guile
17386               1.4 were used.      
17387           3. Added handling of `const char *'.
17388
17389 9/17/00 : beazley
17390           Fixed problem with failed assertion and large files.
17391
17392 9/17/00 : beazley
17393           Fixed problem with the '%' character appearing in added methods
17394           and function bodies.  Preprocessor bug.
17395
17396 Version 1.3 Alpha 4 (September 4, 2000)
17397 =======================================
17398
17399 9/3/00  : ttn
17400           Added instructions for maintainers in Examples/README on how
17401           to make examples also be useful in the testing framework.
17402           Also, "make check" now uses ./Lib by via env var `SWIG_LIB'.
17403           This is overridable like so:
17404              make chk-swiglib=/my/experimental/swig/Lib check
17405
17406 9/3/00  : beazley
17407           Added $typemap variable to typemaps.  This gets replaced with
17408           a string indicating the typemap that is applied.  Feature
17409           request from rsalz.
17410
17411 9/3/00  : beazley
17412           Experimental optimization to code generation for virtual
17413           member functions.  If you have two classes like this:
17414
17415                  class A() {
17416                    virtual void foo();
17417                  }
17418
17419                  class B() : public A {
17420                    virtual void foo();
17421                  }
17422
17423           Swig now will generate a single wrapper function for this
17424
17425                 A_foo(A *a) {
17426                     a->foo();
17427                 }
17428
17429           and use it as the implementation of both A_foo() and B_foo().
17430           This optimization only takes place if both methods are declared
17431           as virtual and both take identical parameters.
17432           *** EXPERIMENTAL FEATURE ***
17433
17434 9/3/00  : beazley
17435           Restored the "memberin" typemap for setting structure members.
17436           Unlike the old version, the new version is expanded inline in the
17437           wrapper function allowing access to scripting language
17438           internals (a sometimes requested feature). The "memberout" typemap
17439           is gone. Use the "out" typemaps instead.
17440           *** POTENTIAL INCOMPATIBILITY ***
17441
17442 9/3/00  : beazley
17443           Attribute set methods no longer return the value of a member.
17444           For example:
17445
17446                struct Foo {
17447                     int x;
17448                     ...
17449                }
17450
17451           now gets set as follows:
17452
17453               void Foo_x_set(Foo *f, int x) {
17454                     f->x = x;
17455               }
17456
17457           In SWIG1.1 it used to be this:
17458
17459               int Foo_x_set(Foo *f, int x) {
17460                    return (f->x = x);
17461               }
17462
17463           This has been changed due to the complexity created by trying
17464           to do this with more exotic datatypes such as arrays.  It also
17465           complicates inlining and handling of the "memberin" typemap.
17466           *** POTENTIAL INCOMPATIBILITY ***
17467
17468 9/2/00  : beazley
17469           Removed the ptrcast() and ptrmap() functions from the
17470           pointer.i library file.  Old implementation is incompatible
17471           with new type system.
17472           *** POTENTIAL INCOMPATIBILITY ***
17473
17474 9/2/00  : beazley
17475           New runtime function SWIG_TypeQuery(const char *name) added.
17476           This function can be used to extract the type info structure
17477           that is used for type-checking.  It works with either the
17478           nice C name or mangled version of a datatype.  For example:
17479
17480               swig_type_info *ty = Swig_TypeQuery("int *");
17481               swig_type_info *ty = Swig_TypeQuery("_p_int");
17482
17483           This is an advanced feature that has been added to support some
17484           exotic extension modules that need to directly manipulate
17485           scripting language objects.
17486           *** NEW FEATURE ***
17487
17488 9/2/00  : beazley
17489           New directive %types() added.  This is used to
17490           explicitly list datatypes that should be included in
17491           the runtime type-checking code. Normally it is never
17492           necessary to use this but sometimes advanced extensions
17493           (such as the pointer.i library) may need to manually
17494           add types to the type-checker.
17495           *** NEW FEATURE ***
17496
17497 8/31/00 : beazley
17498           Improved handling of string array variables. For example,
17499           a global variable of the form "char name[64]" is automatically
17500           managed as a 64 character string.  Previously this didn't
17501           work at all or required the use of a special typemap.
17502           *** NEW FEATURE (Tcl, Perl, Python) ***
17503
17504 8/31/00 : ttn
17505           Added Makefile target `check-c++-examples', which uses new
17506           files under Examples/C++ contributed by Tal Shalif.  Now "make
17507           check" also does "make check-c++-examples".  Also, expanded
17508           actions in `check-gifplot-example' and `check-aliveness'.
17509
17510 8/30/00 : mkoeppe
17511           Major clean-up in the Guile module. Added typemap-driven
17512           documentation system. Changed to handle more than 10
17513           args. Updated and extended examples.
17514           *** NEW FEATURE ***
17515
17516 8/29/00 : beazley
17517           Added new %insert directive that inserts the contents of a file
17518           into a portion of the output wrapper file.  This is only intended
17519           for use by writers of language modules.  Works as follows:
17520
17521                %insert(headers)  "file.swg";
17522                %insert(runtime)  "file.swg";
17523                %insert(wrappers) "file.swg";
17524                %insert(init)     "file.swg";
17525
17526           *** NEW FEATURE ***
17527
17528 8/29/00 : beazley
17529           Added new %runtime directive which includes code into the runtime
17530           portion of the wrapper code. For example:
17531
17532               %runtime %{
17533                     ... some internal runtime code ...
17534               %}
17535
17536           There is no practical reason for ordinary users to use this
17537           feature (almost everything can be done using %{ ... %}
17538           instead).   However, writers of language modules may want to
17539           use this in language configuration files.
17540           *** NEW FEATURE ***
17541
17542 8/28/00 : beazley
17543           Typemaps can now be specified using string literals like
17544           this:
17545
17546               %typemap(in) int "$target = SvIV($source);";
17547
17548           When code is specified like this, it is *NOT* enclosed
17549           inside a local scope (as with older typemap declarations).
17550           Note: character escape sequences are interpreted in the
17551           code string so if you want to include a quote or some
17552           other special character, make sure you use a (\).
17553           *** NEW FEATURE ***
17554
17555 8/27/00 : beazley
17556           Typemaps have been modified to follow typedef declarations.
17557           For example, if you have this:
17558
17559               typedef int Number;
17560
17561               %typemap(in) int {
17562                       ... get an integer ...
17563               }
17564
17565               void foo(Number a);
17566
17567           The typemap for 'int' will be applied to the argument 'Number a'.
17568           Of course, if you specify a typemap for 'Number' it will take
17569           precedence (nor will it ever be applied to an 'int').
17570           *** POTENTIAL INCOMPATIBILITY ***
17571
17572 8/27/00 : beazley
17573           Default typemap specification has changed.   In older
17574           versions of swig, you could do this:
17575
17576                %typemap(in) int SWIG_DEFAULT_TYPE {
17577                    ...
17578                }
17579
17580           To specify the default handling of a datatype.   Now that
17581           SWIG follows typedef declarations, this is unnecessary.
17582           Simply specifying a typemap for 'int' will work for all
17583           variations of integers that are typedef'd to 'int'.
17584
17585           Caveat, specifying the default behavior for pointers,
17586           references, arrays, and user defined types is a little
17587           different.  This must be done as follows:
17588
17589                %typemap() SWIGPOINTER * {
17590                       ... a pointer ...
17591                }
17592                %typemap() SWIGREFERENCE & {
17593                       ... a reference ...
17594                }
17595                %typemap() SWIGARRAY [] {
17596                       ... an array ...
17597                }
17598                %typemap() SWIGTYPE {
17599                       ... a user-defined type (by value) ...
17600                }
17601           *** POTENTIAL INCOMPATIBILITY ***
17602
17603 8/15/00 : dustin
17604           The file swig-1.3a1-1.spec has been added to the Tools directory.
17605           It can be used to build a redhat package for SWIG, although it
17606           will need to be updated for the next public release.
17607
17608 8/15/00 : beazley
17609           Typemaps have been completely rewritten.  Eventually they may be
17610           replaced with something better, but for now they stay.  However,
17611           there are a number of a significant changes that may trip some
17612           people up:
17613
17614           1.  Typemap scoping is currently broken.  Because of this, the
17615               following code won't work.
17616
17617               %typemap(in) blah * {
17618                    ...
17619               }
17620               class Foo {
17621                    ...
17622                    int bar(blah *x);
17623               }
17624               %typemap(in) blah *;   /* Clear typemap */
17625
17626               (this breaks because the code for the class Foo is actually
17627               generated after the entire interface file has been processed).
17628               This is only a temporary bug.
17629
17630           2.  In SWIG1.1, the %apply directive worked by performing a
17631               very complex type-aliasing procedure.  From this point on,
17632               %apply is simply a generalized typemap copy operation.
17633               For example,
17634
17635                   %apply double *OUTPUT { double *x, double *y };
17636
17637               Copies *ALL* currently defined typemaps for 'double *OUTPUT' and
17638               copies them to 'double *x' and 'double *y'.
17639
17640               Most people probably won't even notice this change in
17641               %apply.  However, where it will break things is in code like
17642               this:
17643
17644                   %apply double *OUTPUT { double *x };
17645                   %typemap(in) double *OUTPUT {
17646                        ... whatever ...
17647                   }
17648
17649                   void foo(double *x);
17650
17651               In SWIG1.1, you will find that 'foo' uses the 'double *OUTPUT' rule
17652               even though it was defined after the %apply directive (this is
17653               the weird aliasing scheme at work).  In SWIG1.3 and later,
17654               the 'double *OUTPUT' rule is ignored because it is defined
17655               after the %apply directive.
17656
17657           3.  The %clear directive has been modified to erase all currently
17658               defined typemaps for a particular type.  This differs from
17659               SWIG1.1 where %clear only removed rules that were added using
17660               the %apply directive.
17661
17662           4.  Typemap matching is now performed using *exact* types.
17663               This means that things like this
17664
17665                    %typemap(in) char * { }
17666                    %typemap(in) const char * { }
17667
17668               are different typemaps.    A similar rule applies for pointers,
17669               arrays, and references.  For example:
17670
17671                    %typemap(in) double * { }
17672
17673               used to apply to 'double &', 'double []',  Now, it only applies
17674               to 'double *'.  If you want a 'double &', you'll need to handle
17675               that separately.
17676
17677           5.  Array matching has been simplfied.  In SWIG1.1, array matching
17678               was performed by trying various combinations of dimensions.
17679               For example, 'double a[10][20]' was matched as follows:
17680
17681                    double [10][20]
17682                    double [ANY][20]
17683                    double [10][ANY]
17684                    double [ANY][ANY]
17685
17686               In SWIG1.3, only the following matches are attempted:
17687
17688                    double [10][20]
17689                    double [ANY][ANY]
17690
17691           On the positive side, typemap matching is now *significantly* faster
17692           than before.
17693           *** POTENTIAL INCOMPATIBILITY ***
17694
17695 8/15/00 : beazley
17696           Secret developer feature.  Since datatypes are now represented as 
17697           strings internally, you can bypass limitations of the parser and
17698           create a wild datatype by simply enclosing the raw string encoding
17699           in backticks (``) and sticking it in the interface file anywhere a
17700           type is expected.  For example, `a(20).a(10).p.f(int,int)`.  This 
17701           feature is only intended for testing (i.e., you want to see what
17702           happens to your language module if it gets a reference to a pointer
17703           to an array of pointers to functions or something). 
17704           *** SICK HACK ***
17705
17706 8/14/00 : beazley
17707           Completely new type-system added to the implementation.
17708           More details later.
17709
17710 8/11/00 : beazley
17711           Cleaned up some of the I/O handling.  SWIG no longer generates
17712           any temporary files such as _wrap.wrap, _wrap.ii, _wrap.init.
17713           Instead, these "files" are kept around in memory as strings
17714           (although this is transparent to language modules).
17715
17716 8/4/00  : ttn
17717           Added Makefile target "check" and variants.
17718           This can be used like "make check" or, to explicitly skip a
17719           language LANG: "make skip-LANG=true check".  LANG is skipped
17720           automatically if ./configure determines that LANG support is
17721           insufficient.
17722
17723           Currently, the check is limited to doing the equivalent of
17724           "make all" in some of the Examples directories.  This should
17725           be expanded both horizontally (different types of tests) and
17726           vertically (after "make all" in an Examples subdir succeeds,
17727           do some additional tests with the resulting interpreter, etc).
17728
17729 8/4/00  : ttn
17730           Added Makefile target "distclean", which deletes all the
17731           files ./configure creates, including config.status and friends.
17732
17733 8/3/00  : harcoh
17734           java changes??? [todo: document changes]
17735
17736 7/23/00 : beazley
17737           Typemaps have been modified to key off of the real datatypes
17738           used in the interface file.  This means that typemaps for
17739           "const char *" and "char *" will be difference as will typemaps
17740           for "Vector" and "Vector *."
17741           *** POTENTIAL INCOMPATIBILITY ***
17742           This is likely to break interfaces that rely on the odd type
17743           handling behavior of typemaps in SWIG1.1--especially with
17744           respect to interfaces involving pass-by-value.
17745
17746 7/23/00 : beazley
17747           New %constant directive.  This directive can be used to
17748           create true constants in the target scripting language.
17749           It's most simple form is something like this:
17750
17751              %constant FOO 42;
17752
17753           In this case, the type is inferred from the syntax of the
17754           value (in reality, all #define macros are translated into
17755           directives of this form).
17756
17757           An expanded version is as follows:
17758
17759             %constant(Foo *) FOO = &FooObj;
17760
17761           In this case, an explicit type can be specified.  This
17762           latter form may be useful for creating constants that
17763           used to be specified as
17764
17765              const Foo *FOO = &FooObj;
17766
17767           (which are now treated as variables).
17768           *** EXPERIMENTAL FEATURE *** The syntax may change in
17769           the final release.
17770
17771 7/23/00 : beazley
17772           Modified the parser so that variable declarations of the form
17773           "const type *a" are handled as variables, not constants.
17774           Note: SWIG1.1 handled this case erroneously because
17775           const char *a is a pointer variable that can be reassigned.
17776           *** POTENTIAL INCOMPATIBILITY ***
17777           Note: just because this is the "right" way to do things,
17778           doesn't mean it's the most appropriate interpretation.
17779           I suspect that many C programmers might use 'const char *'
17780           with the intent of creating a constant, without realizing
17781           that they've created a reassignable global variable.
17782
17783 7/23/00 : beazley
17784           The C/C++ wrapping layer has been completely redesigned and
17785           reimplemented.  This change should iron out a few rough
17786           spots with the handling of datatypes.  In addition, the
17787           wrapper code is somewhat cleaner.
17788           *** POTENTIAL INCOMPATIBILITY ***
17789           This change may break interfaces that involve
17790           subtle corner-cases with typemaps and the %addmethods
17791           directive since some of these features had somewhat
17792           type handling behavior in SWIG1.1.
17793
17794 7/23/00 : beazley
17795           The "memberin" and "memberout" typemaps are gone for the
17796           moment, but they might return as soon as I figure out
17797           how to integrate them with some of the streamlined C wrapper
17798           functions.
17799           *** POTENTIAL INCOMPATIBILITY ***
17800
17801 7/22/00 : beazley
17802           A variety of old type handling functions such as print_type(),
17803           print_full(), print_mangle(), etc... are gone and have been
17804           replaced with a smaller set of functions.  See the file
17805           Doc/internals.html for details.  This will break all third
17806           party language modules.
17807           *** POTENTIAL INCOMPATIBILITY ***
17808
17809 7/20/00 : beazley
17810           Deprecated the %val and %out directives.  These directives
17811           shouldn't really be necessary since typemaps can be used
17812           to achieve similar results.   This also cleans up the
17813           handling of types and parameters quite a bit.
17814           *** POTENTIAL INCOMPATIBILITY ***
17815
17816 7/20/00 : ttn
17817           Fixed unspecified-module bug in Guile support and removed
17818           more non-"with-smobs" functionality using patches submitted
17819           by Matthias Koeppe.
17820
17821           Re-enable recognition of "-with-smobs" (with no effect since
17822           we use smobs by default now) for the time being.  After the
17823           1.3a4 release, this option will signal an error.
17824
17825 7/17/00 : ttn
17826           Fixed NULL-input bug in parameter list handling.
17827           Reported by Matthias Koeppe.
17828
17829 7/12/00 : beazley
17830           Fixed memory leak in Python type-checking code. Reported by
17831           Keith Davidson.  Bug #109379.
17832
17833 7/10/00 : beazley
17834           Changed internal data structures related to function parameters.
17835
17836 7/10/00 : beazley
17837           Fixed some bugs related to the handling of the %name() directive
17838           and classes in the Tcl module. Problem reported by James Bailey.
17839
17840 7/10/00 : beazley
17841           Fixed parsing and enum handling problems with character constants.
17842           Reported by Greg Kochanski.
17843
17844 7/10/00 : beazley
17845           Removed WrapperFunction class from the core and updated the language
17846           module.  This will break third party modules.
17847           *** POTENTIAL INCOMPATIBILITY ***
17848
17849 7/9/00  : beazley
17850           Implementation of SWIG no longer makes use of C++ operator overloading.
17851           This will almost certainly break *all* third party language modules
17852           that are not part of the main SWIG CVS tree. Sorry.
17853           *** POTENTIAL INCOMPATIBILITY ***
17854
17855 7/8/00  : beazley
17856           Removed the experimental and undocumented "build" typemap that
17857           was intended to work with multiple arguments. Simply too weird
17858           to keep around.  Besides, a better replacement is in the works.
17859
17860 7/6/00  : ttn
17861           Removed non-"with-smobs" functionality (Guile support), i.e.,
17862           "-with-smobs" is now the default and no longer needs to be
17863           specified on the command-line.
17864
17865 7/5/00  : ttn
17866           Incorporated Ruby support contributed by Masaki Fukushima.
17867
17868 6/28/00 : ttn
17869           Applied more-than-10-args bugfix patch contributed
17870           by Matthias Koeppe.
17871
17872 6/27/00 : beazley
17873           Rewrote some of the string handling and eliminated the C++
17874           implementation (which is now just a wrapper).
17875
17876 6/27/00 : ttn
17877           Added Doc/index.html and Doc/internals.html.  The target
17878           audience for the latter is new SWIG developers.
17879
17880
17881 Version 1.3 Alpha 3 (June 18, 2000)
17882 ===================================
17883
17884 6/18/00 : beazley
17885           Removed the naming.cxx, hash.cxx, and symbol.cxx files from
17886           the SWIG1.1 directory.   Continued to migrate things away
17887           from the C++ base (although there's still a lot of work to do).
17888
17889 6/17/00 : beazley
17890           Added a few more examples to the Examples directory.  Still
17891           need to do a lot of work on this.
17892
17893 6/16/00 : beazley
17894           Added -includeall to follow all #include statements in the
17895           preprocessor.
17896
17897 6/15/00 : beazley
17898           Tried to fix as many C++ warnings as possible when compiling
17899           with the Sun Workshop C++ compiler.  Unfortunately, this means
17900           that there are a lot of statements that contain string literals
17901           of the form (char*)"Blah".
17902
17903 6/15/00:  beazley
17904           A variety of cleanup and performance optimization in the
17905           low-level DOH library.   This seems to result in a speedup
17906           of 50-100% for preprocessing and other related tasks.
17907
17908 5/10/00 : ttn
17909           Applied variable-wrapping bugfix patch contributed
17910           by Matthias Koeppe.
17911
17912 4/17/00 : ttn
17913           Updated MzScheme support contributed by Oleg Tolmatcev.
17914           We now use a `Scheme_Type'-based structure to wrap pointers.
17915
17916 4/11/00 : ttn
17917           Incorporated further Guile-support patch by Matthias Koeppe.
17918           Typemaps previously deleted have been re-added.  There is now
17919           exception handling (see Doc/engineering.html).  `SWIG_init' is now
17920           declared extern only for simple linkage.  Some bugs were fixed.
17921
17922 4/06/00 : ttn
17923           Incorporated MzScheme support contributed by Oleg Tolmatcev.
17924           This includes new directories Lib/mzscheme and Examples/mzscheme.
17925
17926 4/03/00 : ttn
17927           Added Examples/guile and children.  This is an adaptation of
17928           the same-named directory from the SWIG-1.1p5 distribution.
17929           Added Guile-specific section to Doc/engineering.html.
17930
17931 4/02/00 : ttn
17932           Incorporated new guilemain.i by Martin Froehlich.
17933           Incorporated Guile-support rewrite patch by Matthias Koeppe.
17934           The command line option "-with-smobs" enables implementation of
17935           pointer type handling using smobs, the canonical mechanism for
17936           defining new types in Guile.  Previous implementation (using
17937           strings) is at the moment still supported but deprecated.  At
17938           some point, "-with-smobs" will be the default and no longer
17939           required.
17940
17941 3/13/00 : beazley
17942           Added purify patches submitted by Ram Bhamidipaty.
17943
17944 3/02/00 : ttn
17945           Added support for different Guile "linkage" schemes.
17946           Currently, "-Linkage hobbit" works.
17947
17948
17949 Version 1.3 Alpha 2 (March 1, 2000)
17950 ===================================
17951
17952 2/29/00 : beazley
17953           Made SWIG ignore the 'mutable' keyword.
17954
17955 2/29/00 : beazley
17956           Incorporated some patches to the Perl5 module related to
17957           the -hide option and the destruction of objects.
17958           Patch submitted by Karl Forner.
17959
17960 2/27/00 : ttn
17961           Incorporated Guile support contributed by Matthias Koeppe.
17962           This includes a cpp macro in Lib/guile/guile.swg and the
17963           entire file Lib/guile/typemaps.i.
17964
17965 2/25/00 : ttn
17966           Modified configure.in and Makefile.in files to support
17967           non-local build (useful in multi-arch environments).
17968
17969 2/24/00 : ttn
17970           Incorporated Guile support contributed by Clark McGrew.
17971           This works with Guile 1.3, but since it depends heavily
17972           on the gh_ interface, it should work for all later versions.
17973           It has not been tested with versions before 1.3.
17974           WARNING: Code is unstable due to experimentation by ttn.
17975
17976 2/16/00 : beazley
17977           A variety of performance improvements to the Python shadow
17978           class code generation.  Many of these result in substantial
17979           runtime performance gains.  However, these have come at
17980           a cost of requiring the use of Python 1.5.2.  For older
17981           versions, use 'swig -noopt -python' to turn off these
17982           optimization features.
17983
17984 Version 1.3 Alpha 1 (February 11, 2000)
17985 =======================================
17986
17987 2/11/00 : Added 'void' to prototype of Python module initializer.
17988           Reported by Mark Howson (1/20/00).
17989
17990 2/11/00 : beazley
17991           Modified the Python shadow class code to discard ownership of an
17992           object whenever it is assigned to a member of another object.
17993           This problem has been around for awhile, but was most recently
17994           reported by Burkhard Kloss (12/30/99).
17995
17996 2/11/00 : beazley
17997           Added braces around macros in the exception.i library.  Reported
17998           by Buck Hodges (12/19/99)
17999
18000 2/11/00 : beazley
18001           Fixed bug in the constraints.i library. Reported by Buck
18002           Hodges (12/14/99)
18003
18004 2/11/00 : beazley
18005           The %native directive now generates Tcl8 object-style command calls.
18006           A full solution for Tcl7 and Tcl8 is still needed. Patch suggested
18007           by Mike Weiblen (11/29/99)
18008
18009 2/11/00 : beazley
18010           Modified the typemap code to include the $ndim variable for arrays.
18011           Patch provided by Michel Sanner (11/12/99).
18012
18013 2/11/00 : beazley
18014           Modified the Python module to raise a Runtime error if an attempt
18015           is made to set a read-only member of a shadow class.  Reported by
18016           Michel Sanner (11/5/99).
18017
18018 2/10/00 : The documentation system has been removed. However, it is likely
18019           to return at some point in the future.
18020
18021 2/1/00  : Added a number of performance enhancements to the Python shadow
18022           classing and type-checking code.  Contributed by Vadim Chugunov.
18023
18024           1. Remove _kwargs argument from the shadow wrappers when -keyword
18025              option is not specified. This saves us a construction of keyword
18026              dictionary on each method call.
18027
18028              def method1(self, *_args, **_kwargs):
18029                  val = apply(test2c.PyClass1_method1, (self,) + _args, _kwargs)
18030                  return val
18031
18032              becomes
18033
18034              def method1(self, *_args):
18035                  val = apply(test2c.PyClass1_method1, (self,) + _args)
18036                  return val
18037
18038           2. Incorporate self into the _args tuple.  This saves at least one tuple
18039              allocation per method call.
18040
18041              def method1(self, *_args):
18042                  val = apply(test2c.PyClass1_method1, (self,) + _args)
18043                  return val
18044
18045              becomes
18046
18047              def method1(*_args):
18048                  val = apply(test2c.PyClass1_method1, _args)
18049                  return val
18050
18051           3. Remove *Ptr classes.
18052              Assume that we are SWIGging a c++ class CppClass.
18053              Currently SWIG will generate both CppClassPtr class
18054              that hosts all methods and also CppClass that is derived
18055              from the former and contains just the constructor.
18056              When CppClass method is called, the interpreter will try
18057              to find it in the CppClass's dictionary first, and only then
18058              check the base class.
18059
18060              CppClassPtr functionality may be emulated with:
18061
18062              import new
18063              _new_instance = new.instance
18064              def CppClassPtr(this):
18065                   return _new_instance(CppClass, {"this":this,"thisown":0})
18066
18067              This saves us one dictionary lookup per call.
18068
18069              <DB>The new module was first added in Python-1.5.2 so it
18070              won't work with older versions.  I've implemented an
18071              alternative that achieves the same thing</DB>
18072
18073           4. Use CObjects instead of strings for pointers.
18074
18075           Dave: This enhancements result in speedups of up to 50% in some
18076           of the preliminary tests I ran.
18077
18078 2/1/00  : Upgraded the Python module to use a new type-checking scheme that
18079           is more memory efficient, provides better performance, and
18080           is less error prone. Unfortunately, it will break all code that
18081           depends on the SWIG_GetPtr() function call in typemaps.
18082           These functions should be changed as follows:
18083
18084                 if (SWIG_GetPtr(string,&ptr,"_Foo_p")) {
18085                     return NULL;
18086                 }
18087
18088           becomes
18089
18090                 if (SWIG_ConvertPtr(pyobj, &ptr, SWIG_TYPE_Foo_p) == -1) {
18091                     return NULL;
18092                 }
18093
18094           Note: In the new implementation SWIG_TYPE_Foo_p is no longer
18095           a type-signature string, but rather an index into a type
18096           encoding table that contains type information.
18097           *** POTENTIAL INCOMPATIBILITY ***
18098
18099 1/30/00 : loic
18100           Conditionaly compile experimental code with --enable-experiment
18101           configure flag.
18102           Fix .cvsignore to ignore configrue & yacc generated files
18103
18104 1/28/00 : loic
18105           Apply automake everywhere
18106           Keep configure scripts so that people are not *forced* to autoconf
18107           Keep sources generated by yacc so that compilation without yacc
18108           is possible.
18109           Source/LParse/cscanner.c: change lyacc.h into parser.h to please
18110           default yacc generation rules.
18111           Use AC_CONFIG_SUBDIRS in configure.in instead of hand made script.
18112           Update all relevant .cvsignore to include .deps
18113           Fixed missing ; line 136 Source/Swig/swig.h
18114
18115 1/13/00 : beazley
18116           Fixed a number of minor end-of-file parsing problems in the
18117           preprocessor.
18118
18119 1/13/00 : beazley
18120           Added -freeze option that forces SWIG to freeze upon exit.
18121           This is only used as a debugging tool so that I can more
18122           easily examine SWIG's memory footprint.
18123
18124 1/13/00 : beazley
18125           Added patch to guile module for supporting optional arguments
18126           Patch contributed by Dieter Baron.
18127
18128 1/13/00 : loic
18129           Added .cvsignore, Examples/.cvsignore, Source/DOH/Doh/.cvsignore
18130           Source/SWIG1.1/main.cxx: Fixed -I handling bug
18131           Source/Modules1.1/java.cxx: fixed char* -> const char* warnings that are
18132           errors when compiling with gcc-2.95.2
18133           Source/SWIG1.1/main.cxx: cast const char* to char* for String_replace
18134           token and rep should really be const.
18135
18136 1/12/00 : beazley
18137           Added Harco's Java modules.
18138
18139 1/12/00 : beazley
18140           Revoked the %ifdef, %ifndef, %endif, %if, %elif, and %else
18141           directives.  These are no longer needed as SWIG now has a real
18142           preprocessor.
18143           *** POTENTIAL INCOMPATIBILITY ***
18144
18145 1/12/00 : beazley
18146           Moved the documentation modules from the SWIG directory
18147           to the Modules directory (where they really should have been
18148           to begin with).
18149
18150 1/12/00 : beazley
18151           Removed the -stat option for printing statistics. The
18152           statistics reporting was inadequate and mostly broken
18153           anyway.
18154           *** POTENTIAL INCOMPATIBILITY ***
18155
18156 1/12/00 : beazley
18157           Removed the -t option for reading a typemap file.  More
18158           trouble than it's worth.  Just include typemaps at the top
18159           of the interface file.
18160           *** POTENTIAL INCOMPATIBILITY ***
18161
18162 1/12/00 : beazley
18163           Removed the %checkout directive.
18164           *** POTENTIAL INCOMPATIBILITY ***
18165
18166 1/12/00 : beazley
18167           Removed the -ci option for file checkin.   Too problematic
18168           to implement.  Probably better to just put your SWIG library
18169           under CVS instead.
18170           *** POTENTIAL INCOMPATIBILITY ***.
18171
18172 1/11/00 : beazley
18173           Deleted the LATEX module.  Sorry... Didn't know anyone
18174           who was using it.  Besides, I'm looking to simplify
18175           the documentation system.
18176           *** POTENTIAL INCOMPATIBILITY ***
18177
18178 1/11/00 : beazley
18179           Modified the ASCII documentation module to use a .txt
18180           suffix for its output file instead of .doc.
18181
18182 1/11/00 : beazley
18183           Added the long-lost SWIG preprocessor back to the system.
18184           It should be enabled by default.  Raw preprocessed output
18185           can be viewed using swig -E file.i.
18186           *** NEW FEATURE ***
18187
18188 1/11/00 : beazley and djmitche
18189           Completely reorganized the SWIG directory structure.  The
18190           basic organization is now:
18191
18192                 Source/         SWIG source code
18193                 Lib/            SWIG library files (swig_lib)
18194                 Doc/            Documentation
18195                 Examples/       Examples
18196
18197           More directories will be added as needed.
18198
18199 12/08/99: Loic Dachary (loic@senga.org)
18200           Enhanced package handling for perl5 and c++.
18201
18202           With new option -hide Foo::Bar, every perl5 object (Frob) is
18203           qualified by Foo::Bar::Frob. The package name is solely used
18204           to encapsulate C/C++ wrappers output in <module>_wrap.c and the
18205           corresponding perl package in <module>.pm. Note that a package
18206           name may contain :: (Frob::Nitz) and will be relative to the
18207           package name provided by -hide (Foo::Bar::Frob::Nitz).
18208
18209           In *_wrap.c, SWIG_init macro is used. Was previously defined
18210           but not used and simplifies code.
18211
18212           Added typemap(perl5,perl5in) and typemap(perl5,perl5out) that
18213           do the equivalent of typemap(perl5,in) and typemap(perl5,out)
18214           but contain perl code and applies to wrappers generated by
18215           -shadow.
18216
18217           Lacking proper regression tests I used
18218           Examples/perl5/{c++,constraint,defarg,except,
18219           graph/graph[1234],multinherit,nested,shadow,simple,tree,
18220           typemaps/{argv,argv2,arraymember,database,file,ignore,integer,
18221           output,passref,reference,return}}/. I ran swig with and without
18222           the patches, diff the generatedsources, run the .pl files
18223           and checked that the results are identical. In all those examples
18224           I had no error.
18225
18226 11/21/99: Modified the Tcl module to provide full variable linking capabilities
18227           to all datatypes.   In previous versions, a pair of accessor functions
18228           were created for datatypes incompatible with the Tcl_LinkVar() function.
18229           Now, we simply use variable traces to support everything. This may
18230           break scripts that rely upon the older behavior.
18231           *** POTENTIAL INCOMPATIBILITY ***
18232
18233 11/21/99: Added slight tweak to wrapper generator to collect local variables
18234           of similar type.  Produces somewhat more compact wrapper code.
18235
18236 11/20/99: Modified the Tcl module to use SWIG_GetArgs() to parse
18237           arguments.    This is a technique borrowed from Python in which
18238           arguments are converted using a format string convention similiar
18239           to fprintf().   This results in a *substantial* reduction in the
18240           size of the resulting wrapper code with only a modest runtime overhead
18241           in going through the extra conversion function.
18242
18243 11/13/99: Completely rewrote the class/structure generation code for the
18244           Tcl module.  Now, a small set of runtime functions are used
18245           to implement the functionality for all classes (instead of a
18246           massive amount of runtime code being generated for each class).
18247           Class specific information is simply encoded in a series of
18248           static tables.   This results in a *HUGE* reduction in wrapper
18249           code size--especially for C++.
18250
18251 11/13/99: Removed the -tcl (Tcl 7.x) module.  Tcl 8.0 is now several
18252           years old and the defacto standard--no real reason to keep
18253           supporting the old version at this point.
18254
18255 11/13/99: Cleaned up -c option for Python module.  The pyexp.swg file
18256           is now gone.
18257
18258 11/13/99: Fixed external declarations to work better with static linking
18259           on Windows.  Static linking should now be possible by defining
18260           the -DSTATIC_LINK option on the command line.  Patch contributed
18261           by Alberto Fonseca.
18262
18263 11/5/99 : Fixed an obscure code generation bug related to the generation
18264           of default constructors.   Bug reported by Brad Clements.
18265
18266 11/5/99 : Fixed a few memory problems found by purify.
18267
18268 11/5/99 : Officially deprecated the -htcl, -htk, and -plugin options
18269           from the Tcl and Tcl8 modules.
18270
18271 10/26/99: Removed unused variable from python/typemaps.i.  Patch
18272           contributed by Keith Davidson.
18273
18274 8/16/99 : Added _WIN32 symbol to libraries to better support Windows.
18275
18276 8/16/99 : Deprecated the Perl4 module.   It is no longer included in the
18277           distribution and no longer supported.  In the entire 3 years SWIG
18278           has been around I never received a single comment about it so I'm
18279           assuming no one will miss it...
18280
18281 8/16/99 : Modified the type-checking code to register type mappings using a
18282           table instead of repeated calls to SWIG_RegisterMapping().  This
18283           reduces the size of the module initialization function somewhat.
18284
18285 8/15/99 : Cleaned up the pointer type-checking code in the Tcl module.
18286
18287 8/15/99 : Many changes to the libraries to support runtime libraries.
18288
18289 8/13/99 : Eliminated C++ compiler warning messages about extern "C" linkage.
18290
18291 8/13/99 : Some cleanup of Python .swg files to better support runtime libraries
18292           on Windows.
18293
18294 8/13/99 : Modified the %pragma directive to attach pragmas declared inside
18295           a class definition to the class itself. For example:
18296
18297                class foo {
18298                     ...
18299                     %pragma(python) addtomethod = "insert:print `hello world'"
18300                     ...
18301                }
18302
18303           Most people don't need to worry about how this works.  For people
18304           writing backend modules, class-based pragmas work like this:
18305
18306               lang->cpp_open_class()             // Open a class
18307               lang->cpp_pragma()                 // Supply pragmas
18308               ...                                // Emit members
18309
18310               lang->cpp_close_class()            // Close the class
18311
18312           All of the pragmas are passed first since they might be used to
18313           affect the code generation of other members.   Please see
18314           the Python module for an example.   Patches contributed
18315           by Robin Dunn.
18316
18317 8/13/99 : Patch to Python shadow classes to eliminate ignored
18318           exception errors in destructors.  Patch contributed
18319           by Robin Dunn.
18320
18321 8/11/99 : Minor patch to swig_lib/python/swigptr.swg  (added SWIGSTATIC
18322           declaration).  Patch contributed by Lyle Johnson.
18323
18324 8/11/99 : Added FIRSTKEY/NEXTKEY methods to Perl5 shadow classes
18325           Patch contributed by Dennis Marsa.
18326
18327 8/11/99 : Modified Python module so that NULL pointers are returned
18328           and passed as 'None.'  Patch contributed by Tal Shalif.
18329
18330 8/10/99 : Fixed missing 'int' specifiers in various places.
18331
18332 8/10/99 : Added Windows makefile for Runtime libraries.  Contributed
18333           by Bob Techentin.
18334
18335 8/10/99 : Fixed minor problem in Python runtime makefile introduced
18336           by keyword arguments.
18337
18338 8/8/99  : Changed $target of perl5(out) typemap from ST(0) to
18339           ST(argvi).  Patch contributed by Geoffrey Hort.
18340
18341 8/8/99  : Fixed bug in typemap checking related to the ANY keyword
18342           in arrays and ignored arguments.  Error reported by
18343           Geoffrey Hort.
18344
18345 8/8/99  : %enabledoc and %disabledoc directives can now be used
18346           inside class/structure definitions.   However, no check
18347           is made to see if they are balanced (i.e., a %disabledoc
18348           directive inside a class does not have to have a matching
18349           %enabledoc in the same class).
18350
18351 8/8/99  : Keyword argument handling is now supported in the Python
18352           module.   For example:
18353
18354                int foo(char *bar, int spam, double x);
18355
18356           Can be called from Python as
18357
18358                foo(x = 3.4, bar="hello", spam=42)
18359
18360           To enable this feature, run SWIG with the '-keyword' command
18361           line option.    Mixing keyword and default arguments
18362           should work as well.   Unnamed arguments are assigned names
18363           such as "arg1", "arg2", etc...
18364
18365           *** POTENTIAL INCOMPATIBILITY ***
18366           Functions with duplicate argument names such as
18367           bar(int *OUTPUT, int *OUTPUT) will likely cause problematic
18368           wrapper code to be generated.   To fix this,  use different
18369           names or use %apply to map typemaps to alternate names.
18370
18371 8/8/99  : Handling of the 'this' pointer has been changed in Python shadow
18372           classes.  Previously, dereferencing of '.this' occured in the
18373           Python shadow class itself.   Now, this step occurs in the C
18374           wrappers using the following function:
18375
18376                 SWIG_GetPtrObj(PyObject *, void **ptr, char *type)
18377
18378           This function can accept either a string containing a pointer
18379           or a shadow class instance with a '.this' attribute of
18380           appropriate type.  This change allows the following:
18381
18382           1.  The real shadow class instance for an object is
18383               passed to the C wrappers where it can be examined/modified
18384               by typemaps.
18385
18386           2.  Handling of default/keyword arguments is now greatly
18387               simplified.
18388
18389           3.  The Python wrapper code is much more simple.
18390
18391           Plus, it eliminated more than 300 lines of C++ code in the
18392           Python module.
18393
18394           *** CAVEAT : This requires the abstract object interface.
18395           It should work with Python 1.4, but probably nothing older
18396           than that.
18397
18398
18399 8/8/99  : Fixed handling of "const" and pointers in classes.  In particular,
18400           declarations such as
18401
18402            class foo {
18403              ...
18404              const char *msg;
18405              const int  *iptr;
18406           }
18407
18408           are handled as assignable variables as opposed to constant
18409           values (this is the correct behavior in C/C++).   Note:
18410           declarations such as "char *const msg" are still unsupported.
18411           Constants declared at the global level using const are also
18412           broken (because I have a number of interfaces that rely upon
18413           this behavior).
18414
18415           *** POTENTIAL INCOMPATIBILITY ***  This may break interfaces that
18416           mistakenly treat 'const char *' types as constant values.
18417
18418 8/8/99  : Modified the parser to support bit-fields.    For example:
18419
18420           typedef struct {
18421               unsigned int is_keyword : 1;
18422               unsigned int is_extern  : 1;
18423               unsigned int is_static  : 1;
18424           } flags;
18425
18426           Bit-fields can only be applied to integer types and their
18427           are other restrictions.  SWIG performs no such type-checking
18428           (although the C compiler will catch problems when it tries to
18429           compile the wrapper code).
18430
18431 8/8/99  : Removed trailing space of $basetype substitution in typemaps.
18432           This is to allow things like this:
18433
18434           %typemap(python, argout) spam** OUTPUT{
18435               ...
18436               char* a = "$basetype_p";
18437               ...
18438           }
18439
18440           (Patch suggested by Nathan Dunfield).
18441
18442 6/22/99 : Made a very slight tweak to the Perl5 shadow class
18443           code that allows typemaps to alter the return type
18444           of objects (to support polymorphic types).  Patch
18445           contributed by Drake Diedrich.
18446
18447 4/8/99  : Fixed null pointer handling bug in Perl module.
18448           Patch contributed by Junio Hamano.
18449
18450 3/17/99 : Fixed bug in perl5ptr.swg for ActiveState Perl.
18451           Patch contributed by Greg Anderson.
18452
18453 2/27/99 : Eliminated segmentation fault when Swig runs on
18454           empty files.
18455
18456 2/27/99 : Added patch to Guile module to eliminate unused
18457           variables.   Contributed by Mike Simons.
18458
18459 2/27/99 : Fixed problem with %addmethods returning references.
18460
18461 2/27/99 : Fixed Runtime/Makefile. Patch contributed by
18462           Mike Romberg.
18463
18464 2/27/99 : Incorporated patches to the type-checker.
18465
18466 2/27/99 : Fixed problem with -exportall switch and shadow classes
18467           in Perl5 module.  Patch contributed by Dennis Marsa.
18468
18469 2/27/99 : Modified Perl5 module to recognize 'undef' as a NULL char *.
18470           Patch contributed by Junio Hamano.
18471
18472 2/27/99 : Fixed the Perl5 module to support the newer versions of
18473           ActiveState Perl for Win32.
18474
18475 2/27/99 : Fixed the include order of files specified with the
18476           -I option.
18477
18478 2/5/98- : Dave finishes his dissertation, goes job hunting, moves to
18479 2/5/99    Chicago and generally thrashes about.
18480
18481 Version 1.1 Patch 5 (February 5, 1998)
18482 ======================================
18483
18484 2/4/98  : Fixed a bug in the configure script when different package
18485           locations are specified (--with-tclincl, etc...).
18486
18487 2/2/98  : Fixed name-clash bug related to the switch to C macros for accessor
18488           functions.  The new scheme did not work correctly for objects
18489           with members such as 'obj', 'val', etc...   Fixed the bug by
18490           appending the word 'swig' to macro argument names.  Patch
18491           contributed by Rudy Albachten.
18492
18493 2/2/98  : Slight fix to the Perl5 module to eliminate warning messages
18494           about 'varname used only once : possible typo'.  Fix
18495           contributed by Rudy Albachten.
18496
18497 1/9/98  : Fixed a bug in the Perl 5 module related to the creation of
18498           constants and shadow classes.
18499
18500 1/9/98  : Fixed linking bug with Python 1.5 embed.i library file.
18501
18502 Version 1.1 Patch 4 (January 4, 1998)
18503 =====================================
18504
18505 1/4/98  : Changed structured of the Examples directory to be more friendly
18506           to Borland C++.
18507
18508 1/4/98  : Added the function Makefile.win.bc for compiling the examples
18509           under Borland 5.2.
18510
18511 1/4/98  : Slight change to the perl5 module and C++ compilation.  The
18512           <math.h> library is now included before any Perl headers
18513           because Perl the extern "C" linkage of math.h screws alot
18514           of things up (especially on Windows).
18515
18516 1/2/98  : Change to the Python module that reduces the number of constants
18517           created by C++ classes, inheritance, and shadow classes.   This
18518           modification may introduce a few slight incompatibilities if
18519           you attempt to use the non-shadow class interface with shadow
18520           classes enabled.    Patch contributed by Mike Romberg.
18521
18522 1/2/98  : Support for Tcl 8.0 namespaces has been added.   This *replaces*
18523           the original SWIG mechanism that assumed [incr Tcl] namespaces.
18524           To use namespaces, simply run SWIG with the following options
18525
18526              swig -tcl -namespace  foo.i
18527
18528                     This places everything in a namespace that matches
18529                     the module name
18530
18531              swig -tcl -namespace -prefix bar foo.i
18532
18533                     This places everything in the namespace 'bar'
18534
18535           The use of namespaces is new in Tcl 8.0.  However, the wrapper code
18536           generated by SWIG will still work with all versions of Tcl newer
18537           than and including Tcl 7.3/Tk3.6 even if the -namespace option is
18538           used.
18539
18540           *** POTENTIAL INCOMPATIBILITY ***
18541           This change may break existing applications that relied on the
18542           -prefix and -namespace options.
18543
18544 1/2/98  : Added the following constants to the Tcl wrapper code
18545
18546                  SWIG_name      - Name of the SWIG module
18547                  SWIG_prefix    - Prefix/namespace appended to command names
18548                  SWIG_namespace - Name of the namespace
18549
18550           SWIG library writers can use these to their advantages.
18551
18552 1/2/98  : Fixed a bug in the Tcl8 module related to the creation of
18553           pointer constants (the function SWIG_MakePtr was missing from
18554           the wrapper code).
18555
18556 1/2/98  : Added the consthash.i library file to the Tcl and Tcl8 modules.
18557
18558 1/1/98  : Changed and cleaned up the Python typemaps.i file.   The following
18559           significant changes were made :
18560
18561                 1.  The OUTPUT typemap now returns Python tuples instead of
18562                     lists.   Lists can be returned as before by using the
18563                     L_OUTPUT type.    If compatibility with older versions
18564                     is needed, run SWIG with the -DOUTPUT_LIST option.
18565
18566                 2.  The BOTH typemap has been renamed to INOUT.  For backwards
18567                     compatibility, the "BOTH" method still exists however.
18568
18569                 3.  Output typemaps now generate less code than before.
18570
18571           Changes to typemaps.i may break existing Python scripts that assume
18572           output in the form of a list.
18573           *** POTENTIAL INCOMPATIBILITY ***
18574
18575 12/31/97: Fixed long overdue problems with the testing scripts and certain
18576           makefiles that required the use of the bash shell.   Everything should
18577           work properly with the standard Bourne shell (sh) now.
18578
18579 12/31/97: Modified typemaps to allow $basetype as a valid local variable.
18580           This allows for all sorts of bizarre hackish typemaps that
18581           do cool things.   Patch contributed by Dominique Dumont.
18582
18583 12/31/97: Switched accessor functions generated for member data to
18584           C preprocessor macros (except in cases involving typemaps
18585           or char *).
18586
18587 12/31/97: Fixed a bug related to C++ member data involving references.
18588
18589 12/31/97: Changed accessor functions for C++ member functions to
18590           preprocessor macros.   This cleans up the wrapper code
18591           and results in fewer function definitions.
18592
18593 12/31/97: Changed the default C constructor to use calloc() instead
18594           of malloc()
18595
18596 12/30/97: Changed the creation of constants in the Perl5 module.
18597           For all practical purposes, they should work in exactly the
18598           same way as before except that they now require much less
18599           wrapper code.   Modules containing large numbers of
18600           constants may see greater than a 50% reduction in wrapper
18601           code size.
18602
18603 12/30/97: Modified the Python module to be more intelligent about the
18604           creation of constants.  SWIG no longer generates redundant
18605           global variables and the size of the module initialization
18606           function should be reduced.   (Many thanks to Jim Fulton).
18607
18608 12/29/97: Fixed a bug in C++ code generation related to member functions,
18609           default arguments, and references.
18610
18611 12/29/97: Fixed configure script and a few makefiles to support Python 1.5
18612
18613 12/29/97: Added 'embed15.i' library file.  This file should be used to
18614           staticly link versions of Python 1.5.    To make it the default,
18615           simply copy 'swig_lib/python/embed15.i' to 'swig_lib/python/embed.i'
18616
18617 Version 1.1 Patch 3 (November 24, 1997)
18618 ========================================
18619
18620 11/23/97: Fixed a bug in the Perl5 module with shadow classes and
18621           static class functions that return class instances.
18622           Note : The fix for this bug requires a slight restructuring of
18623           of the .pm files created by SWIG.
18624
18625 11/23/97: Fixed a bug in the Tcl/Tcl8 modules related to variable linking
18626           of character arrays.  If you declared a global variable 'char foo[10]',
18627           the generated wrapper code would either cause a segmentation fault
18628           immediately upon loading or weird memory corruption elsewhere.
18629           This should now be fixed although character arrays can only be
18630           read-only.
18631
18632 11/23/97: Fixed a bug with the %import directive that caused it to
18633           fail if files were imported from directories other than
18634           the current working directory.
18635
18636 11/23/97: Fixed incorrect diagnostic message in the ASCII documentation
18637           module.
18638
18639 11/23/97: Changed the behavior of the -o option when used with shadow
18640           classes. If -o was used to specify both the pathname and filename
18641           of SWIG's output such as
18642
18643                  swig -o /home/swig/wrapper.c -shadow -perl5 foo.i
18644
18645           The wrapper code would be placed the file specified with -o,
18646           but the .pm file and documentation would be placed in the
18647           directory where SWIG was run.   Now, these files are placed
18648           in the same directory as the file specified with the -o option.
18649           This change is also needed for proper operation on the
18650           Macintosh.
18651
18652 11/23/97: Added a 'this()' method to Perl5 shadow classes.   This can
18653           be used to return the normal pointer value from a shadow
18654           class that is represented as a tied hash.   To use just
18655           invoke as a method like this :
18656
18657               $l = new List;       # Create an object
18658               $ptr = $l->this();   # Get the normal pointer value
18659
18660           *** NEW FEATURE ***
18661
18662 11/23/97: Fixed the Tcl 8 pointer.i library file (which was completely
18663           broken in 1.1p2).
18664
18665 11/23/97: Modified the Perl5 type-checker to fix a few problems
18666           with global variables of pointer types and to allow
18667           tied hashes to be used interchangably with normal
18668           pointer values.
18669
18670 11/23/97: Modified the typemap mechanism to allow output
18671           typemaps of type 'void'.   These were ignored previously,
18672           but now if you specify,
18673
18674                 %typemap(lang,out) void {
18675                       ... return a void ...
18676                 }
18677
18678           You can change or assign a return value to the function.
18679
18680 11/23/97: Fixed processing of 'bool' datatypes in the Python module.
18681
18682 11/23/97: Fixed minor parsing error with C++ initializers. For example,
18683
18684                  class B : public A {
18685                  public:
18686                        B() : A() { ... };
18687                        ...
18688                  }
18689
18690 11/23/97: Fixed the Tcl8 module so that C functions that call back into
18691           Tcl don't corrupt the return result object (SWIG was gathering
18692           the result object too early which leads to problems if subsequent
18693           Tcl calls are made).
18694
18695 11/23/97: Fixed a code generation bug in the Python module when two or
18696           more output parameters were used as the first arguments of a
18697           function.  For example :
18698
18699                  %include typemaps.i
18700                  void foo(double *OUTPUT, double *OUTPUT, double a);
18701
18702           Previously, doing this resulted in the creation of an
18703           extraneous comma in the output, resulting in a C syntax error.
18704
18705 11/22/97: Fixed a bug when template handling that was stripping whitespace
18706           around nested templates.   For example :
18707
18708                  Foo<Bar<double> >
18709
18710           was getting munged into Foo<Bar>> which is a syntax error in
18711           in the C++ compiler.
18712
18713 11/22/97: Fixed bugs in the Borland C++ makefiles.
18714
18715 11/22/97: Fixed memory corruption bug when processing integer
18716           arguments in Tcl8 module.
18717
18718 11/21/97: Fixed a bug in the Runtime/Makefile related to Tcl 8.
18719
18720 11/21/97: Fixed a bug with the %new directive and Perl5 shadow classes.
18721           No longer generates a perl syntax error.
18722
18723 11/9/97 : Changed a strncpy() to strcpy() in the pointer type-checker.
18724           This results in a substantial performance improvement in
18725           type-checking.
18726
18727 10/29/97: Fixed a bug in the code generation of default arguments and
18728           user-defined types.  For example :
18729
18730                  void foo(Vector a, Vector b = d);
18731
18732           should now work properly.
18733
18734 Version 1.1 Patch 2 (September 4, 1997)
18735 =======================================
18736
18737 9/4/97  : Fixed problem with handling of virtual functions that
18738           was introduced by some changes in the C++ module.
18739
18740 Version 1.1 Patch 1 (August 27, 1997)
18741 =====================================
18742
18743 8/26/97 : Fixed compilation and run-time bugs with Tcl 8.0 final.
18744
18745 8/21/97 : Fixed code generation bug with arrays appearing as arguments
18746           to C++ member functions.  For example :
18747
18748                 class Foo {
18749                 public:
18750                       void Bar(int a[20][20]);
18751                 };
18752
18753           There is still a bug using arrays with added methods
18754           however.
18755
18756 8/20/97 : Fixed a bug with generating the code for added methods
18757           involving pass-by-value.
18758
18759 8/19/97 : Modified the typemapper to substitute the '$arg' value
18760           when declaring local variables.    For example :
18761
18762               %typemap(in) double * (double temp_$arg) {
18763                     ... do something ...
18764               }
18765
18766           When applied to a real function such as the following :
18767
18768               void foo(double *a, double *b, double *result);
18769
18770           three local variables will be created as follows :
18771
18772               double temp_a;
18773               double temp_b;
18774               double temp_result;
18775
18776           This can be used when writing multiple typemaps that need
18777           to access the same local variables.
18778
18779
18780 7/27/97 : Fixed a variety of problems with the %apply directive and arrays.
18781           The following types of declarations should now work :
18782
18783                %apply double [ANY] { Real [ANY] };
18784                %apply double [4] { double [10] };
18785
18786           A generic version of apply like this :
18787
18788                %apply double { Real };
18789
18790           should now work--even if arrays involving doubles and Reals are
18791           used later.
18792
18793 7/27/97 : Changed warning message about "Array X has been converted to Y" to
18794           only appear if running SWIG in verbose mode.
18795
18796 7/27/97 : Added the variables $parmname and $basemangle to the typemap
18797           generator.    $parmname is the name of the parameter used
18798           when the typemap was matched.  It may be "" if no parameter
18799           was used.   $basemangle is a mangled version of the base
18800           datatype.    Sometimes used for array handling.
18801
18802 7/27/97 : Changed the behavior of output arguments with Python shadow classes.
18803           Originally, if a function returned an object 'Foo', the shadow class
18804           mechanism would create code like this :
18805
18806                 def return_foo():
18807                       val = FooPtr(shadowc.return_foo())
18808                       val.this = 1
18809                       return val
18810
18811           The problem with this is that typemaps allow a user to redefine
18812           the output behavior of a function--as a result, we can no longer
18813           make any assumptions about the return type being a pointer or
18814           even being a single value for that matter (it could be a list,
18815           tuple, etc...).   If SWIG detects the use of output typemaps
18816           (either "out" or "argout") it returns the result unmodified like
18817           this :
18818
18819                 def return_foo():
18820                       val = shadowc.return_foo()
18821                       return val
18822
18823           In this case, it is up to the user to figure out what to do
18824           with the return value (including the possibility of converting it
18825           into a Python class).
18826
18827 7/26/97 : Fixed a parsing problem with types like 'unsigned long int',
18828           'unsigned short int', etc...
18829
18830 7/24/97 : Minor bug fix to Tcl 8 module to parse enums properly.  Also
18831           fixed a memory corruption problem in the type-checker.
18832           (patch contributed by Henry Rowley.
18833
18834 7/24/97 : Added Python-tuple typemaps contributed by Robin Dunn.
18835
18836 7/24/97 : Incorporated some changes to the Python module in support of
18837           Mark Hammond's COM support.  I'm not entirely sure they
18838           work yet however.  Needs documentation and testing.
18839
18840 7/24/97 : Fixed code generation bugs when structures had array members
18841           and typemaps were used.  For example :
18842
18843               %typemap(memberin) double [20][20] {
18844                       ... get a double [20][20] ...
18845               }
18846               struct Foo {
18847                      double a[20][20];
18848               }
18849
18850           Originally, this would generate a compiler-type error when
18851           the wrapper code was compiled.   Now, a helper function like
18852           this is generated :
18853
18854                 double *Foo_a_set(Foo *a, double val[20][20]) {
18855                          ... memberin typemap here ...
18856                          return (double *) val;
18857                 }
18858
18859           When writing typemaps, one can assume that the source variable
18860           is an array of the *same* type as the structure member. This
18861           may break some codes that managed to work around the array bug.
18862           *** POTENTIAL INCOMPATIBILITY ***
18863
18864 7/13/97 : Fixed bug in Perl5 module when using C global variables that
18865           are pointers.  When used in function calls and other operations,
18866           the value of the pointer would be invalid---causing core
18867           dumps and other problems.  SWIG implements global variables
18868           using Perl magic variables.  As it turns out, the error
18869           was caused by the fact that the pointer-extraction code
18870           was somehow bypassing the procedure used to resolve magical
18871           variables (hence, leaving the value undefined).  To fix
18872           the problem, SWIG now explicitly resolves magic before
18873           extracting pointer values.
18874
18875 7/12/97 : Eliminated the last remnants of free() and malloc() from
18876           the SWIG compiler.
18877
18878 7/12/97 : Fixed parsing problems with typemaps involving arrays and
18879           temporary variables of arrays.    Also made it possible for
18880           SWIG to handle typemaps like this :
18881
18882                  %typemap(in) double [ANY] (double temp[$dim0]) {
18883                       ... store data in temp[$dim0] ...
18884                  }
18885
18886           Not only does this typemap match any double [] array, it
18887           creates a local variable with precisely the right dimensions.
18888           (ie. $dim0 gets filled in with the real number of dimensions).
18889           Of course, off the record, this will be a way to add more
18890           functionality to the typemaps.i libraries.
18891
18892 7/9/97  : Fixed some problems with Perl5, static linking, and shadow
18893           classes.  When statically linking multiple modules together, write
18894           a top-level interface file like this when shadow classes are not
18895           used :
18896
18897                  %module swig, foo, bar, glob;
18898                  %include perlmain.i
18899
18900           When shadow classes are used, the module names have an extra 'c'
18901           appended so it should read as :
18902
18903                  %module swig, fooc, barc, globc;
18904                  %include perlmain.i
18905
18906           When linking multiple modules, consider using the SWIG runtime
18907           library.
18908
18909 7/8/97  : Incorporated fixed versions of the Borland C++ Makefiles.
18910
18911 7/8/97  : First cut at trying to eliminate excessive compiler warnings.
18912           As it turns out, alot of warnings go away if you just make
18913           declarations like this
18914
18915                   clientData = clientData;
18916
18917           in the resulting wrapper code.  Most compilers should just
18918           ignore this code (at least would can hope).
18919
18920 7/8/97  : Fixed bizarre code generation bug with typemaps and C++ classes.
18921           In some cases, typemaps containing printf formatting strings such as
18922
18923                   %typemap(memberout) int * {
18924                          printf("%d",42);
18925                   }
18926
18927           Would generate completely bogus code with garbage replacing
18928           the '%d'.   Caused by one faulty use of printf (wasn't able to find
18929           any other occurences).
18930
18931 7/7/97  : Fixed bug in Python shadow class generation with non-member
18932           functions that are returning more than one value.
18933
18934 7/7/97  : Incorporated modifications to make SWIG work with Guile 1.2.
18935           Still need to test it out, but it is rumored to work.
18936
18937 7/2/97  : Fixed some bugs related to output arguments and Python shadow
18938           classes.    If an output argument is detected, SWIG assumes
18939           that the result is a list and handles it appropriately.
18940           If the normal return type of an function is an object,
18941           it will be converted into a shadow class as before, but
18942           with the assumption that it is the first element of a
18943           list.  *** NOTE : This behavior has been subsequently changed ***
18944
18945 6/29/97 : Changed EXPORT to SWIGEXPORT in all of the language modules.
18946           Should provide better compatibility with Windows.
18947
18948 6/29/97 : Modified Python shadow classes so that output arguments
18949           work correctly (when typemaps are used).
18950
18951 Version 1.1 (June 24, 1997)
18952 ===========================
18953
18954 6/24/97 : Fixed Objective-C constructor bug when working with Perl5
18955           shadow classes.
18956
18957 6/23/97 : Fixed some parsing problems with Objective-C.  Declarations
18958           such as the following should work now :
18959
18960                - foo : (int) a with: (int) b;
18961
18962 6/22/97 : Added SWIG Runtime library.   This library contains
18963           the SWIG pointer type-checker and support functions
18964           that are normally included in every module.  By using
18965           the library, it is easier to work with multiple SWIG
18966           generated modules.
18967
18968 6/22/97 : Fixed minor bug in Perl5 module related to static linking
18969           of multiple modules.
18970
18971 6/22/97 : Fixed some bugs with the %import directive. When used with
18972           Perl5 shadow classes, this generates a 'require' statement
18973           to load in external modules.
18974
18975 6/22/97 : Added -swiglib option.  This prints out the location of the
18976           SWIG library and exits.  This option is only really useful to
18977           configuration tools that are looking for SWIG and its library
18978           location (e.g. autoconf, configure, etc...).
18979
18980 6/21/97 : Fixed export bug with Perl5.004 on Windows-NT.
18981
18982 6/20/97 : Minor change to code generation of class/structure members in
18983           order to work better with typemaps. Should have no noticable
18984           impact on existing SWIG modules.
18985
18986 6/19/97 : Added -t option. This allows SWIG to load a typemap file before
18987           processing any declarations.  For example :
18988
18989                  swig -t typemaps.i -python example.i
18990
18991           At most, only one typemap file can be specified in this manner.
18992           *** NEW FEATURE ***
18993
18994 6/18/97 : Need a Makefile fast? Type
18995
18996                  swig [-tcl, -perl5, -python] -co Makefile
18997
18998           and you will get a Makefile specific to that target language.
18999           You just need to modify it for your application and you're
19000           ready to run.
19001
19002 6/18/97 : Completed the -ci option.  This option checks a file into the
19003           SWIG library.   It should be used in conjunction with a
19004           language option. For example :
19005
19006                   swig -tcl -ci foobar.i
19007
19008           Checks the file foobar.i into the Tcl part of the library.
19009           In order to check a file into the general library (accessible
19010           to all languages modules), do the following
19011
19012                   swig -ci -o ../foobar.i foobar.i
19013
19014           (Admittedly this looks a little strange but is unavoidable).
19015           The check-in option is primarily designed for SWIG maintenance
19016           and library development. The command will fail if the user does
19017           not have write permission to the SWIG library.  Third party library
19018           extensions can easily install themselves by simply providing
19019           a shell script that uses 'swig -ci' to install the appropriate
19020           library files.  It is not necessary to know where the SWIG library
19021           is located if you use this mechanism.
19022           *** NEW FEATURE ***
19023
19024 6/16/97 : Fixed a bug in shadow class generation when %name() was applied
19025           to a class definition.   Unfortunately, fixing the bug required
19026           a change in the Language C API by adding an extra argument to
19027           the Language::cpp_class_decl() function.  This may break
19028           SWIG C++ extensions.
19029           *** POTENTIAL INCOMPATIBILITY ***
19030
19031 6/15/97 : Added a warning message if no module name is specified with the
19032           %module directive or -module option.
19033
19034 6/15/97 : Fixed line number bug when reporting errors for undefined
19035           base classes.
19036
19037 6/15/97 : Added new %rename directive.  This allows the forward declaration
19038           of a renaming.  For example :
19039
19040                  %rename OldName NewName;
19041
19042                  .... later ...
19043                  int OldName(int);
19044
19045           Unlike %name, %rename will rename any occurence of the old name.
19046           This applies to functions, variables, class members and so forth.
19047           There is no way to disable %rename once set, but you can change the
19048           name by redeclaring it to something else.
19049           *** NEW FEATURE ***
19050
19051 6/15/97 : Improved the implementation of the %name directive so that it
19052           could be used with conditional compilation :
19053
19054                     #ifdef SWIG
19055                     %name(NewName)
19056                     #endif
19057                     int OldName(int);
19058
19059 6/15/97 : Added support for functions with no return datatype.  In this case,
19060           SWIG assumes a return type of 'int'.
19061
19062 6/11/97 : Improved error reporting in the parser.  It should be a little
19063           less sensitive to errors that occur inside class definitions
19064           now.  Also reports errors for function pointers.
19065
19066 6/11/97 : Made '$' a legal symbol in identifiers.  This is to support
19067           some Objective-C libraries.  Some compilers (such as gcc) may also
19068           allow identifiers to contain a $ in C/C++ code as well (this is
19069           an obscure feature of C). When '$' appears in identifier, SWIG
19070           remaps it to the string '_S_' when creating the scripting language
19071           function. Thus a function 'foo$bar' would be called 'foo_S_bar'.
19072
19073 6/11/97 : Fixed bug in Python shadow classes with __repr__ method.  If
19074           supplied by the user, it was ignored, but now it should work.
19075
19076 6/9/97  : Fixed the Tcl 8.0 module to work with Tcl 8.0b1.   SWIG is no
19077           longer compatible with *any* alpha release of Tcl 8.0.
19078           *** POTENTIAL INCOMPATIBILITY ***
19079
19080 6/7/97  : Put a maximal error count in (currently set to 20). SWIG will bail out
19081           if it generates more errors than this (useful for preventing SWIG
19082           from printing 4000 syntax errors when it gets confused).
19083
19084 6/7/97  : Fixed segmentation fault when parsing variable length arguments.
19085
19086 6/7/97  : Minor change to Perl5 module.  C++ static functions are now
19087           put in the same package as their class when using shadow classes.
19088
19089 6/7/97  : Centralized the naming of functions, members, wrappers etc... By
19090           centralizing the naming scheme, it should be possible to make
19091           some multi-file optimizations.  Also, it should be possible to
19092           change SWIG's naming scheme (perhaps a new feature to be added
19093           later).
19094
19095 6/2/97  : Added 'arginit' typemap.   This can be used to assign initial values
19096           to function arguments.  Doing so makes it somewhat easier to detect
19097           improper argument passing when working with other typemaps.
19098
19099 6/2/97  : Fixed code generation bug when read-only variables were inherited
19100           into other classes.  Under inheritance, the variables would
19101           become writable, but this has now been corrected.
19102
19103 5/30/97 : An empty %name() directive is no longer allowed or supported.
19104           This directive was originally used to strip the prefix
19105           off of a class or structure.  Unfortunately, this never really
19106           seemed to work right and it complicated the C++ code generator
19107           significantly.   As far as I can tell no one uses it, so it
19108           is now history.  *** POTENTIAL INCOMPATIBILITY ***
19109
19110 5/28/97 : Fixed a parsing bug with #define and C++ comments.  Declarations
19111           such as the following now work properly :
19112
19113                    #define CONST   4     // A Comment
19114
19115 5/28/97 : Made some performance improvements to the SWIG String class.
19116           (only affects the SWIG compiler itself).
19117
19118 5/28/97 : Modified the parser to skip template definitions and issue a
19119           warning message.
19120
19121 5/28/97 : Preliminary support for parameterized types added (ie. templates).
19122           Types such as the following should pass through the SWIG compiler
19123
19124                     void foo(vector<complex> *a, vector<double> *b);
19125
19126           When used, the entire name 'vector<complex>' becomes the name
19127           of the datatype.      Due to space limitations in datatype
19128           representations, the name should not exceed 96 characters.
19129
19130           Note : This is only part of what is needed for template support.
19131           Template class definitions are not yet supported by SWIG.
19132
19133           The template notation above may also be used when specifying
19134           Objective-C protocol lists.
19135           *** NEW FEATURE ***
19136
19137 5/24/97 : First cut at Objective-C support added.   As it turns out, almost
19138           everything can be handled with only a few minor modifications to
19139           the C++ module.
19140           *** NEW FEATURE ***
19141
19142 5/23/97 : Fixed repeated definition bug in multiple inheritance handling
19143           when multiple base classes share a common base class (ie.
19144           the evil diamond).
19145
19146 5/21/97 : Fixed rather embarrassing typo that worked its way into the
19147           Tests/Build directory.
19148
19149 5/19/97 : Fixed code generation bug when using native methods and
19150           shadow classes with Python and Perl5 modules.
19151
19152 5/19/97 : Modified the %apply directive slightly so that it would work
19153           with pointers a little better. For example :
19154
19155                   %apply unsigned long { DWORD };
19156
19157           Applies *all* typemaps associated with "unsigned long" to
19158           "DWORD".   This now includes pointers to the two datatypes.
19159           For example, a typemap applied to "unsigned long **" would
19160           also be applied to any occurrence of "DWORD **" as well.
19161
19162 5/19/97 : Fixed an ownership assignment bug in the Perl5 module when
19163           class members were returning new objects belonging to
19164           different classes.
19165
19166 5/17/97 : Added a few more typemap variables.
19167
19168                   $name          - Name of function/variable/member
19169                   $basetype      - Base datatype (type without pointers)
19170                   $argnum        - Argument number
19171
19172 5/16/97 : Fixed embarrassing underscore error in local variable
19173           allocator.
19174
19175 5/16/97 : Fixed namespace clash bug in parameterized typemaps
19176           when creating arrays as new local variables.
19177
19178 5/15/97 : Fixed some bugs with inheritance of added methods across
19179           multiple files.   SWIG now uses names of base classes
19180           when generating such functions.
19181
19182 5/14/97 : Finished support for default typemaps.  Primarily used
19183           internally, they can be used to match the basic
19184           built-in datatypes used inside of SWIG.   You can
19185           specify them in interface files as well like this :
19186
19187                %typemap(tcl,in) int SWIG_DEFAULT_TYPE {
19188                         $target = atoi($target);
19189                }
19190
19191           Unlike normal typemaps, this default map will get applied
19192           to *all* integer datatypes encountered, including those
19193           renamed with typedef, etc...
19194
19195 5/13/97 : Fixed substring bug in type checker.
19196
19197 5/12/97 : Fixed bug in parameterized typemaps when declaring local
19198           variables of structures.
19199
19200 Version 1.1 Beta6 (May 9, 1997)
19201 ===============================
19202
19203 5/9/97  : Fixed bizarre NULL pointer handling bug in Perl5 module.
19204
19205 5/8/97  : Fixed mysterious segmentation fault when running SWIG on an
19206           empty file.
19207
19208 5/7/97  : The code generator will now replace the special symbol "$cleanup"
19209           with the cleanup code specified with the "freearg" typemap.
19210           This change needed to properly manage memory and exceptions.
19211
19212 5/5/97  : Added the 'typemaps.i' library file.  This contains a
19213           variety of common typemaps for input values, pointers,
19214           and so on.
19215
19216 5/5/97  : Changed behavior of "argout" typemap in Python module.
19217           Old versions automatically turned the result into a
19218           Python list.  The new version does nothing, leaving the
19219           implementation up to the user.  This provides more flexibility
19220           but may break older codes that rely on typemaps.
19221           *** POTENTIAL INCOMPATIBILITY ***
19222
19223 5/5/97  : Fixed bug in Python module related to the interaction of
19224           "argout" and "ignore" typemaps.
19225
19226 5/5/97  : Fixed bug in Python module that would generate incorrect code
19227           if all function arguments are "ignored".
19228
19229 5/4/97  : Added %apply and %clear directives.   These form a higher level
19230           interface to the typemap mechanism.  In a nutshell, they
19231           can be used to change the processing of various datatypes without
19232           ever having to write a typemap.  See the SWIG documentation
19233           for more details.  ** NEW FEATURE **
19234
19235 5/4/97  : Added a local variable extension to the typemap handler.
19236           For example :
19237
19238                  %typemap(tcl,in) double *(double temp) {
19239                         temp = atof($source);
19240                         $target = &temp;
19241                  }
19242
19243           In this case, 'temp' is a local variable that exists
19244           in the entire wrapper function (not just the typemap
19245           code).  This mechanism provides better support for
19246           certain types of argument handling and also makes it
19247           possible to write thread-safe typemaps.  Any number
19248           local variables can be declared by supplying a comma
19249           separated list.   Local variables are guaranteed to be
19250           unique, even if the same typemap is applied many times
19251           in a given function.
19252           ** Not currently supported in Perl4 or Guile modules.
19253
19254 5/2/97  : Fixed processing of %ifdef, %endif, %if, etc...  (These are
19255           SWIG equivalents of the C preprocessor directives that
19256           can pass through the C preprocessor without modification).
19257
19258 5/2/97  : Fixed major (but subtle) bug in the run-time type checker
19259           related to searching and type-checking for C++ inheritance.
19260           To make a long story short, if you had two classes named
19261           "Foo" and "FooObject" the type checker would sometimes
19262           get confused and be unable to locate "Foo" in an internal
19263           table.
19264
19265 5/2/97  : Fixed some bugs in the -co option.
19266
19267 4/24/97 : Pointer library added to the SWIG library.
19268
19269 4/19/97 : Added the %new directive.   This is a "hint" that can be used
19270           to tell SWIG that a function is returning a new object. For
19271           example :
19272
19273                   %new Foo *create_foo();
19274
19275           This tells SWIG that create_foo() is creating a new object
19276           and returning a pointer to it.   Many language modules may
19277           choose to ignore the hint, but when working with shadow classes,
19278           the %new is used to handle proper ownership of objects.
19279
19280           %new can also be used with dynamically allocated strings.
19281           For example :
19282
19283                   %new char *create_string();
19284
19285           When used, all of the language modules will automatically cleanup
19286           the returned string--eliminating memory leaks.
19287           ** NEW FEATURE **
19288
19289 4/19/97 : Added a new typemap "newfree".   This is used in conjunction with
19290           the %new directive and can be used to change the method by which
19291           a new object returned by a function is deleted.
19292
19293 4/19/97 : The symbol "__cplusplus" is now defined in the SWIG interpreter
19294           when running with the -c++ option.
19295
19296 4/17/97 : Added support for static member functions when used inside the
19297           %addmethods directive.
19298
19299 4/15/97 : Added a special typemap symbol PREVIOUS that can be used to
19300           restore a previous typemap. For example :
19301
19302                  %typemap(tcl,in) int * = PREVIOUS;
19303
19304           This is primarily used in library files.
19305
19306 4/13/97 : Added %pragma directive for Perl5 module.   Two new pragmas are
19307           available :
19308
19309                  %pragma(perl5) code = "string"
19310                  %pragma(perl5) include = "file.pl"
19311
19312           Both insert code into the .pm file created by SWIG.  This can
19313           be used to automatically customize the .pm file created by SWIG.
19314
19315 4/13/97 : Scanner modified to only recognize C++ keywords when the -c++
19316           option has been specified.  This provides support for C programs
19317           that make use of these keywords for identifiers.
19318           SWIG may need to be explicitly run with the -c++ option when
19319           compiling C++ code (this was allowed, but not recommended in
19320           previous versions). **POTENTIAL INCOMPATIBILITY**
19321
19322 4/11/97 : Fixed a rather nasty bug in the Perl5 module related to using
19323           variable linking with complex datatypes and pointers.   On Unix,
19324           code would work (somehow), but would cause an access violation
19325           under Windows-NT.  The fix should correct the problem,
19326           but there may still be a problem using global variables of
19327           complex datatypes in conjunction with shadow classes.  Fortunately,
19328           this sort of thing seems to be relatively rare (considering
19329           that the bug has been around for more than a year - yikes!).
19330
19331 4/11/97 : Fixed bizarre constant evaluation bug in Perl5 code generation
19332           when running under Windows-NT.
19333
19334 4/8/97  : Bug when using default arguments and C++ references fixed.
19335
19336 4/8/97  : Fixed code generation bugs in Python and Perl5 modules related to
19337           using class renaming (applying the %name directive to a class
19338           definition) and shadow classes.
19339
19340 4/7/97  : Fixed minor bugs in swigptr.swg, tcl8ptr.swg, and perl5ptr.swg to
19341           prevent infinite loops when weird datatypes are passed.
19342
19343 3/29/97 : 'Makefile.win' added.   This is used to build most of the examples
19344           in the Examples directory under Windows NT/95.
19345
19346 3/27/97 : Fixes to SWIG's error return codes.   SWIG now returns non-zero
19347           exit codes for certain kinds of errors (which makes it more
19348           friendly to makefiles).     An overhaul of the error handling
19349           is on the to-do list and will probably show up in a later release.
19350
19351 3/25/97 : Bug fix.  "freearg" and "argout" typemaps have been fixed in
19352           the Perl5 module.  In previous versions, function input parameters
19353           and function output parameters shared the same memory space--causing
19354           all sorts of nasty problems when trying to pass perl values by
19355           reference.   SWIG now internally makes a "copy" (which is really
19356           just a pointer) of affected parameters and uses that.   This
19357           is done transparently so there is no noticable impact on any
19358           SWIG generated modules.   This change is probably only noticable
19359           to expert users.
19360
19361 3/25/97 : Added type-check to verbose and stat mode.  SWIG will now generate a list
19362           of all datatypes that were used but undefined (useful for tracking
19363           down weird bugs).   This is enabled with the -v option (which
19364           is now officially known as "overly verbose" mode) or the -stat option.
19365
19366 3/25/97 : Slight change to the parser to make include guards work correctly.
19367           For example :
19368
19369                 #ifndef INTERFACE_I
19370                 #define INTERFACE_I
19371                 %module foobar.i
19372                 ... declarations ...
19373                 #endif
19374
19375 3/24/97 : %checkout directive added.   This allows an interface file to
19376           extract files from the SWIG library and place them in the
19377           current directory.   This can be used to extract scripts and
19378           other helper code that might be associated with library files.
19379           For example :
19380
19381                 %checkout array.tcl
19382
19383           Will look for a file "array.tcl" in the library and copy it
19384           to the current directory.    If the file already exists in the
19385           directory, this directive does nothing (it will not overwrite an
19386           existing file).  This only an experimental feature for now.
19387
19388 3/24/97 : SWIG will now look in the SWIG Library for a file if it can't
19389           find it in the current directory.  As a result, it is easy to
19390           make modules from SWIG library files.  For example, if you
19391           want to make a Python module from the SWIG timers library, just
19392           type this in any directory :
19393
19394                 swig -python timers.i
19395
19396           You will get the files timers_wrap.c and timers_wrap.doc in
19397           the current directory that you can now compile.   The file
19398           remains in the SWIG library (although you can check it out
19399           using the -co option).  *** New Feature ***
19400
19401 3/24/97 : -co option added to SWIG to allow easy access to the SWIG library.
19402           When used, this instructs SWIG to check out a library file and
19403           place it in the current directory.  For example :
19404
19405                 unix > swig -co array.i
19406                 array.i checked out from the SWIG library
19407                 unix >
19408
19409           Once in your directory you can customize the file to suit your
19410           particular purposes.  The checkout option makes it easy to
19411           grab library files without knowing anything about the SWIG
19412           installation, but it also makes it possible to start
19413           including scripts, C code, and other miscellaneous files
19414           in the library.  For example, you could put a cool script
19415           in the library and check it out whenever you wanted to use it.
19416           *** New Feature ***
19417
19418 3/24/97 : #pragma export directives added to Tcl output for compiling
19419           shared libraries on the Mac.
19420
19421 3/24/97 : Minor changes to wish.i and tclsh.i library files to provide
19422           support for the Macintosh.
19423
19424 3/19/97 : SWIG's policy towards NULL pointers has been relaxed.  The
19425           policy of requiring a special compiler directive -DALLOW_NULL
19426           to use NULL pointers is no longer supported.  While this may
19427           seem "unsafe", it turns out that you can use a "check"
19428           typemap to achieve some safety.   For example :
19429
19430                 %typemap(perl5,check) Node * {
19431                        if (!$target)
19432                             croak("NULL Pointers not allowed.");
19433                 }
19434
19435           This prevents any NULL value of a "Node *" pointer to be
19436           passed to a function.   (I think this is much cleaner
19437           than the old -DALLOW_NULL hack anyways).
19438
19439 3/19/97 : Fixed pointer handling errors in Perl5 module.  Modules no
19440           longer core dump when a Perl reference is inadvertently
19441           passed in as a C pointer.
19442
19443 3/18/97 : Added a "check" typemap.   This can be used to check the
19444           validity of function input values.  For example :
19445
19446                 %typemap(perl5,check) int posint {
19447                        if ($target < 0)
19448                            croak("Argument is not a positive integer");
19449                 }
19450
19451 3/18/97 : Added an $arg variable to Tcl typemaps.   This makes it easier
19452           to return argument values by "reference".
19453
19454 3/18/97 : Fixed a code generation bug when using C++ references and
19455           the %addmethods directive.
19456
19457 3/18/97 : Fixed a few glitches in the typemap module with respect to
19458           chaining. For example :
19459
19460                 %typemap(tcl,in) int {
19461                        $in                // Inserts prexisting typemap
19462                        printf("Received a %d\n", $target);
19463                 }
19464
19465           This has been allowed for quite some time, but didn't work
19466           if no existing typemap was defined.  Now, it still doesn't
19467           work if no existing typemap is defined, but it issues a
19468           warning message.   There is some support using default typemaps,
19469           but none of the language modules take advantage of it.  This
19470           should be considered experimental at this time.
19471
19472 Version 1.1b5 Patch 1 (March 16, 1997)
19473 ======================================
19474
19475 3/16/97 : Fixed references bug with C++ code generation.
19476
19477 3/16/97 : Fixed initialization bug in the documentation system that
19478           was causing weird problems.
19479
19480 3/16/97 : Fixed fatal bug with -c option in the Python module.
19481
19482 3/13/97 : Fixed bug in the documentation system involving the %text directive
19483           and sorting. In the old system, %text entries would float to the
19484           top of a section because they were "nameless".   Now they are
19485           attached to the previous declaration and will stay in the proper
19486           location relative to the previous entry.
19487
19488 Version 1.1b5 (March 12, 1997)
19489 ==============================
19490
19491 3/11/97 : Fixed compilation problems introduced by Tcl/Tk 8.0a2.
19492           *** INCOMPATIBILITY *** SWIG no longer works with Tcl/Tk 8.0a1.
19493
19494 3/10/97 : Fixed bug with ignored arguments and C++ member functions in
19495           the Python module.
19496
19497 3/9/97  : Parsing bugs with nested class definitions and privately
19498           declared nested class definitions fixed.
19499
19500 3/9/97  : Fixed a few minor code generation bugs with C++ classes and
19501           constructors.   In some cases, the resulting wrapper code
19502           would not compile properly.   SWIG now attempts to use
19503           the default copy constructor instead.
19504
19505 3/8/97  : Added a -l option to SWIG that allows additional SWIG library files
19506           to be grabbed without having them specified in the interface file.
19507           This makes it easier to keep the interface file clean and move certain
19508           options into a Makefile.   For example :
19509
19510               swig -tcl example.i              #  Build a normal Tcl extension
19511               swig -tcl -lwish.i example.i     #  Build it as a wish extension
19512                                                #  by including the 'wish.i' file.
19513
19514               swig -python example.i           # Build a dynamically loaded extension
19515               swig -python -lembed.i example.i # Build a static extension
19516
19517           These kinds of options could previously be accomplished with
19518           conditional compilation such as :
19519
19520                    %module example
19521                    ...
19522                    #ifdef STATIC
19523                    %include embed.i
19524                    #endif
19525
19526 3/8/97  : Incorporated changes to Guile module to use the new gh interface
19527           in FSF Guile 1.0.    The older gscm interface used in Cygnus
19528           Guile releases is no longer supported by SWIG.
19529
19530 3/8/97  : Cleaned up the Tcl Netscape plugin example.   It should work with
19531           version 1.1 of the plugin now.
19532
19533 3/8/97  : Added better array support to the typemap module.  The keyword
19534           ANY can now be used to match any array dimension.  For example :
19535
19536                     %typemap(tcl,in) double [ANY] {
19537                            ... get an array ...
19538                     }
19539
19540           This will match any single-dimensional double array.   The array
19541           dimension is passed in the variables $dim0, $dim1, ... $dim9.  For
19542           example :
19543
19544                     %typemap(tcl,in) double [ANY][ANY][ANY] {
19545                         printf("Received a double[%d][%d][%d]\n",$dim0,$dim1,$dim2);
19546                     }
19547
19548           Any typemap involving a specific array dimension will override any
19549           specified with the ANY tag.  Thus, a %typemap(tcl,in) double [5][4][ANY] {}
19550           would override a double [ANY][ANY][ANY].  However, overuse of the ANY
19551           tag in arrays of high-dimensions may not work as you expect due to
19552           the pattern matching rule used. For example, which of the following
19553           typemaps has precedence?
19554
19555                       %typemap(in) double [ANY][5] {}     // Avoid this!
19556                       %typemap(in) double [5][ANY] {}
19557
19558 3/7/97  : Fixed a number of bugs related to multi-dimensional array handling.
19559           Typedefs involving multi-dimensional arrays now works correctly.
19560           For example :
19561
19562                     typedef double MATRIX[4][4];
19563
19564                     ...
19565                     extern double foo(MATRIX a);
19566
19567           Typecasting of pointers into multi-dimensional arrays is now
19568           implemented properly when making C/C++ function calls.
19569
19570 3/6/97  : Fixed potentially dangerous bug in the Tcl Object-oriented
19571           interface.  Well, actually, didn't fix it but issued a
19572           Tcl error instead.   The bug would manifest itself as follows:
19573
19574                  % set l [List]           # Create an object
19575                  ...
19576                  % set m [List -this $l]  # Make $m into an object assuming $l
19577                                           # contains a pointer.
19578                                           # Since $m == $l, $l gets destroyed
19579                                           # (since its the same command name)
19580                  % $m insert Foo
19581                  Segmentation fault       # Note : the list no longer exists!
19582
19583           Now, an error will be generated instead of redefining the command.
19584           As in :
19585
19586                  % set l [List]
19587                  ...
19588                  % set m [List -this $l]
19589                  Object name already exists!
19590
19591           Use catch{} to ignore the error.
19592
19593 3/3/97  : Better support for enums added.   Datatypes of 'enum MyEnum'
19594           and typedefs such as 'typedef enum MyEnum Foo;' now work.
19595
19596 3/3/97  : Parser modified to ignore constructor initializers such as :
19597
19598                class Foo : public Bar {
19599                int a,b;
19600                public:
19601                      Foo(int i) : a(0), b(i), Bar(i,0) { };
19602                };
19603
19604 3/3/97  : Modified parser to ignore C++ exception specifications such as :
19605
19606                int foo(double) throw(X,Y);
19607
19608 3/3/97  : Added %import directive.  This works exactly like %extern
19609           except it tells the language module that the declarations are
19610           coming from a separate module.   This is usually only
19611           needed when working with shadow classes.
19612
19613 3/2/97  : Changed pointer type-checker to be significantly more
19614           efficient when working with derived datatypes.  This
19615           has been accomplished by storing type-mappings in sorted
19616           order, using binary search schemes, and caching recently
19617           used datatypes.   For SWIG generated C++ modules that
19618           make a large number of C function calls with derived types,
19619           this could result in speedups of between 100 and 50000 percent.
19620           However, due to the required sorting operation, module
19621           loading time may increased slightly when there are lots of
19622           datatypes.
19623
19624 3/2/97  : Fixed some C++ compilation problems with Python
19625           embed.i library files.
19626
19627 2/27/97 : Slight change to C++ code generation to use copy constructors
19628           when returning complex data type by value.
19629
19630 2/26/97 : Fixed bug in Python module with -c option.
19631
19632 2/26/97 : Slight tweak of parser to allow trailing comma in enumerations
19633           such as
19634
19635                 enum Value (ALE, STOUT, LAGER, };
19636
19637 2/25/97 : Fixed code generation bug in Tcl module when using the
19638           %name() directive on a classname.
19639
19640 2/25/97 : Finished code-size optimization of C++ code generation with
19641           inheritance of attributes.    Inherited attributes now
19642           only generate one set of wrapper functions that are re-used
19643           in any derived classes.   This could provide big code
19644           size improvements in some scripting language interfaces.
19645
19646 2/25/97 : Perl5 module modified to support both the Unix and Windows
19647           versions.  The windows version has been tested with the
19648           Activeware port of Perl 5.003 running under Windows 95.
19649           The C source generated by SWIG should compile without
19650           modification under both versions of Perl, but is now
19651           even more hideous than before.
19652
19653 2/25/97 : Modified parser to allow scope resolution operation to
19654           appear in expressions and default arguments as in :
19655
19656                 void foo(int a =  Bar::defvalue);
19657
19658 2/25/97 : Fixed bug when resolving symbols inside C++ classes.
19659           For example :
19660
19661                class Foo {
19662                public:
19663                    enum Value {ALE, STOUT, LAGER};
19664                    ...
19665                    void defarg(Value v = STOUT);
19666
19667               };
19668
19669 2/24/97 : Fixed bug with member functions returning void *.
19670
19671 2/23/97 : Modified Python module to be better behaved under Windows
19672
19673             -  Module initialization function is now properly exported.
19674                It should not be neccessary to explicitly export this function
19675                yourself.
19676
19677             -  Bizarre compilation problems when compiling the SWIG wrapper
19678                code as ANSI C under Visual C++ 4.x fixed.
19679
19680             -  Tested with both the stock Python-1.4 distribution and Pythonwin
19681                running under Win95.
19682
19683 2/19/97 : Fixed typedef handling bug in Perl5 shadow classes.
19684
19685 2/19/97 : Added exception support.  To use it, do the following :
19686
19687               %except(lang) {
19688                   ... try part of the exception ...
19689                   $function
19690                   ... catch part of exception ...
19691               }
19692
19693           $function is a SWIG variable that will be replaced by the
19694           actual C/C++ function call in a wrapper function.  Thus,
19695           a real exception specification might look like this :
19696
19697              %except(perl5) {
19698                   try {
19699                   $function
19700                   } catch (char *& sz) {
19701                     ... process an exception ...
19702                   } catch(...) {
19703                     croak("Unknown exception. Bailing out...");
19704                   }
19705              }
19706
19707 2/19/97 : Added support for managing generic code fragments (needed
19708           for exceptions).
19709
19710 2/19/97 : Fixed some really obscure typemap scoping bugs in the C++
19711           handler.
19712
19713 2/18/97 : Cleaned up perlmain.i file by removing some problematic,
19714           but seemingly unnecessary declarations.
19715
19716 2/18/97 : Optimized handling of member functions under inheritance.
19717           SWIG can now use wrapper functions generated for a
19718           base class instead of regenerating wrappers for
19719           the same functions in a derived class.    This could
19720           make a drastic reduction in wrapper code size for C++
19721           applications with deep inheritance hierarchies and
19722           lots of functions.
19723
19724 2/18/97 : Additional methods specified with %addmethods can now
19725           be inherited along with normal C++ member functions.
19726
19727 2/18/97 : Minor internal fixes to make SWIG's string handling a little
19728           safer.
19729
19730 2/16/97 : Moved some code generation of Tcl shadow classes to
19731           library files.
19732
19733 2/16/97 : Fixed documentation error of '-configure' method in
19734           Tcl modules.
19735
19736 2/16/97 : Modified Perl5 module slightly to allow typemaps
19737           to use Perl references.
19738
19739 2/12/97 : Fixed argument checking bug that was introduced by
19740           default arguments (function calls with too many
19741           arguments would still be executed).  Functions now
19742           must have the same number of arguments as C version
19743           (with possibility of default/optional arguments
19744           still supported).
19745
19746 2/12/97 : Fixed default argument bug in Perl5 module when
19747           generating wrapper functions involving default
19748           arguments of complex datatypes.
19749
19750 2/12/97 : Fixed typemap scoping problems.  For example :
19751
19752               %typemap(tcl,in) double {
19753                     .. get a double ..
19754               }
19755
19756               class Foo {
19757               public:
19758                    double bar(double);
19759               }
19760
19761               %typemap(tcl,in) double {
19762                     .. new get double ..
19763               }
19764
19765           Would apply the second typemap to all functions in Foo
19766           due to delayed generation of C++ wrapper code (clearly this
19767           is not the desired effect).   Problem has been fixed by
19768           assigning unique numerical identifiers to every datatype in
19769           an interface file and recording the "range of effect" of each
19770           typemap.
19771
19772 2/11/97 : Added support for "ignore" and "default" typemaps.  Only use
19773           if you absolutely know what you're doing.
19774
19775 2/9/97  : Added automatic creation of constructors and destructors for
19776           C structs and C++ classes that do not specify any sort of
19777           constructor or destructor.   This feature can be enabled by
19778           running SWIG with the '-make_default' option or by inserting
19779           the following pragma into an interface file :
19780
19781                  %pragma make_default
19782
19783           The following pragma disables automatic constructor generation
19784
19785                  %pragma no_default
19786
19787 2/9/97  : Added -make_default option for producing default constructors
19788           and destructors for classes without them.
19789
19790 2/9/97  : Changed the syntax of the SWIG %pragma directive to
19791           %pragma option=value or %pragma(lang) option=value.
19792           This change makes the syntax a little more consistent
19793           between general pragmas and language-specific pragmas.
19794           The old syntax still works, but will probably be phased
19795           out (a warning message is currently printed).
19796
19797 2/9/97  : Improved Tcl support of global variables that are of
19798           structures, classes, and unions.
19799
19800 2/9/97  : Fixed C++ compilation problem in Python 'embed.i' library file.
19801
19802 2/9/97  : Fixed missing return value in perlmain.i library file.
19803
19804 2/9/97  : Fixed Python shadow classes to return an AttributeError when
19805           undefined attributes are accessed (older versions returned
19806           a NameError).
19807
19808 2/9/97  : Fixed bug when %addmethods is used after a class definition whose
19809           last section is protected or private.
19810
19811 2/8/97  : Made slight changes in include file processing to support
19812           the Macintosh.
19813
19814 2/8/97  : Extended swigmain.cxx to provide a rudimentary Macintosh interface.
19815           It's a really bad interface, but works until something better
19816           is written.
19817
19818 1/29/97 : Fixed type-casting bug introduced by 1.1b4 when setting/getting the
19819           value of global variables involving complex data types.
19820
19821 1/29/97 : Removed erroneous white space before an #endif in the code generated
19822           by the Python module (was causing errors on DEC Alpha compilers).
19823
19824 1/26/97 : Fixed errors when using default/optional arguments in Python shadow
19825           shadow classes.
19826
19827 1/23/97 : Fixed bug with nested %extern declarations.
19828
19829 1/21/97 : Fixed problem with typedef involving const datatypes.
19830
19831 1/21/97 : Somewhat obscure, but serious bug with having multiple levels
19832           of typedefs fixed.  For example :
19833
19834                 typedef char *String;
19835                 typedef String  Name;
19836
19837 Version 1.1 Beta4 (January 16, 1997)
19838 ====================================
19839
19840 Note : SWIG 1.1b3 crashed and burned shortly after take off due
19841 to a few major run-time problems that surfaced after release.
19842 This release should fix most, if not all, of those problems.
19843
19844 1/16/97 : Fixed major memory management bug on Linux
19845
19846 1/14/97 : Fixed bug in functions returning constant C++ references.
19847
19848 1/14/97 : Modified C++ module to handle datatypes better.
19849
19850 1/14/97 : Modified parser to allow a *single* scope resolution
19851           operator in datatypes.  Ie : Foo::bar.   SWIG doesn't
19852           yet handle nested classes, so this should be
19853           sufficient for now.
19854
19855 1/14/97 : Modified parser to allow typedef inside a C++ class.
19856
19857 1/14/97 : Fixed some problems related to datatypes defined inside
19858           a C++ class.  SWIG was not generating correct code,
19859           but a new scoping mechanism and method for handling
19860           datatypes inside a C++ class have been added.
19861
19862 1/14/97 : Changed enumerations to use the value name instead
19863           of any values that might have appeared in the interface
19864           file.  This makes the code a little more friendly to
19865           C++ compilers.
19866
19867 1/14/97 : Removed typedef bug that made all enumerations
19868           equivalent to each other in the type checker (since
19869           it generated alot of unnecessary code).
19870
19871 Version 1.1 Beta3 (January 9, 1997)
19872 ===================================
19873
19874 Note : A *huge* number of changes related to ongoing modifications.
19875
19876 1.  Support for C++ multiple inheritance added.
19877
19878 2.  Typemaps added.
19879
19880 3.  Some support for nested structure definitions added.
19881
19882 4.  Default argument handling added.
19883
19884 5.  -c option added for building bare wrapper code modules.
19885
19886 6.  Rewrote Pointer type-checking to support multiple inheritance
19887     correctly.
19888
19889 7.  Tcl 8.0 module added.
19890
19891 8.  Perl4 and Guile modules resurrected from the dead (well, they
19892     at least work again).
19893
19894 9.  New Object Oriented Tcl interface added.
19895
19896 10. Bug fixes to Perl5 shadow classes.
19897
19898 11. Cleaned up many of the internal modules of the parser.
19899
19900 12. Tons of examples and testing modules added.
19901
19902 13. Fixed bugs related to use of "const" return values.
19903
19904 14. Fixed bug with C++ member functions returning void *.
19905
19906 15. Changed SWIG configuration script.
19907
19908 Version 1.1 Beta2 (December 3, 1996)
19909 ====================================
19910
19911 1. Completely rewrote the SWIG documentation system.  The changes
19912    involved are too numerous to mention.  Basically, take everything
19913    you knew about the old system, throw them out, and read the
19914    file Doc/doc.ps.
19915
19916 2. Limited support for #if defined() added.
19917
19918 3. Type casts are now allowed in constant expressions.  ie
19919
19920          #define  A   (int) 3
19921
19922 4. Added support for typedef lists.  For example :
19923
19924         typedef struct {
19925                 double x,y,z;
19926         } Vector, *VectorPtr;
19927
19928 5. New SWIG directives (related to documentation system)
19929
19930         %style
19931         %localstyle
19932         %subsection
19933         %subsubsection
19934
19935 6. Reorganized the C++ handling and made it a little easier to
19936    work with internally.
19937
19938 7.  Fixed problem with inheriting data members in Python
19939     shadow classes.
19940
19941 8.  Fixed symbol table problems with shadow classes in both
19942     Python and Perl.
19943
19944 9.  Fixed annoying segmentation fault bug in wrapper code
19945     generated for Perl5.
19946
19947 10. Fixed bug with %addmethods directive.  Now it can be placed
19948     anywhere in a class.
19949
19950 11. More test cases added to the SWIG self-test.   Documentation
19951     tests are now performed along with other things.
19952
19953 12. Reorganized the SWIG library a little bit and set it up to
19954     self-document itself using SWIG.
19955
19956 13. Lots and lots of minor bug fixes (mostly obscure, but bugs
19957     nonetheless).
19958
19959
19960 Version 1.1 Beta1 (October 30, 1996)
19961 ====================================
19962
19963 1. Added new %extern directive for handling multiple files
19964
19965 2. Perl5 shadow classes added
19966
19967 3. Rewrote conditional compilation to work better
19968
19969 4. Added 'bool' datatype
19970
19971 5. %{,%} block is now optional.
19972
19973 6. Fixed some bugs in the Python shadow class module
19974
19975 7. Rewrote all of the SWIG tests to be more informative
19976    (and less scary).
19977
19978 8. Rewrote parameter list handling to be more memory
19979    efficient and flexible.
19980
19981 9. Changed parser to ignore 'static' declarations.
19982
19983 10. Initializers are now ignored.  For example :
19984
19985         struct FooBar a = {3,4,5};
19986
19987 11. Somewhat better parsing of arrays (although it's
19988     usually just a better error message now).
19989
19990 12. Lot's of minor bug fixes.
19991
19992
19993 Version 1.0 Final (August 31, 1996)
19994 ===================================
19995
19996 1. Fixed minor bug in C++ module
19997
19998 2. Fixed minor bug in pointer type-checker when using
19999    -DALLOW_NULL.
20000
20001 3. Fixed configure script to work with Python 1.4beta3
20002
20003 4. Changed configure script to allow compilation without
20004    yacc or bison.
20005
20006 Version 1.0 Final (August 28, 1996)
20007 ===================================
20008
20009 1.  Changed parser to support more C/C++ datatypes (well,
20010     more variants).   Types like "unsigned", "short int",
20011     "long int", etc... now work.
20012
20013 2.  "unions" added to parser.
20014
20015 3.  Use of "typedef" as in :
20016
20017         typedef struct {
20018              double x,y,z;
20019         } Vector;
20020
20021     Now works correctly.   The name of the typedef is used as
20022     the structure name.
20023
20024 4.  Conditional compilation with #ifdef, #else, #endif, etc...
20025     added.
20026
20027 5.  New %disabledoc, %enabledoc directives allow documentation
20028     to selectively be disabled for certain parts of a wrapper
20029     file.
20030
20031 6.  New Python module supports better variable linking, constants,
20032     and shadow classes.
20033
20034 7.  Perl5 module improved with better compatibility with XS
20035     and xsubpp.   SWIG pointers and now created so that they
20036     are compatible with xsubpp pointers.
20037
20038 8.  Support for [incr Tcl] namespaces added to Tcl module.
20039
20040 9.  %pragma directive added.
20041
20042 10. %addmethods directive added.
20043
20044 11. %native directive added to allow pre-existing wrapper functions
20045     to be used.
20046
20047 12. Wrote configure script for SWIG installation.
20048
20049 13. Function pointers now allowed with typedef statements.
20050
20051 14. %typedef modified to insert a corresponding C typedef into
20052     the output file.
20053
20054 15. Fixed some problems related to C++ references.
20055
20056 16. New String and WrapperFunction classes add to make generating
20057     wrapper code easier.
20058
20059 17. Fixed command line option processing to eliminate core dumps
20060     and to allow help messages.
20061
20062 18. Lot's of minor bug fixes to almost all code modules
20063
20064
20065 Version 1.0 Beta 3 (Patch 1) July 17, 1996
20066 ==========================================
20067
20068 1.0 Final is not quite ready yet, but this release fixes a
20069 number of immediate problems :
20070
20071 1.  Compiler errors when using -strict 1 type checking have been fixed.
20072
20073 2.  Pointer type checker now recognizes pointers of the form
20074     _0_Type correctly.
20075
20076 3.  A few minor fixes were made in the Makefile
20077
20078 Version 1.0 Beta 3 (June 14, 1996)
20079 ==================================
20080
20081
20082 There are lots of changes in this release :
20083
20084 1.  SWIG is now invoked using the "swig" command instead of "wrap".
20085     Hey, swig sounds cooler.
20086
20087 2.  The SWIG_LIB environment variable can be set to change the
20088     location where SWIG looks for library files.
20089
20090 3.  C++ support has been added.   You should use the -c++ option
20091     to enable it.
20092
20093 4.  The %init directive has been replaced by the %module directive.
20094     %module constructs a valid name for the initialization function
20095     for whatever target language you're using (actually this makes
20096     SWIG files a little cleaner).  The old %init directive still works.
20097
20098 5.  The syntax of the %name directive has been changed.   Use of the
20099     old one should generate a warning message, but may still work.
20100
20101 6.  To support Tcl/Tk on non-unix platforms, SWIG imports a file called
20102     swigtcl.cfg from the $(SWIG_LIB)/tcl directory.   I don't have access
20103     to an NT machine, but this file is supposedly allows SWIG to
20104     produce wrapper code that compiles on both UNIX and non UNIX machines.
20105     If this doesn't work, you'll have to edit the file swigtcl.cfg. Please
20106     let me know if this doesn't work so I can update the file as
20107     necessary.
20108
20109 7.  The SWIG run-time typechecker has been improved.    You can also
20110     now redefine how it works by supplying a file called "swigptr.cfg"
20111     in the same directory as your SWIG interface files.   By default,
20112     SWIG reads this file from $(SWIG_LIB)/config.
20113
20114 8.  The documentation system has been changed to support the following :
20115
20116         -  Documentation order is printed in interface file order by
20117            default.   This can be overridden by putting an %alpha
20118            directive in the beginning of the interface file.
20119
20120         -  You can supply additional documentation text using
20121
20122            %text %{ put your text here %}
20123
20124         -  A few minor bugs were fixed.
20125
20126 9.  A few improvements have been made to the handling of command line
20127     options (but it's still not finished).
20128
20129 10.  Lots of minor bug fixes in most of the language modules have been
20130      made.
20131
20132 11. Filenames have been changed to 8.3 for compatibility with a SWIG
20133     port to non-unix platforms (work in progress).
20134
20135 12. C++ file suffix is now .cxx (for same reason).
20136
20137 13. The documentation has been upgraded significantly and is now
20138     around 100 pages.    I added new examples and a section on
20139     C++.  The documentation now includes a Table of Contents.
20140
20141 14. The SWIG Examples directory is still woefully sparse, but is
20142     getting better.
20143
20144 Special notice about C++
20145 ------------------------
20146 This is the first version of SWIG to support C++ parsing.  Currently
20147 the C++ is far from complete, but seems to work for simple cases.
20148 No work has been done to add special C++ processing to any of
20149 the target languages.   See the user manual for details about how
20150 C++ is handled.   If you find problems with the C++ implementation,
20151 please let me know.  Expect major improvements in this area.
20152
20153 Note : I have only successfully used SWIG and C++ with Tcl and
20154 Python.
20155
20156 Notice about Version 1.0Final
20157 -----------------------------
20158
20159 Version 1.0B3 is the last Beta release before version 1.0 Final is
20160 released.  I have frozen the list of features supported in version 1.0
20161 and will only fix bugs as they show up.  Work on SWIG version 2.0 is
20162 already in progress, but is going to result in rather significant
20163 changes to SWIG's internal structure (hopefully for the better).  No
20164 anticipated date for version 2.0 is set, but if you've got an idea,
20165 let me know.
20166
20167 Version 1.0 Beta 2 (April 26, 1996)
20168 ===================================
20169
20170 This release is identical to Beta1 except a few minor bugs are
20171 fixed and the SWIG library has been updated to work with Tcl 7.5/Tk 4.1.
20172 A tcl7.5 examples directory is now included.
20173
20174 - Fixed a bug in the Makefile that didn't install the libraries
20175   correctly.
20176
20177 - SWIG Library files are now updated to work with Tcl 7.5 and Tk 4.1.
20178
20179 - Minor bug fixes in other modules.
20180
20181
20182 Version 1.0 Beta 1  (April 10, 1996).
20183 =====================================
20184
20185 This is the first "semi-official" release of SWIG.    It has a
20186 number of substantial improvements over the Alpha release.   These
20187 notes are in no particular order--hope I remembered everything....
20188
20189 1.  Tcl/Tk
20190
20191 SWIG is known to work with Tcl7.3, Tk3.6 and later versions.
20192 I've also tested SWIG with expect-5.19.
20193
20194 Normally SWIG expects to use the header files "tcl.h" and "tk.h".
20195 Newer versions of Tcl/Tk use version numbers.   You can specify these
20196 in SWIG as follows :
20197
20198         % wrap -htcl tcl7.4.h -htk tk4.0.h example.i
20199
20200 Of course, I prefer to simply set up symbolic links between "tcl.h" and
20201 the most recent stable version on the machine.
20202
20203 2.  Perl4
20204
20205 This implementation has been based on Perl-4.035.  SWIG's interface to
20206 Perl4 is based on the documentation provided in the "Programming Perl"
20207 book by Larry Wall, and files located in the "usub" directory of the
20208 Perl4 distribution.
20209
20210 In order to compile with Perl4, you'll need to link with the uperl.o
20211 file found in the Perl4 source directory.  You may want to move this
20212 file to a more convenient location.
20213
20214 3.  Perl5
20215
20216 This is a somewhat experimental implementation, but is alot less
20217 buggy than the alpha release.     SWIG operates independently of
20218 the XS language and xsubpp supplied with Perl5.  Currently SWIG
20219 produces the necessary C code and .pm file needed to dynamically
20220 load a module into Perl5.
20221
20222 To support Perl5's notion of modules and packages (as with xsubpp),
20223 you can use the following command line options :
20224
20225         % wrap -perl5 -module MyModule -package MyPackage example.i
20226
20227 Note : In order for dynamic loading to be effective, you need to be
20228 careful about naming.    For a module named "MyModule", you'll need to
20229 create a shared object file called "MyModule.so" using something like
20230
20231         % ld -shared my_obj.o -o MyModule.so
20232
20233 The use of the %init directive must match the module name since Perl5
20234 calls a function "boot_ModuleName" in order to initialize things.
20235 See the Examples directory for some examples of how to get things
20236 to work.
20237
20238 4.  Python1.3
20239
20240 This is the first release supporting Python.    The Python port is
20241 experimental and may be rewritten.   Variable linkage is done through
20242 functions which is sort of a kludge.  I also think it would be nice
20243 to import SWIG pointers into Python as a new object (instead of strings).
20244 Of course, this needs a little more work.
20245
20246 5.  Guile3
20247
20248 If you really want to live on the edge, pick up a copy of Guile-iii and
20249 play around with this.      This is highly experimental---especially since
20250 I'm not sure what the official state of Guile is these days.  This
20251 implementation may change at any time should I suddenly figure out better
20252 ways to do things.
20253
20254 6.  Extending SWIG
20255
20256 SWIG is written in C++ although I tend to think of the code as mostly
20257 being ANSI C with a little inheritance thrown in.   Each target language
20258 is implemented as a C++ class that can be plugged into the system.
20259 If you want to add your own modifications, see Appendix C of the user
20260 manual.   Then take a look at the "user" directory which contains some
20261 code for building your own extenions.
20262
20263 7. The SWIG library
20264
20265 The SWIG library is still incomplete.  Some of the files mentioned in
20266 the user manual are unavailable.    These files will be made available
20267 when they are ready.   Subscribe to the SWIG mailing list for announcements
20268 and updates.
20269
20270 8. SWIG Documentation
20271
20272 I have sometimes experienced problems viewing the SWIG documentation in
20273 some postscript viewers.   However, the documentation seems to print
20274 normally.    I'm working on making much of the documentation online,
20275 but this takes time.
20276
20277 Version 0.1 Alpha (February 9, 1996)
20278 ====================================
20279
20280 1.  Run-time type-checking of SWIG pointers.   Pointers are now represented
20281     as strings with both numeric and encoded type information.    This makes
20282     it a little harder to shoot yourself in the foot (and it eliminates
20283     some segmentation faults and other oddities).
20284
20285 2.  Python 1.3 now supported.
20286
20287 3.  #define and enum can be used to install constants.
20288
20289 4.  Completely rewrote the %include directive and made it alot more powerful.
20290
20291 5.  Restructured the SWIG library to make it work better.
20292
20293 6.  Various bug fixes to Tcl, Perl4, Perl5, and Guile implementations.
20294
20295 7.  Better implementation of %typedef directive.
20296
20297 8.  Made some changes to SWIG's class structure to make it easier to expand.
20298     SWIG is now built into a library file that you can use to make your
20299     own extenions.
20300
20301 9.  Made extensive changes to the documentation.
20302
20303 10. Minor changes to the SWIG parser to make it use less memory.
20304     Also took out some extraneous rules that were undocumented and
20305     didn't work in the first place.
20306
20307 11. The SWIG library files "tclsh", "wish", "expect", etc... in the first
20308     release have been restructured and renamed to "tclsh.i", "wish.i",
20309     and so on.