From 54b1c16933f2fd8d6eb6328d32edccd3ff76e863 Mon Sep 17 00:00:00 2001 From: Michi Henning Date: Fri, 24 Sep 2004 03:35:38 +0000 Subject: Changed prefix escape for .NET framework methods. Fixed a few bugs in slice2vb code generator. --- cpp/src/Slice/VbUtil.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'cpp/src/Slice/VbUtil.cpp') diff --git a/cpp/src/Slice/VbUtil.cpp b/cpp/src/Slice/VbUtil.cpp index ef139252589..c5f6e3c428d 100755 --- a/cpp/src/Slice/VbUtil.cpp +++ b/cpp/src/Slice/VbUtil.cpp @@ -71,7 +71,7 @@ lookupKwd(const string& name) &memberList[sizeof(memberList) / sizeof(*memberList)], name, Slice::CICompare()); - return found ? "_vb_" + name : name; + return found ? "_Ice_" + name : name; } // @@ -552,7 +552,7 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, { if(isArray) { - out << "Ice.Object(__len) {}"; + out << "Ice.Object(__len - 1) {}"; } else { @@ -569,7 +569,7 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, { if(isArray) { - out << "Ice.ObjectPrx(__len) {}"; + out << "Ice.ObjectPrx(__len - 1) {}"; } else { @@ -632,14 +632,14 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, } else { - out << nl << "For __block As Integer = 0 To 1"; + out << nl << "For __block As Integer = 0 To 0"; out.inc(); out << nl << "Dim sz As Integer = " << stream << ".readSize()"; out << nl << stream << ".startSeq(sz, " << static_cast(type->minWireSize()) << ')'; out << nl << param << " = New "; if(isArray) { - out << toArrayAlloc(typeS + "()", "sz") << " {}"; + out << toArrayAlloc(typeS + "()", "sz - 1") << " {}"; } else { @@ -675,14 +675,14 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, } else { - out << nl << "For __block As Integer = 0 To 1"; + out << nl << "For __block As Integer = 0 To 0"; out.inc(); out << nl << "Dim sz As Integer = " << stream << ".readSize()"; out << nl << stream << ".startSeq(sz, " << static_cast(type->minWireSize()) << ')'; out << nl << param << " = New "; if(isArray) { - out << toArrayAlloc(typeS + "()", "sz") << " {}"; + out << toArrayAlloc(typeS + "()", "sz - 1") << " {}"; } else { @@ -720,14 +720,14 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, } else { - out << nl << "For __block As Integer = 0 To 1"; + out << nl << "For __block As Integer = 0 To 0"; out.inc(); out << nl << "Dim sz As Integer = " << stream << ".readSize()"; out << nl << stream << ".startSeq(sz, " << static_cast(type->minWireSize()) << ')'; out << nl << param << " = New "; if(isArray) { - out << toArrayAlloc(typeS + "()", "sz") << " {}"; + out << toArrayAlloc(typeS + "()", "sz - 1") << " {}"; } else { @@ -775,14 +775,14 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out, else { string func = ProxyPtr::dynamicCast(type) ? "__read" : "read"; - out << nl << "For __block As Integer = 0 To 1"; + out << nl << "For __block As Integer = 0 To 0"; out.inc(); out << nl << "Dim sz As Integer = " << stream << ".readSize()"; out << nl << stream << ".startSeq(sz, " << static_cast(type->minWireSize()) << ")"; out << nl << param << " = New "; if(isArray) { - out << toArrayAlloc(typeS + "()", "sz") << " {}"; + out << toArrayAlloc(typeS + "()", "sz - 1") << " {}"; } else { -- cgit v1.2.3