diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 13 |
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)) |