summaryrefslogtreecommitdiff
path: root/cpp/src/Slice/VbUtil.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2005-02-28 03:55:14 +0000
committerMichi Henning <michi@zeroc.com>2005-02-28 03:55:14 +0000
commit0c278af888b1cdf05685e41022d84f6a73351613 (patch)
treee8a691b7d8a625baa0d79fb7b3637bedbbb416a5 /cpp/src/Slice/VbUtil.cpp
parentAdded mention of fix for (diff)
downloadice-0c278af888b1cdf05685e41022d84f6a73351613.tar.bz2
ice-0c278af888b1cdf05685e41022d84f6a73351613.tar.xz
ice-0c278af888b1cdf05685e41022d84f6a73351613.zip
Added fix for http://www.zeroc.com/vbulletin/showthread.php?t=1225.
Diffstat (limited to 'cpp/src/Slice/VbUtil.cpp')
-rwxr-xr-xcpp/src/Slice/VbUtil.cpp28
1 files changed, 23 insertions, 5 deletions
diff --git a/cpp/src/Slice/VbUtil.cpp b/cpp/src/Slice/VbUtil.cpp
index 7aa942545b8..0a74bad392d 100755
--- a/cpp/src/Slice/VbUtil.cpp
+++ b/cpp/src/Slice/VbUtil.cpp
@@ -590,12 +590,12 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
{
if(builtin->isVariableLength())
{
- out << nl << stream << ".startSeq(__len, " << static_cast<unsigned>(builtin->minWireSize())
+ out << nl << stream << ".startSeq(__lenx, " << static_cast<unsigned>(builtin->minWireSize())
<< ")";
}
else
{
- out << nl << stream << ".checkFixedSeq(__len, "
+ out << nl << stream << ".checkFixedSeq(__lenx, "
<< static_cast<unsigned>(builtin->minWireSize()) << ")";
}
}
@@ -637,7 +637,16 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
}
out << nl << "For __ix As Integer = 0 To __lenx - 1";
out.inc();
- out << nl << param << "(__ix) = " << stream << ".readProxy()";
+ if(isArray)
+ {
+ out << nl << param << "(__ix) = " << stream << ".readProxy()";
+ }
+ else
+ {
+ out << nl << "Dim __val As Ice.ObjectPrx = New Ice.ObjectPrxHelperBase";
+ out << nl << "__val = " << stream << ".readProxy()";
+ out << nl << param << ".Add(__val)";
+ }
out.dec();
out << nl << "Next";
}
@@ -802,9 +811,18 @@ Slice::VbGenerator::writeSequenceMarshalUnmarshalCode(Output& out,
{
out << fixId(seq->scoped()) << "(szx)";
}
- out << nl << "For __ix As Integer = 0 To " << param << '.' << limitID << " - 1";
+ out << nl << "For __ix As Integer = 0 To szx - 1";
out.inc();
- out << nl << param << "(__ix).__read(" << stream << ")";
+ if(isArray)
+ {
+ out << nl << param << "(__ix).__read(" << stream << ")";
+ }
+ else
+ {
+ out << nl << "Dim __val As " << typeS << " = New " << typeS;
+ out << nl << "__val.__read(" << stream << ')';
+ out << nl << param << ".Add(__val)";
+ }
if(!streamingAPI && type->isVariableLength())
{
out << nl << stream << ".checkSeq()";