summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2003-05-21 00:14:06 +0000
committerMichi Henning <michi@zeroc.com>2003-05-21 00:14:06 +0000
commitbe57e4affdf1d9edfcf26e17de1b18c04397710e (patch)
tree16197e475d32a215f5e6fa796025d2d8d5ec36a5 /cpp
parentRemoved erroneous setting of tracing properties. (diff)
downloadice-be57e4affdf1d9edfcf26e17de1b18c04397710e.tar.bz2
ice-be57e4affdf1d9edfcf26e17de1b18c04397710e.tar.xz
ice-be57e4affdf1d9edfcf26e17de1b18c04397710e.zip
Fixed incorrect code generation for Patcher constructor for dictionaries
with class values.
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/slice2java/Gen.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index defc48b26bc..b79d90f2f83 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -2885,8 +2885,17 @@ Slice::Gen::HelperVisitor::visitDictionary(const DictionaryPtr& p)
else
{
string s = typeToString(type, TypeModeIn, scope);
- out << nl << s << ' ' << arg << ';';
- writeMarshalUnmarshalCode(out, scope, type, arg, false, iter, false);
+ BuiltinPtr builtin = BuiltinPtr::dynamicCast(type);
+ if((builtin && builtin->kind() == Builtin::KindObject) || ClassDeclPtr::dynamicCast(type))
+ {
+ writeMarshalUnmarshalCode(out, scope, type, arg, false, iter, false, list<string>(),
+ "__r, __key");
+ }
+ else
+ {
+ out << nl << s << ' ' << arg << ';';
+ writeMarshalUnmarshalCode(out, scope, type, arg, false, iter, false);
+ }
}
}
if(!(builtin && builtin->kind() == Builtin::KindObject) && !ClassDeclPtr::dynamicCast(value))