swig/Source/Modules
Vadim Zeitlin 10d25c7327 Drop longjmp-based exception handling approach
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.
2016-09-15 01:27:40 +02:00
..
allegrocl.cxx Fix assertion for some languages when wrapping a C++11 enum class that is private in a class. 2016-03-31 20:27:36 +01:00
allocate.cxx Re-organization of the interface feature common code 2016-03-03 08:55:20 +00:00
browser.cxx Add lambda functions to the symbol tables and add ability to suppress lambda warnings. 2013-02-04 20:05:34 +00:00
c.cxx Drop longjmp-based exception handling approach 2016-09-15 01:27:40 +02:00
cffi.cxx Fix assertion for some languages when wrapping a C++11 enum class that is private in a class. 2016-03-31 20:27:36 +01:00
chicken.cxx Prevent redefinition warnings when compiling with SWIG<module> defined 2015-12-22 14:33:21 +02:00
clisp.cxx Fix assertion for some languages when wrapping a C++11 enum class that is private in a class. 2016-03-31 20:27:36 +01:00
contract.cxx Cosmetics/code beautification of nested class support 2013-11-29 07:29:58 +00:00
csharp.cxx Merge branch 'char-escaping' 2016-03-12 23:27:51 +00:00
d.cxx Merge branch 'char-escaping' 2016-03-12 23:27:51 +00:00
directors.cxx Add support for thread_local when specified with other legitimate storage class specifiers - extern and static 2013-02-08 06:36:39 +00:00
emit.cxx Remove cvs/svn Id strings 2013-01-12 01:21:16 +00:00
go.cxx Fix assertion for some languages when wrapping a C++11 enum class that is private in a class. 2016-03-31 20:27:36 +01:00
guile.cxx Prevent redefinition warnings when compiling with SWIG<module> defined 2015-12-22 14:33:21 +02:00
interface.cxx Interface feature fix for typedef types 2016-03-07 21:42:27 +00:00
java.cxx Merge branch 'char-escaping' 2016-03-12 23:27:51 +00:00
javascript.cxx Cosmetic corrections - Mac OS X 2015-08-02 20:14:20 +01:00
lang.cxx Fix assertion for some languages when wrapping a C++11 enum class that is private in a class. 2016-03-31 20:27:36 +01:00
lua.cxx Fix assertion for some languages when wrapping a C++11 enum class that is private in a class. 2016-03-31 20:27:36 +01:00
main.cxx Warning fixes for 64bit visual c++ on Windows 2015-07-03 20:59:24 +01:00
modula3.cxx Multiple inheritance warning wording tweak 2016-03-06 10:45:39 +00:00
module.cxx Remove cvs/svn Id strings 2013-01-12 01:21:16 +00:00
mzscheme.cxx Prevent redefinition warnings when compiling with SWIG<module> defined 2015-12-22 14:33:21 +02:00
nested.cxx Fix segmentation fault when top==NULL 2015-02-26 14:57:19 +13:00
ocaml.cxx Fix assertion for some languages when wrapping a C++11 enum class that is private in a class. 2016-03-31 20:27:36 +01:00
octave.cxx Prevent redefinition warnings when compiling with SWIG<module> defined 2015-12-22 14:33:21 +02:00
overload.cxx Clearer warning message for badly constructed typecheck typemaps 2015-04-14 07:34:40 +01:00
perl5.cxx Prevent redefinition warnings when compiling with SWIG<module> defined 2015-12-22 14:33:21 +02:00
php.cxx Merge branch 'char-escaping' 2016-03-12 23:27:51 +00:00
pike.cxx Prevent redefinition warnings when compiling with SWIG<module> defined 2015-12-22 14:33:21 +02:00
python.cxx Merge branch 'ahnolds-py_gettar' 2016-04-02 18:06:03 +01:00
r.cxx Fix assertion for some languages when wrapping a C++11 enum class that is private in a class. 2016-03-31 20:27:36 +01:00
README File move 2002-12-03 20:33:35 +00:00
ruby.cxx Multiple inheritance warning wording tweak 2016-03-06 10:45:39 +00:00
s-exp.cxx Remove cvs/svn Id strings 2013-01-12 01:21:16 +00:00
scilab.cxx scilab: fix builder for scilab 6.0 (empty matrix error) 2016-03-02 05:14:44 -05:00
swigmain.cxx Merge branch 'master' into C 2016-04-08 17:29:16 +02:00
swigmod.h Add checks for interface name symbol clashes 2016-03-03 22:48:35 +00:00
tcl8.cxx Prevent redefinition warnings when compiling with SWIG<module> defined 2015-12-22 14:33:21 +02:00
typepass.cxx %shared_ptr support improvements for classes in an inheritance chain 2015-10-01 22:36:01 +01:00
uffi.cxx Eliminate needless casting away const from string constants 2014-04-30 12:00:23 +12:00
utils.cxx Remove cvs/svn Id strings 2013-01-12 01:21:16 +00:00
xml.cxx Remove cvs/svn Id strings 2013-01-12 01:21:16 +00:00

06/25/2002

This directory contains all of the SWIG language modules.  Many of these
modules contain code that dates back to SWIG1.0.  The module API has changed
a lot in the development releases so this is fairly messy.  We're working on
cleaning it up, but you'll have to bear with us until it's done.

-- Dave