summaryrefslogtreecommitdiff
path: root/py/modules/IcePy/Util.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2004-09-14 13:48:54 +0000
committerMark Spruiell <mes@zeroc.com>2004-09-14 13:48:54 +0000
commit986d6ce66ce7d19655a635f9a2549ed6ed221587 (patch)
treebadd82e6365d325fca9dfea13f36ad82dee82c69 /py/modules/IcePy/Util.cpp
parentrenaming transport to connection (diff)
downloadice-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.cpp11
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);
}