diff options
author | Michi Henning <michi@zeroc.com> | 2005-06-23 00:33:13 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2005-06-23 00:33:13 +0000 |
commit | 9e5ea1f10314e794839292c83553c41dcaf7309b (patch) | |
tree | e39791b9b4bba279d3c321b1d0b362b7cf1a2a41 /cpp/src/Ice/BasicStream.cpp | |
parent | removing print statements (diff) | |
download | ice-9e5ea1f10314e794839292c83553c41dcaf7309b.tar.bz2 ice-9e5ea1f10314e794839292c83553c41dcaf7309b.tar.xz ice-9e5ea1f10314e794839292c83553c41dcaf7309b.zip |
Fixed bug 383.
Diffstat (limited to 'cpp/src/Ice/BasicStream.cpp')
-rw-r--r-- | cpp/src/Ice/BasicStream.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/cpp/src/Ice/BasicStream.cpp b/cpp/src/Ice/BasicStream.cpp index 0195d00dedc..9d9424f254c 100644 --- a/cpp/src/Ice/BasicStream.cpp +++ b/cpp/src/Ice/BasicStream.cpp @@ -186,7 +186,7 @@ IceInternal::BasicStream::startSeq(int numElements, int minSize) _seqDataStack = sd; int bytesLeft = static_cast<int>(b.end() - i); - if(_seqDataStack == 0) // Outermost sequence + if(_seqDataStack->previous == 0) // Outermost sequence { // // The sequence must fit within the message. @@ -233,23 +233,6 @@ IceInternal::BasicStream::checkSeq(int bytesLeft) } void -IceInternal::BasicStream::endSeq(int sz) -{ - if(sz == 0) // Pop only if something was pushed previously. - { - return; - } - - // - // Pop the sequence stack. - // - SeqData* oldSeqData = _seqDataStack; - assert(oldSeqData); - _seqDataStack = oldSeqData->previous; - delete oldSeqData; -} - -void IceInternal::BasicStream::checkFixedSeq(int numElements, int elemSize) { int bytesLeft = static_cast<int>(b.end() - i); @@ -269,6 +252,23 @@ IceInternal::BasicStream::checkFixedSeq(int numElements, int elemSize) } } +void +IceInternal::BasicStream::endSeq(int sz) +{ + if(sz == 0) // Pop only if something was pushed previously. + { + return; + } + + // + // Pop the sequence stack. + // + SeqData* oldSeqData = _seqDataStack; + assert(oldSeqData); + _seqDataStack = oldSeqData->previous; + delete oldSeqData; +} + IceInternal::BasicStream::WriteEncaps::WriteEncaps() : writeIndex(0), toBeMarshaledMap(0), marshaledMap(0), typeIdMap(0), typeIdIndex(0), previous(0) { |