summaryrefslogtreecommitdiff
path: root/py/modules/IcePy/Operation.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2012-05-10 16:45:22 -0700
committerMark Spruiell <mes@zeroc.com>2012-05-10 16:45:22 -0700
commit485691562a75595eda00af35f5235f6fc22fa36c (patch)
tree4eaf48ac7512239a47d97e533cd3da1a75084f29 /py/modules/IcePy/Operation.cpp
parent* C++ implementation for compact/sliced formats (diff)
downloadice-485691562a75595eda00af35f5235f6fc22fa36c.tar.bz2
ice-485691562a75595eda00af35f5235f6fc22fa36c.tar.xz
ice-485691562a75595eda00af35f5235f6fc22fa36c.zip
C++ bug fixes; adding more Python tests
Diffstat (limited to 'py/modules/IcePy/Operation.cpp')
-rw-r--r--py/modules/IcePy/Operation.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/py/modules/IcePy/Operation.cpp b/py/modules/IcePy/Operation.cpp
index 5b2d9eea3dc..401109e84b9 100644
--- a/py/modules/IcePy/Operation.cpp
+++ b/py/modules/IcePy/Operation.cpp
@@ -3091,19 +3091,33 @@ IcePy::TypedUpcall::dispatch(PyObject* servant, const pair<const Ice::Byte*, con
if(!_op->inParams.empty())
{
Ice::InputStreamPtr is = Ice::createInputStream(_communicator, inBytes);
+
+ //
+ // Store a pointer to a local SlicedDataUtil object as the stream's closure.
+ // This is necessary to support object unmarshaling (see ObjectReader).
+ //
+ SlicedDataUtil util;
+ assert(!is->closure());
+ is->closure(&util);
+
try
{
is->startEncapsulation();
+
Py_ssize_t i = start;
for(ParamInfoList::iterator p = _op->inParams.begin(); p != _op->inParams.end(); ++p, ++i)
{
void* closure = reinterpret_cast<void*>(i);
(*p)->type->unmarshal(is, *p, args.get(), closure, &(*p)->metaData);
}
+
if(_op->sendsClasses)
{
is->readPendingObjects();
}
+
+ util.update();
+
is->endEncapsulation();
}
catch(const AbortMarshaling&)