swig/Source/CParse
Olly Betts e38847f7e1 Fail cleanly on allocation failures
Previously code in the SWIG tool didn't handle allocation failures
well.  Most places didn't check for NULL return from
malloc()/realloc()/calloc() at all, typically resulting in undefined
behaviour, and some places used assert() to check for a NULL return
(which is a misuse of assert() and such checks disappear if built with
NDEBUG defined leaving us back with undefined behaviour).

All C allocations are now done via wrapper functions (Malloc(),
Realloc() and Calloc()) which emit and error and exit with non-zero
status on failure, so a non-NULL return can be relied upon.

Fixes #1901.
2022-03-04 11:47:49 +13:00
..
cparse.h new_node refactor 2018-05-19 09:00:06 +01:00
cscanner.c Mark error messages more consistent 2022-02-25 10:07:17 +13:00
parser.y Fail cleanly on allocation failures 2022-03-04 11:47:49 +13:00
templ.c Fail cleanly on allocation failures 2022-03-04 11:47:49 +13:00
util.c new_node refactor 2018-05-19 09:00:06 +01:00