(SWIG_exit): Fix bug: Use exit code.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@759 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
09278801cb
commit
6958bb4c08
1 changed files with 5 additions and 5 deletions
|
|
@ -419,7 +419,7 @@ int SWIG_main(int argc, char *argv[], Language *l) {
|
||||||
SWIG_exit(0);
|
SWIG_exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize the scanner
|
// Initialize the scanner
|
||||||
Seek(cpps, 0, SEEK_SET);
|
Seek(cpps, 0, SEEK_SET);
|
||||||
scanner_file(cpps);
|
scanner_file(cpps);
|
||||||
}
|
}
|
||||||
|
|
@ -479,18 +479,18 @@ int SWIG_main(int argc, char *argv[], Language *l) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
// SWIG_exit()
|
// SWIG_exit(int exit_code)
|
||||||
//
|
//
|
||||||
// Fatal parser error. Exit and cleanup
|
// Cleanup and either freeze or exit
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
|
|
||||||
void SWIG_exit(int) {
|
void SWIG_exit(int exit_code) {
|
||||||
if (f_runtime) {
|
if (f_runtime) {
|
||||||
fclose(f_runtime);
|
fclose(f_runtime);
|
||||||
remove(fn_runtime);
|
remove(fn_runtime);
|
||||||
}
|
}
|
||||||
while (freeze);
|
while (freeze);
|
||||||
exit(1);
|
exit (exit_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue