swig/Source/Swig
Olly Betts 55377bdc08 Add DOH Exit() and SetExitHandler()
Exit() is a wrapper for exit() by default, but SetExitHandler() allows
specifying a function to call instead.

This means that failures within DOH (e.g. Malloc() failing due to lack
of memory) will now perform cleanup such as removing output files.

This commit also cleans up exit statuses so SWIG should now reliably
exit with status 0 if the run was successful and status 1 if there was
an error (or a warning and -Werror was in effect).

Previously in some situations SWIG would try to exit with the status set
to the number of errors encountered, but that's problematic - for
example if there were 256 errors this would result in exit status 0 on
most platforms.  Also some error statuses have special meanings e.g.
those defined by <sysexits.h>.

Also SWIG/Javascript tried to exit with status -1 in a few places (which
typically results in exit status 255).
2022-03-06 12:33:54 +13:00
..
cwrap.c Merge pull request #2095 from vadz/extend-suffix 2022-01-08 21:11:14 +00:00
deprecate.c Remove cvs/svn Id strings 2013-01-12 01:21:16 +00:00
error.c Fail cleanly on allocation failures 2022-03-04 11:47:49 +13:00
extend.c new_node refactor 2018-05-19 09:00:06 +01:00
fragment.c Fix comment typo 2021-05-05 16:01:51 +12:00
getopt.c Add DOH Exit() and SetExitHandler() 2022-03-06 12:33:54 +13:00
include.c Fix leaked file descriptor 2016-06-16 15:53:22 +03:00
misc.c Add DOH Exit() and SetExitHandler() 2022-03-06 12:33:54 +13:00
naming.c Add DOH Exit() and SetExitHandler() 2022-03-06 12:33:54 +13:00
parms.c Fix Python compile errors with overloading and varargs 2019-02-25 19:27:23 +00:00
scanner.c Add DOH Exit() and SetExitHandler() 2022-03-06 12:33:54 +13:00
stype.c template template parameters patch tidyup 2021-03-22 01:08:05 +00:00
swig.h Add DOH Exit() and SetExitHandler() 2022-03-06 12:33:54 +13:00
swigfile.h Fix segfaults when using filename paths greater than 1024 characters in length - use String * and heap instead of fixed size static char array buffers. 2012-11-18 00:45:18 +00:00
swigopt.h merge revisions 11872:11876 from trunk to gsoc2009-matevz branch - license changes 2010-03-06 00:51:54 +00:00
swigparm.h Fix Python compile errors with overloading and varargs 2019-02-25 19:27:23 +00:00
swigscan.h Handle ellipsis as a token in the scanner 2022-01-26 12:31:52 +13:00
swigtree.h Minor code improvements 2013-11-29 07:33:55 +00:00
swigwrap.h merge revisions 11872:11876 from trunk to gsoc2009-matevz branch - license changes 2010-03-06 00:51:54 +00:00
symbol.c Fix warning suppression for WARN_PARSE_USING_UNDEF 2022-02-20 16:45:10 +00:00
tree.c Fix removeNode() to really unset previousSibling 2021-12-10 18:34:21 +13:00
typemap.c Fix typos 2022-02-10 16:12:24 +13:00
typeobj.c Fix few unused variable warnings 2021-03-07 11:20:31 +00:00
typesys.c Restore _Complex as standalone type 2020-06-24 20:21:47 -04:00
wrapfunc.c Fail cleanly on allocation failures 2022-03-04 11:47:49 +13:00