summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/BasicStream.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2007-11-05 12:19:49 -0800
committerMark Spruiell <mes@zeroc.com>2007-11-05 12:19:49 -0800
commit3c8924663df8629b33c2ddd38907c4bf2eeb83cd (patch)
tree83b63f2396201019163d140555e42d79f82e46d3 /cpp/src/Ice/BasicStream.cpp
parentMerge branch 'master' of ssh://cvs.zeroc.com/home/git/ice (diff)
downloadice-3c8924663df8629b33c2ddd38907c4bf2eeb83cd.tar.bz2
ice-3c8924663df8629b33c2ddd38907c4bf2eeb83cd.tar.xz
ice-3c8924663df8629b33c2ddd38907c4bf2eeb83cd.zip
- Fixing bug 2522 for Python. This involved adding the C++ class
UserExceptionWriter so that the Python extension can wrap a native Python user exception into something that the C++ run time can marshal. Also ported the changes to the servantLocator test. - Implementing UserExceptionWriter in Java and C#. - Consolidating the source files for the C# streaming API.
Diffstat (limited to 'cpp/src/Ice/BasicStream.cpp')
-rw-r--r--cpp/src/Ice/BasicStream.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp
index 3ffadc78573..2a94e724f86 100644
--- a/cpp/src/Ice/BasicStream.cpp
+++ b/cpp/src/Ice/BasicStream.cpp
@@ -33,6 +33,7 @@ using namespace IceInternal;
IceInternal::BasicStream::BasicStream(Instance* instance, bool unlimited) :
IceInternal::Buffer(instance->messageSizeMax()),
_instance(instance),
+ _closure(0),
_currentReadEncaps(0),
_currentWriteEncaps(0),
_traceSlicing(-1),
@@ -73,6 +74,20 @@ IceInternal::BasicStream::clear()
delete _objectList;
}
+void*
+IceInternal::BasicStream::closure() const
+{
+ return _closure;
+}
+
+void*
+IceInternal::BasicStream::closure(void* p)
+{
+ void* prev = _closure;
+ _closure = p;
+ return prev;
+}
+
void
IceInternal::BasicStream::swap(BasicStream& other)
{
@@ -80,6 +95,8 @@ IceInternal::BasicStream::swap(BasicStream& other)
Buffer::swap(other);
+ std::swap(_closure, other._closure);
+
//
// Swap is never called for BasicStreams that have more than one
// encaps.