Eliminate calls to abort()

Call Exit(EXIT_FAILURE) instead so that output files get removed.
This commit is contained in:
Olly Betts 2022-03-06 12:45:18 +13:00
commit 735732d721
6 changed files with 35 additions and 52 deletions

View file

@ -476,7 +476,8 @@ public:
Printf(f_init, "}\n");
break;
default:
abort(); // for now
fputs("Fatal internal error: Invalid Guile linkage setting.\n", stderr);
Exit(EXIT_FAILURE);
}
if (scmstub) {

View file

@ -398,26 +398,18 @@ public:
*/
void oc_SwigType_del_reference(SwigType *t) {
char *c = Char(t);
if (strncmp(c, "q(", 2) == 0) {
Delete(SwigType_pop(t));
c = Char(t);
if (SwigType_isqualifier(t)) {
SwigType_del_qualifier(t);
}
if (strncmp(c, "r.", 2)) {
printf("Fatal error. SwigType_del_pointer applied to non-pointer.\n");
abort();
}
Replace(t, "r.", "", DOH_REPLACE_FIRST);
SwigType_del_reference(t);
}
void oc_SwigType_del_array(SwigType *t) {
char *c = Char(t);
if (strncmp(c, "q(", 2) == 0) {
Delete(SwigType_pop(t));
c = Char(t);
if (SwigType_isqualifier(t)) {
SwigType_del_qualifier(t);
}
if (strncmp(c, "a(", 2) == 0) {
Delete(SwigType_pop(t));
if (SwigType_isarray(t)) {
SwigType_del_array(t);
}
}