swig/Source/Modules
Vadim Zeitlin 727a65c0e8 Fix using exception in modules importing other modules
Ensure that we have only a single SWIG_CException_Raise() function
across all modules instead of having per-module functions and, worse,
per-module PendingException variables, which resulted in compile-time
errors and couldn't work anyhow because function checking for the
current exception didn't necessarily use the same "global" variable
where it was stored. More formally, old version resulted in ODR
violations and undefined behaviour.

The way we avoid it now is rather ugly and consists in excluding
SWIG_CException from wrapping using the hack in the source code which
postpones wrapping this class until the very end and checks if we had
encountered any %import directives and simply doesn't wrap it if we did.

The same code is used to define the special SWIG_CException_DEFINED
preprocessor symbol which is then used in the generated code to prevent
the SWIG_CException class declaration from being compiled as part of the
wrapper too (because this still happens due to %inline being used for
its definition, and there doesn't seem to be any better way to avoid
this).

This is definitely not pretty, but at least adding "throw(char*)" to a
couple of functions in mod_[ab].i test suite files works now instead of
failing (even without linking and running) as before. This commit
doesn't modify the test suite to avoid possible problems with the other
languages, however.
2021-11-27 00:19:05 +01:00
..
allocate.cxx Misc. typos 2018-05-17 10:04:23 -04: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 Fix using exception in modules importing other modules 2021-11-27 00:19:05 +01:00
cffi.cxx Remove bogus reference to allegrocl:old-sym:name 2021-05-13 10:41:01 +12:00
contract.cxx Cosmetics/code beautification of nested class support 2013-11-29 07:29:58 +00:00
csharp.cxx Remove support for $source and $target 2021-04-30 10:20:14 +12:00
d.cxx Add some comments about shared_ptr upcast code 2020-01-24 19:46:39 +00:00
directors.cxx Merge branch 'director-return-const-pointer' 2020-10-07 22:26:25 +01:00
emit.cxx Remove support for $source and $target 2021-04-30 10:20:14 +12:00
go.cxx swig -go: improve _cgo_panic implementation 2021-09-16 10:29:48 -07:00
guile.cxx Remove support for $source and $target 2021-04-30 10:20:14 +12:00
interface.cxx Fix seg fault with %interface and using declarations 2017-08-21 18:34:51 +01:00
java.cxx Remove support for $source and $target 2021-04-30 10:20:14 +12:00
javascript.cxx Fix more "allows to" and other typos 2021-04-21 15:54:46 +12:00
lang.cxx Use SWIG-specific suffix for non-overloaded %extend functions too 2021-11-10 00:53:39 +01:00
lua.cxx Remove support for $source and $target 2021-04-30 10:20:14 +12:00
main.cxx escape phony targets as well 2020-06-04 12:24:08 +02:00
mzscheme.cxx Remove support for $source and $target 2021-04-30 10:20:14 +12:00
nested.cxx Fix segmentation fault when top==NULL 2015-02-26 14:57:19 +13:00
ocaml.cxx Remove support for $source and $target 2021-04-30 10:20:14 +12:00
octave.cxx Remove support for $source and $target 2021-04-30 10:20:14 +12:00
overload.cxx Fix ODR violations 2021-09-20 15:04:51 +12:00
perl5.cxx Remove support for $source and $target 2021-04-30 10:20:14 +12:00
php.cxx Replace remaining PHP errors with PHP exceptions 2021-05-26 09:39:43 +12:00
python.cxx Fix ODR violations 2021-09-20 15:04:51 +12:00
r.cxx Fix ODR violations 2021-09-20 15:04:51 +12:00
README File move 2002-12-03 20:33:35 +00:00
ruby.cxx Fix ODR violations 2021-09-20 15:04:51 +12:00
scilab.cxx Remove support for $source and $target 2021-04-30 10:20:14 +12:00
swigmain.cxx Merge branch 'master' into C 2021-10-04 16:03:36 +02:00
swigmod.h Replace all exit() with SWIG_exit() 2019-07-31 00:08:49 +01:00
tcl8.cxx Remove support for $source and $target 2021-04-30 10:20:14 +12:00
typepass.cxx Add some comments about shared_ptr upcast code 2020-01-24 19:46:39 +00:00
utils.cxx Fix various comment and documentation typos 2017-08-13 18:04:33 +12:00
xml.cxx Update xml.cxx to return typenames (#777) 2016-09-27 15:15:47 +13: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