summaryrefslogtreecommitdiff
path: root/cpp/src/Freeze/ObjectStore.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2005-02-23 19:21:43 +0000
committerMarc Laukien <marc@zeroc.com>2005-02-23 19:21:43 +0000
commit98a6af97e16a364f1b493e472fa0a80bd812cb41 (patch)
tree2c951cf2087fef0d368114cb86ad1e8c8e05423d /cpp/src/Freeze/ObjectStore.cpp
parentreplaced some of the perl in place editing with some python code to get (diff)
downloadice-98a6af97e16a364f1b493e472fa0a80bd812cb41.tar.bz2
ice-98a6af97e16a364f1b493e472fa0a80bd812cb41.tar.xz
ice-98a6af97e16a364f1b493e472fa0a80bd812cb41.zip
Buffer::Container
Diffstat (limited to 'cpp/src/Freeze/ObjectStore.cpp')
-rw-r--r--cpp/src/Freeze/ObjectStore.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/cpp/src/Freeze/ObjectStore.cpp b/cpp/src/Freeze/ObjectStore.cpp
index 57a2a2d8df9..dfbe0de1651 100644
--- a/cpp/src/Freeze/ObjectStore.cpp
+++ b/cpp/src/Freeze/ObjectStore.cpp
@@ -251,14 +251,13 @@ Freeze::ObjectStore::save(Key& key, Value& value, Byte status, DbTxn* tx)
}
}
-
void
Freeze::ObjectStore::marshal(const Identity& ident, Key& bytes, const CommunicatorPtr& communicator)
{
IceInternal::InstancePtr instance = IceInternal::getInstance(communicator);
IceInternal::BasicStream stream(instance.get());
ident.__write(&stream);
- bytes.swap(stream.b);
+ stream.b.copyToVector(bytes);
}
void
@@ -266,7 +265,7 @@ Freeze::ObjectStore::unmarshal(Identity& ident, const Key& bytes, const Communic
{
IceInternal::InstancePtr instance = IceInternal::getInstance(communicator);
IceInternal::BasicStream stream(instance.get());
- stream.b = bytes;
+ stream.b.copyFromVector(bytes);
stream.i = stream.b.begin();
ident.__read(&stream);
}
@@ -280,7 +279,7 @@ Freeze::ObjectStore::marshal(const ObjectRecord& v, Value& bytes, const Communic
v.__write(&stream);
stream.writePendingObjects();
stream.endWriteEncaps();
- bytes.swap(stream.b);
+ stream.b.copyToVector(bytes);
}
void
@@ -289,7 +288,7 @@ Freeze::ObjectStore::unmarshal(ObjectRecord& v, const Value& bytes, const Commun
IceInternal::InstancePtr instance = IceInternal::getInstance(communicator);
IceInternal::BasicStream stream(instance.get());
stream.sliceObjects(false);
- stream.b = bytes;
+ stream.b.copyFromVector(bytes);
stream.i = stream.b.begin();
stream.startReadEncaps();
v.__read(&stream);