Index: CsUtil.cpp =================================================================== RCS file: /home/cvsroot/ice/src/Slice/CsUtil.cpp,v retrieving revision 1.34.2.1 diff -c -r1.34.2.1 CsUtil.cpp *** CsUtil.cpp 13 May 2005 05:23:19 -0000 1.34.2.1 --- CsUtil.cpp 18 Aug 2005 23:51:43 -0000 *************** *** 683,714 **** else { out << sb; ! out << nl << "int szx = " << stream << ".readSize();"; if(!streamingAPI) { if(type->isVariableLength()) { ! out << nl << stream << ".startSeq(szx, " << static_cast(type->minWireSize()) << ");"; } else { ! out << nl << stream << ".checkFixedSeq(szx, " << static_cast(type->minWireSize()) << ");"; } } out << nl << param << " = new "; if(isArray) { ! out << toArrayAlloc(typeS + "[]", "szx"); } else { ! out << fixId(seq->scoped()) << "(szx)"; } out << ';'; ! out << nl << "for(int i = 0; i < szx; ++i)"; out << sb; out << nl << "IceInternal.SequencePatcher spx = new IceInternal.SequencePatcher(" ! << param << ", " << "typeof(" << typeS << "), i);"; out << nl << stream << ".readObject("; if(streamingAPI) { --- 683,714 ---- else { out << sb; ! out << nl << "int __szx = " << stream << ".readSize();"; if(!streamingAPI) { if(type->isVariableLength()) { ! out << nl << stream << ".startSeq(__szx, " << static_cast(type->minWireSize()) << ");"; } else { ! out << nl << stream << ".checkFixedSeq(__szx, " << static_cast(type->minWireSize()) << ");"; } } out << nl << param << " = new "; if(isArray) { ! out << toArrayAlloc(typeS + "[]", "__szx"); } else { ! out << fixId(seq->scoped()) << "(__szx)"; } out << ';'; ! out << nl << "for(int __i = 0; __i < __szx; ++__i)"; out << sb; out << nl << "IceInternal.SequencePatcher spx = new IceInternal.SequencePatcher(" ! << param << ", " << "typeof(" << typeS << "), __i);"; out << nl << stream << ".readObject("; if(streamingAPI) { *************** *** 723,729 **** out << eb; if(!streamingAPI && type->isVariableLength()) { ! out << nl << stream << ".endSeq(szx);"; } out << eb; } --- 723,729 ---- out << eb; if(!streamingAPI && type->isVariableLength()) { ! out << nl << stream << ".endSeq(__szx);"; } out << eb; } *************** *** 751,779 **** else { out << sb; ! out << nl << "int szx = " << stream << ".readSize();"; if(!streamingAPI) { if(type->isVariableLength()) { ! out << nl << stream << ".startSeq(szx, " << static_cast(type->minWireSize()) << ");"; } else { ! out << nl << stream << ".checkFixedSeq(szx, " << static_cast(type->minWireSize()) << ");"; } } out << nl << param << " = new "; if(isArray) { ! out << toArrayAlloc(typeS + "[]", "szx"); } else { ! out << fixId(seq->scoped()) << "(szx)"; } out << ';'; ! out << nl << "for(int __ix = 0; __ix < szx; ++__ix)"; out << sb; if(isArray) { --- 751,779 ---- else { out << sb; ! out << nl << "int __szx = " << stream << ".readSize();"; if(!streamingAPI) { if(type->isVariableLength()) { ! out << nl << stream << ".startSeq(__szx, " << static_cast(type->minWireSize()) << ");"; } else { ! out << nl << stream << ".checkFixedSeq(__szx, " << static_cast(type->minWireSize()) << ");"; } } out << nl << param << " = new "; if(isArray) { ! out << toArrayAlloc(typeS + "[]", "__szx"); } else { ! out << fixId(seq->scoped()) << "(__szx)"; } out << ';'; ! out << nl << "for(int __ix = 0; __ix < __szx; ++__ix)"; out << sb; if(isArray) { *************** *** 793,799 **** out << eb; if(!streamingAPI && type->isVariableLength()) { ! out << nl << stream << ".endSeq(szx);"; } out << eb; } --- 793,799 ---- out << eb; if(!streamingAPI && type->isVariableLength()) { ! out << nl << stream << ".endSeq(__szx);"; } out << eb; } *************** *** 821,842 **** else { out << sb; ! out << nl << "int szx = " << stream << ".readSize();"; if(!streamingAPI) { ! out << nl << stream << ".checkFixedSeq(szx, " << static_cast(type->minWireSize()) << ");"; } out << nl << param << " = new "; if(isArray) { ! out << toArrayAlloc(typeS + "[]", "szx"); } else { ! out << fixId(seq->scoped()) << "(szx)"; } out << ';'; ! out << nl << "for(int __ix = 0; __ix < szx; ++__ix)"; out << sb; if(isArray) { --- 821,842 ---- else { out << sb; ! out << nl << "int __szx = " << stream << ".readSize();"; if(!streamingAPI) { ! out << nl << stream << ".checkFixedSeq(__szx, " << static_cast(type->minWireSize()) << ");"; } out << nl << param << " = new "; if(isArray) { ! out << toArrayAlloc(typeS + "[]", "__szx"); } else { ! out << fixId(seq->scoped()) << "(__szx)"; } out << ';'; ! out << nl << "for(int __ix = 0; __ix < __szx; ++__ix)"; out << sb; if(isArray) { *************** *** 887,915 **** { func += "read"; out << sb; ! out << nl << "int szx = " << stream << ".readSize();"; if(!streamingAPI) { if(type->isVariableLength()) { ! out << nl << stream << ".startSeq(szx, " << static_cast(type->minWireSize()) << ");"; } else { ! out << nl << stream << ".checkFixedSeq(szx, " << static_cast(type->minWireSize()) << ");"; } } out << nl << param << " = new "; if(isArray) { ! out << toArrayAlloc(typeS + "[]", "szx"); } else { ! out << fixId(seq->scoped()) << "(szx)"; } out << ';'; ! out << nl << "for(int __ix = 0; __ix < szx; ++__ix)"; out << sb; if(isArray) { --- 887,915 ---- { func += "read"; out << sb; ! out << nl << "int __szx = " << stream << ".readSize();"; if(!streamingAPI) { if(type->isVariableLength()) { ! out << nl << stream << ".startSeq(__szx, " << static_cast(type->minWireSize()) << ");"; } else { ! out << nl << stream << ".checkFixedSeq(__szx, " << static_cast(type->minWireSize()) << ");"; } } out << nl << param << " = new "; if(isArray) { ! out << toArrayAlloc(typeS + "[]", "__szx"); } else { ! out << fixId(seq->scoped()) << "(__szx)"; } out << ';'; ! out << nl << "for(int __ix = 0; __ix < __szx; ++__ix)"; out << sb; if(isArray) { *************** *** 930,936 **** out << eb; if(!streamingAPI && type->isVariableLength()) { ! out << nl << stream << ".endSeq(szx);"; } out << eb; } --- 930,936 ---- out << eb; if(!streamingAPI && type->isVariableLength()) { ! out << nl << stream << ".endSeq(__szx);"; } out << eb; }