From 42195c459934e9eb559c74a85c76c5eb3686eaff Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Thu, 31 Aug 2000 17:47:33 +0000 Subject: [PATCH] (SWIG_exit): Fix bug: Use exit code. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@759 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/SWIG1.1/main.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SWIG/Source/SWIG1.1/main.cxx b/SWIG/Source/SWIG1.1/main.cxx index 0dc1c7591..7e0ae9bd5 100644 --- a/SWIG/Source/SWIG1.1/main.cxx +++ b/SWIG/Source/SWIG1.1/main.cxx @@ -419,7 +419,7 @@ int SWIG_main(int argc, char *argv[], Language *l) { SWIG_exit(0); } - // Initialize the scanner + // Initialize the scanner Seek(cpps, 0, SEEK_SET); 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) { fclose(f_runtime); remove(fn_runtime); } while (freeze); - exit(1); + exit (exit_code); }