diff options
author | Mark Spruiell <mes@zeroc.com> | 2004-09-14 13:48:54 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2004-09-14 13:48:54 +0000 |
commit | 986d6ce66ce7d19655a635f9a2549ed6ed221587 (patch) | |
tree | badd82e6365d325fca9dfea13f36ad82dee82c69 /py/modules/IcePy/Util.cpp | |
parent | renaming transport to connection (diff) | |
download | ice-986d6ce66ce7d19655a635f9a2549ed6ed221587.tar.bz2 ice-986d6ce66ce7d19655a635f9a2549ed6ed221587.tar.xz ice-986d6ce66ce7d19655a635f9a2549ed6ed221587.zip |
revising handleSystemExit
Diffstat (limited to 'py/modules/IcePy/Util.cpp')
-rw-r--r-- | py/modules/IcePy/Util.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/py/modules/IcePy/Util.cpp b/py/modules/IcePy/Util.cpp index 0eb67cb4f7a..b09edcc63ba 100644 --- a/py/modules/IcePy/Util.cpp +++ b/py/modules/IcePy/Util.cpp @@ -522,22 +522,20 @@ IcePy::throwPythonException(PyObject* ex) } void -IcePy::handleSystemExit() +IcePy::handleSystemExit(PyObject* ex) { - PyObjectHandle ex = getPythonException(); - assert(ex.get() != NULL); - // // This code is similar to handle_system_exit in pythonrun.c. // PyObjectHandle code; - if(PyInstance_Check(ex.get())) + if(PyInstance_Check(ex)) { - code = PyObject_GetAttrString(ex.get(), "code"); + code = PyObject_GetAttrString(ex, "code"); } else { code = ex; + Py_INCREF(ex); } int status; @@ -553,7 +551,6 @@ IcePy::handleSystemExit() } code = 0; - ex = 0; Py_Exit(status); } |