From be57e4affdf1d9edfcf26e17de1b18c04397710e Mon Sep 17 00:00:00 2001 From: Michi Henning Date: Wed, 21 May 2003 00:14:06 +0000 Subject: Fixed incorrect code generation for Patcher constructor for dictionaries with class values. --- cpp/src/slice2java/Gen.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'cpp/src/slice2java/Gen.cpp') 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(), + "__r, __key"); + } + else + { + out << nl << s << ' ' << arg << ';'; + writeMarshalUnmarshalCode(out, scope, type, arg, false, iter, false); + } } } if(!(builtin && builtin->kind() == Builtin::KindObject) && !ClassDeclPtr::dynamicCast(value)) -- cgit v1.2.3