Replace all exit() with SWIG_exit()
For consistent cleanup on error
This commit is contained in:
parent
b36ae64185
commit
2cf075558c
11 changed files with 24 additions and 24 deletions
|
|
@ -255,7 +255,7 @@ public:
|
|||
if (goops) {
|
||||
if (linkage != GUILE_LSTYLE_PASSIVE && linkage != GUILE_LSTYLE_MODULE) {
|
||||
Printf(stderr, "guile: GOOPS support requires passive or module linkage\n");
|
||||
exit(1);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1223,7 +1223,7 @@ public:
|
|||
/* FIXME: How should this be handled? The rest of SWIG just seems
|
||||
* to not bother checking for malloc failing! */
|
||||
fprintf(stderr, "Malloc failed!\n");
|
||||
exit(1);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
for (i = 0; i < max_num_of_arguments; ++i) {
|
||||
arg_names[i] = NULL;
|
||||
|
|
@ -1235,7 +1235,7 @@ public:
|
|||
/* FIXME: How should this be handled? The rest of SWIG just seems
|
||||
* to not bother checking for malloc failing! */
|
||||
fprintf(stderr, "Malloc failed!\n");
|
||||
exit(1);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
for (i = 0; i < max_num_of_arguments; ++i) {
|
||||
arg_values[i] = NULL;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
#include "cparse.h"
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include "pydoc.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
|
|
|||
|
|
@ -371,7 +371,6 @@ struct TargetLanguageModule {
|
|||
int SWIG_main(int argc, char *argv[], const TargetLanguageModule *tlm);
|
||||
void emit_parameter_variables(ParmList *l, Wrapper *f);
|
||||
void emit_return_variable(Node *n, SwigType *rt, Wrapper *f);
|
||||
void SWIG_exit(int); /* use EXIT_{SUCCESS,FAILURE} */
|
||||
void SWIG_config_file(const_String_or_char_ptr );
|
||||
const String *SWIG_output_directory();
|
||||
void SWIG_config_cppext(const char *ext);
|
||||
|
|
|
|||
|
|
@ -961,7 +961,7 @@ class TypePass:private Dispatcher {
|
|||
if (Getattr(c, "sym:overloaded") != checkoverloaded) {
|
||||
Printf(stdout, "sym:overloaded error c:%p checkoverloaded:%p\n", c, checkoverloaded);
|
||||
Swig_print_node(c);
|
||||
exit (1);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
String *decl = Strcmp(nodeType(c), "using") == 0 ? NewString("------") : Getattr(c, "decl");
|
||||
|
|
@ -969,7 +969,7 @@ class TypePass:private Dispatcher {
|
|||
if (!Getattr(c, "sym:overloaded")) {
|
||||
Printf(stdout, "sym:overloaded error.....%p\n", c);
|
||||
Swig_print_node(c);
|
||||
exit (1);
|
||||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
c = Getattr(c, "sym:nextSibling");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue