summaryrefslogtreecommitdiff
path: root/cpp/src/slice2cpp/GenUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2cpp/GenUtil.cpp')
-rw-r--r--cpp/src/slice2cpp/GenUtil.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/cpp/src/slice2cpp/GenUtil.cpp b/cpp/src/slice2cpp/GenUtil.cpp
index 4249d7a7cda..1a94c7a1a41 100644
--- a/cpp/src/slice2cpp/GenUtil.cpp
+++ b/cpp/src/slice2cpp/GenUtil.cpp
@@ -287,21 +287,29 @@ Slice::writeMarshalUnmarshalCode(Output& out, const TypePtr& type, const string&
return;
}
- VectorPtr vec = VectorPtr::dynamicCast(type);
- if (vec)
+ SequencePtr seq = SequencePtr::dynamicCast(type);
+ if (seq)
{
- if (BuiltinPtr::dynamicCast(vec->type()))
+ if (BuiltinPtr::dynamicCast(seq->type()))
{
out << nl << stream << "->" << func << param << ");";
}
else
{
- out << nl << vec->scope() << "::__" << func << stream << ", " << param << ", " << vec->scope()
- << "::__U__" << vec->name() << "());";
+ out << nl << seq->scope() << "::__" << func << stream << ", " << param << ", " << seq->scope()
+ << "::__U__" << seq->name() << "());";
}
return;
}
+ DictionaryPtr dict = DictionaryPtr::dynamicCast(type);
+ if (dict)
+ {
+ out << nl << dict->scope() << "::__" << func << stream << ", " << param << ", " << dict->scope()
+ << "::__U__" << dict->name() << "());";
+ return;
+ }
+
NativePtr native = NativePtr::dynamicCast(type);
assert(!native); // TODO