Using longjmp was incompatible with using C++ objects in the code using the wrappers, and using this C API from C++ to avoid ABI incompatibilities between different C++ compilers is one of the main reasons for using this module. Also, this required using a separate SwigObj instead of just using the real object pointer which inevitably resulted in memory leaks whenever a non owned object was returned from anywhere, e.g. from a member accessor or any method returning pointer or reference. Abandon the attempts to recreate C++ exceptions in C and just use a very simple approach allowing to pass an error message out of band after any function call in a global variable. An alternative could be to add a special "out" error parameter to each and every function, but this risked being too verbose, especially for the functions which don't really throw, and the calls to SWIG_PendingException_get() won't need to be made explicitly when using a C++ wrapper around the generated C API in the future. This simplifies both the module and the generated code, in particular we don't need any runtime code at all any more and there is no need for an extra level of indirection for every object. It also makes a couple more tests pass. |
||
|---|---|---|
| .. | ||
| CParse | ||
| DOH | ||
| Include | ||
| Modules | ||
| Preprocessor | ||
| Swig | ||
| Makefile.am | ||
| README | ||
SWIG Source directory
Source/DOH - A core set of basic datatypes including
strings, lists, hashes, and files. Used
extensively by the rest of SWIG.
Source/Swig - Swig core. Type-system, utility functions.
Source/Preprocessor - SWIG C Preprocessor
Source/CParse - SWIG C Parser (still messy)
Source/Modules - Language modules.
Source/Include - Include files.
Historic directories which may be in CVS, but have been removed:
Source/Modules1.1 - Old SWIG-1.1 modules. Empty.
Source/LParse - Experimental parser. Officially dead
as CParse is more capable.
Source/SWIG1.1 - Old SWIG1.1 core. Completely empty now.