diff options
author | Michi Henning <michi@zeroc.com> | 2007-11-26 12:04:19 +1000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2007-11-26 12:04:19 +1000 |
commit | 36045f37b39ab655bea41947d5a8145c5a514328 (patch) | |
tree | 3b6e8436f6f9d6f1ba390a6ff73053549829f40d /cpp/src/Slice/CsUtil.cpp | |
parent | Fixed VC6 build failures (diff) | |
download | ice-36045f37b39ab655bea41947d5a8145c5a514328.tar.bz2 ice-36045f37b39ab655bea41947d5a8145c5a514328.tar.xz ice-36045f37b39ab655bea41947d5a8145c5a514328.zip |
Bug 2474.
Diffstat (limited to 'cpp/src/Slice/CsUtil.cpp')
-rwxr-xr-x | cpp/src/Slice/CsUtil.cpp | 49 |
1 files changed, 42 insertions, 7 deletions
diff --git a/cpp/src/Slice/CsUtil.cpp b/cpp/src/Slice/CsUtil.cpp index 364f8f3e9aa..c6dfb006e95 100755 --- a/cpp/src/Slice/CsUtil.cpp +++ b/cpp/src/Slice/CsUtil.cpp @@ -602,11 +602,21 @@ Slice::CsGenerator::writeMarshalUnmarshalCode(Output &out, } if(marshal) { - out << nl << stream << '.' << func << '(' << cast << param << ");"; + out << nl << stream << '.' << func << '(' << cast << param; + if(!streamingAPI) + { + out << ", " << sz; + } + out << ");"; } else { - out << nl << param << " = " << cast << stream << '.' << func << "()" << ';'; + out << nl << param << " = " << cast << stream << '.' << func << "("; + if(!streamingAPI) + { + out << sz; + } + out << ")" << ';'; } return; } @@ -1235,7 +1245,12 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << nl << typeS << "[] " << param << "_tmp = " << param << ".ToArray();"; out << nl << "for(int ix__ = " << param << "_tmp.Length - 1; ix__ >= 0; --ix__)"; out << sb; - out << nl << stream << '.' << func << "((" << dataType << ")" << param << "_tmp[ix__]);"; + out << nl << stream << '.' << func << "((" << dataType << ")" << param << "_tmp[ix__]"; + if(!streamingAPI) + { + out << ", " << sz; + } + out << ");"; out << eb; } else @@ -1244,7 +1259,12 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, << "> e__ = " << param << ".GetEnumerator();"; out << nl << "while(e__.MoveNext())"; out << sb; - out << nl << stream << '.' << func << "((" << dataType << ")e__.Current);"; + out << nl << stream << '.' << func << "((" << dataType << ")e__.Current"; + if(!streamingAPI) + { + out << ", " << sz; + } + out << ");"; out << eb; } } @@ -1252,7 +1272,12 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, { out << nl << "for(int ix__ = 0; ix__ < " << param << '.' << limitID << "; ++ix__)"; out << sb; - out << nl << stream << '.' << func << "((" << dataType << ")" << param << "[ix__]);"; + out << nl << stream << '.' << func << "((" << dataType << ")" << param << "[ix__]"; + if(!streamingAPI) + { + out << ", " << sz; + } + out << ");"; out << eb; } out << eb; @@ -1291,11 +1316,21 @@ Slice::CsGenerator::writeSequenceMarshalUnmarshalCode(Output& out, out << sb; if(isArray) { - out << nl << param << "[ix__] = (" << typeS << ')' << stream << "." << func << "();"; + out << nl << param << "[ix__] = (" << typeS << ')' << stream << "." << func << "("; + if(!streamingAPI) + { + out << sz; + } + out << ");"; } else { - out << nl << param << "." << addMethod << "((" << typeS << ')' << stream << "." << func << "());"; + out << nl << param << "." << addMethod << "((" << typeS << ')' << stream << "." << func << "("; + if(!streamingAPI) + { + out << sz; + } + out << "));"; } out << eb; out << eb; |