swig/Lib
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 Merge branch 'master' into gsoc2009-matevz 2013-01-28 07:01:37 +00:00
c Drop longjmp-based exception handling approach 2016-09-15 01:27:40 +02:00
cffi Merge branch 'master' into gsoc2009-matevz 2013-10-10 07:26:09 +01:00
chicken Fix assorted comment and documentation typos 2014-02-23 17:15:22 +13:00
clisp Revert rev 11918 "merge revisions 11872:11876 from trunk to gsoc2008-maciekd branch - license changes" 2012-05-06 00:49:56 +00:00
csharp interface macro argument name tweaks 2016-03-11 19:47:08 +00:00
d Initialise all newly created arrays in arrays.i library. 2015-07-30 20:41:15 +01:00
gcj Fix {python|perl5|ruby|tcl}/java examples 2014-05-02 21:44:42 +02:00
go [Go] Ensure structs are properly packed between gc and GCC/clang. 2016-01-27 15:51:13 -08:00
guile Fix STL wrappers to not generate <: digraphs. 2015-12-12 14:05:46 +00:00
java Java - unsigned long long marshalling improvements for negative numbers 2016-03-31 18:56:32 +01:00
javascript [Javascript] For v8 >= 4.3.0, use V8_MAJOR_VERSION. 2016-01-12 09:33:13 +13:00
lua Fix lua base class methods with __getitem 2016-03-17 07:46:44 +01:00
modula3 Add rvalue reference typemaps 2013-01-24 20:27:28 +00:00
mzscheme Whitespace cleanup of all Makefiles* 2014-05-02 20:06:11 +02:00
ocaml Fix incorrect comments 2015-05-09 21:59:03 +12:00
octave octave: map unary functions to __...___ Python-style unary members 2016-02-07 20:22:39 +01:00
perl5 Don't use long long if it isn't available 2016-01-06 16:52:37 -05:00
php Php fix for -Wmissing-field-initializers warning 2015-12-19 16:21:23 +00:00
pike Merge branch 'master' into gsoc2009-matevz 2013-10-10 07:26:09 +01:00
python handle const pointers to functions 2016-03-24 10:59:23 +01:00
r Merge pull request #633 from sbpcs59/master 2016-03-26 13:20:38 +08:00
ruby Don't use long long if it isn't available 2016-01-06 16:52:37 -05:00
scilab scilab: fix pointer type name 2016-04-06 13:22:59 +02:00
std Fix STL wrappers to not generate <: digraphs. 2015-12-12 14:05:46 +00:00
tcl Don't use long long if it isn't available 2016-01-06 16:52:37 -05:00
typemaps handle const pointers to functions 2016-03-24 10:59:23 +01:00
uffi Revert rev 11918 "merge revisions 11872:11876 from trunk to gsoc2008-maciekd branch - license changes" 2012-05-06 00:49:56 +00:00
xml delete the perl5 typemaps, ignored here 2006-01-05 19:34:51 +00:00
allkw.swg [Lua] Add keyword warnings for Lua keywords and Basic Functions. 2014-02-19 23:04:40 +13:00
attribute.i Fix %arg in Lib/attribute.i 2013-05-25 00:37:57 +01:00
carrays.i Initialise all newly created arrays in arrays.i library. 2015-07-30 20:41:15 +01:00
cdata.i Add support for cdata library for Java 2014-02-15 22:13:50 +00:00
cmalloc.i Revert rev 11918 "merge revisions 11872:11876 from trunk to gsoc2008-maciekd branch - license changes" 2012-05-06 00:49:56 +00:00
constraints.i Revert rev 11918 "merge revisions 11872:11876 from trunk to gsoc2008-maciekd branch - license changes" 2012-05-06 00:49:56 +00:00
cpointer.i Revert rev 11918 "merge revisions 11872:11876 from trunk to gsoc2008-maciekd branch - license changes" 2012-05-06 00:49:56 +00:00
cstring.i Revert rev 11918 "merge revisions 11872:11876 from trunk to gsoc2008-maciekd branch - license changes" 2012-05-06 00:49:56 +00:00
cwstring.i Revert rev 11918 "merge revisions 11872:11876 from trunk to gsoc2008-maciekd branch - license changes" 2012-05-06 00:49:56 +00:00
director_common.swg Create director_common.swg for language-indep code 2015-03-12 19:51:11 +13:00
exception.i Drop longjmp-based exception handling approach 2016-09-15 01:27:40 +02:00
intrusive_ptr.i Convert to unix fileformat 2013-01-12 16:54:37 +00:00
inttypes.i Remove duplicate declarations of strtoimax and strtoumax in inttypes.i 2014-04-08 23:47:22 +01:00
linkruntime.c fix macro issue reported by Vladimir Menshakov 2006-04-10 19:00:44 +00:00
math.i Revert rev 11918 "merge revisions 11872:11876 from trunk to gsoc2008-maciekd branch - license changes" 2012-05-06 00:49:56 +00:00
pointer.i Update link to point to 3.0 docs 2015-01-08 11:16:48 +13:00
runtime.swg fix VC++ warning 2005-09-29 13:17:05 +00:00
shared_ptr.i Revert rev 11187 "Merged with recent changes from trunk." 2012-05-06 01:13:16 +00:00
std_except.i Revert rev 11918 "merge revisions 11872:11876 from trunk to gsoc2008-maciekd branch - license changes" 2012-05-06 00:49:56 +00:00
stdint.i Revert rev 11918 "merge revisions 11872:11876 from trunk to gsoc2008-maciekd branch - license changes" 2012-05-06 00:49:56 +00:00
stl.i Revert rev 11918 "merge revisions 11872:11876 from trunk to gsoc2008-maciekd branch - license changes" 2012-05-06 00:49:56 +00:00
swig.swg Add std::array container wrappers for Python 2015-11-17 07:27:48 +00:00
swigarch.i Typo fix in error messages from swigarch.i 2015-02-04 23:07:18 +00:00
swigerrors.swg Remove trailing spaces in the generated code. 2013-09-13 10:02:39 +02:00
swiginit.swg Eliminate "found" flag for simpler, clearer code 2015-01-24 15:12:29 +13:00
swiglabels.swg swiglabels.swg: added check if __GNUC__ is defined 2016-02-13 13:49:07 +01:00
swigrun.i Revert rev 11918 "merge revisions 11872:11876 from trunk to gsoc2008-maciekd branch - license changes" 2012-05-06 00:49:56 +00:00
swigrun.swg Remove register storage class declarations 2014-02-19 11:58:27 -06:00
swigwarnings.swg Rework std::initializer_list handling to warn about usage in any method, not just constructors. A typemap is used to issue the warning and can be overridden with user defined behaviour. 2013-02-04 20:03:22 +00:00
wchar.i Revert rev 11918 "merge revisions 11872:11876 from trunk to gsoc2008-maciekd branch - license changes" 2012-05-06 00:49:56 +00:00
windows.i Revert rev 11918 "merge revisions 11872:11876 from trunk to gsoc2008-maciekd branch - license changes" 2012-05-06 00:49:56 +00:00