diff options
author | Mark Spruiell <mes@zeroc.com> | 2007-09-20 13:30:59 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2007-09-20 13:30:59 -0700 |
commit | 5fd2a70423c4d5db5163123e8659634dcefd53cf (patch) | |
tree | d1af503c53de159f02067747e8f1f1eed967663a /py/modules/IcePy/ObjectAdapter.cpp | |
parent | changing __eq__ to __cmp__ for structs means we can remove some (diff) | |
download | ice-5fd2a70423c4d5db5163123e8659634dcefd53cf.tar.bz2 ice-5fd2a70423c4d5db5163123e8659634dcefd53cf.tar.xz ice-5fd2a70423c4d5db5163123e8659634dcefd53cf.zip |
minor cleanup in IcePy
Diffstat (limited to 'py/modules/IcePy/ObjectAdapter.cpp')
-rw-r--r-- | py/modules/IcePy/ObjectAdapter.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/py/modules/IcePy/ObjectAdapter.cpp b/py/modules/IcePy/ObjectAdapter.cpp index 14538e403d8..28fe39933c4 100644 --- a/py/modules/IcePy/ObjectAdapter.cpp +++ b/py/modules/IcePy/ObjectAdapter.cpp @@ -138,8 +138,7 @@ public: private: // - // This object is created in locate() and destroyed after - // finished(). + // This object is created in locate() and destroyed after finished(). // struct Cookie : public Ice::LocalObject { @@ -182,9 +181,8 @@ IcePy::ServantWrapper::getObject() return _servant; } - // -// ServantWrapper implementation. +// ConcreteServantWrapper implementation. // IcePy::ConcreteServantWrapper::ConcreteServantWrapper(PyObject* servant) : ServantWrapper(servant), _lastOp(_operationMap.end()) @@ -252,6 +250,9 @@ IcePy::ConcreteServantWrapper::ice_invoke_async(const Ice::AMD_Array_Object_ice_ } } +// +// BlobjectServantWrapper implementation. +// IcePy::BlobjectServantWrapper::BlobjectServantWrapper(PyObject* servant, bool async) : ServantWrapper(servant), _op(getIceInvokeOperation(async)) @@ -284,8 +285,8 @@ IcePy::ServantLocatorWrapper::~ServantLocatorWrapper() Ice::ObjectPtr IcePy::ServantLocatorWrapper::locate(const Ice::Current& current, Ice::LocalObjectPtr& cookie) { - // Must instantiate before calling into the Python API. - AdoptThread adoptThread; + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + CookiePtr c = new Cookie; c->current = createCurrent(current); if(!c->current) @@ -351,7 +352,8 @@ IcePy::ServantLocatorWrapper::locate(const Ice::Current& current, Ice::LocalObje void IcePy::ServantLocatorWrapper::finished(const Ice::Current&, const Ice::ObjectPtr&, const Ice::LocalObjectPtr& cookie) { - AdoptThread adoptThread; + AdoptThread adoptThread; // Ensure the current thread is able to call into Python. + CookiePtr c = CookiePtr::dynamicCast(cookie); assert(c); |