diff options
Diffstat (limited to 'python/modules/IcePy/Proxy.cpp')
-rw-r--r-- | python/modules/IcePy/Proxy.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/python/modules/IcePy/Proxy.cpp b/python/modules/IcePy/Proxy.cpp index 655c2bf685b..d9b2704b2a8 100644 --- a/python/modules/IcePy/Proxy.cpp +++ b/python/modules/IcePy/Proxy.cpp @@ -145,9 +145,7 @@ proxyCompare(ProxyObject* p1, PyObject* other, int op) } } - PyObject* r = result ? getTrue() : getFalse(); - Py_INCREF(r); - return r; + return result ? incTrue() : incFalse(); } #ifdef WIN32 @@ -1598,8 +1596,8 @@ proxyIceTimeout(ProxyObject* self, PyObject* args) } catch(const IceUtil::IllegalArgumentException& ex) { - PyErr_Format(PyExc_RuntimeError, "%s", STRCAST(ex.reason().c_str())); - return 0; + PyErr_Format(PyExc_RuntimeError, "%s", STRCAST(ex.reason().c_str())); + return 0; } catch(const Ice::Exception& ex) { |