Commit 923482f7 authored by Botond Baranyi's avatar Botond Baranyi
Browse files

Fixed type descriptor generation for anytypes (bug 549218)



Change-Id: Ie85957c595308861d25398772db336a39781fd4a
Signed-off-by: Botond Baranyi's avatarBotond Baranyi <botond.baranyi@ericsson.com>
parent 51ff5d3b
......@@ -7494,6 +7494,7 @@ namespace Common {
string Type::get_genname_typedescriptor(Scope *p_scope)
{
Type *t = this;
bool is_anytype = get_type_refd_last()->typetype == T_ANYTYPE;
for ( ; ; ) {
/* If it has tags or encoding attributes, then its encoding may be
* different from the other "equivalent" types and needs to have its own
......@@ -7501,7 +7502,7 @@ namespace Common {
*/
if (t->is_tagged() || t->rawattrib || t->textattrib || t->jsonattrib ||
(!t->is_asn1() && t->hasEncodeAttr(get_encoding_name(CT_JSON))) ||
(t->xerattrib && !t->xerattrib->empty() ) ||
(!is_anytype && t->xerattrib && !t->xerattrib->empty() ) ||
(asn1_xer && t->is_asn1() && t->ownertype != OT_RECORD_OF && t->ownertype != OT_REF_SPEC) ||
(t->oerattrib && !t->oerattrib->empty() && t->is_asn1()))
{
......
......@@ -433,7 +433,7 @@ void Type::generate_code_typedescriptor(output_struct *target)
if (T_SEQOF == last->typetype || T_SETOF == last->typetype) {
target->source.global_vars=mputprintf(target->source.global_vars,
"&%s_descr_, ", get_type_refd_last()->u.seof.ofType->get_genname_typedescriptor(my_scope).c_str());
"&%s_descr_, ", last->u.seof.ofType->get_genname_typedescriptor(my_scope).c_str());
}
else {
target->source.global_vars = mputstr(target->source.global_vars,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment