diff options
author | Mark Spruiell <mes@zeroc.com> | 2004-09-20 19:00:49 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2004-09-20 19:00:49 +0000 |
commit | 8f8416d4dbec66b1b38abbcc16317872e5febc89 (patch) | |
tree | 59ae2fa360d12518c4f6e289946019fc9f3d787a /py/modules/IcePy/Current.cpp | |
parent | print exception and traceback (diff) | |
download | ice-8f8416d4dbec66b1b38abbcc16317872e5febc89.tar.bz2 ice-8f8416d4dbec66b1b38abbcc16317872e5febc89.tar.xz ice-8f8416d4dbec66b1b38abbcc16317872e5febc89.zip |
bug fix - adapter should be wrapped
Diffstat (limited to 'py/modules/IcePy/Current.cpp')
-rw-r--r-- | py/modules/IcePy/Current.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/py/modules/IcePy/Current.cpp b/py/modules/IcePy/Current.cpp index 3d16063763d..36dfce433ef 100644 --- a/py/modules/IcePy/Current.cpp +++ b/py/modules/IcePy/Current.cpp @@ -106,7 +106,27 @@ currentGetter(CurrentObject* self, void* closure) { if(self->adapter == NULL) { - self->adapter = createObjectAdapter(self->current->adapter); + // + // Create an Ice.ObjectAdapter wrapper for IcePy.ObjectAdapter. + // + PyObjectHandle adapterI = createObjectAdapter(self->current->adapter); + if(adapterI.get() == NULL) + { + return NULL; + } + PyObject* wrapper = lookupType("Ice.ObjectAdapterI"); + assert(wrapper != NULL); + PyObjectHandle args = PyTuple_New(1); + if(args.get() == NULL) + { + return NULL; + } + PyTuple_SET_ITEM(args.get(), 0, adapterI.release()); + self->adapter = PyObject_Call(wrapper, args.get(), NULL); + if(self->adapter == NULL) + { + return NULL; + } } Py_INCREF(self->adapter); result = self->adapter; |