eolian/generator: fix enum field doc generator bug

This resulted in a field using the next field's docs rather
than its own, because it incremented the member before
even trying to retrieve the docs.

@fix
This commit is contained in:
Daniel Kolesa 2015-06-11 16:13:22 +01:00
parent ec53cee9a6
commit 4bdf82908e
1 changed files with 3 additions and 3 deletions

View File

@ -160,12 +160,12 @@ _type_generate(const Eolian_Type *tp, Eina_Bool full)
}
eina_stringshare_del(lit);
}
next = eina_iterator_next(members, (void**)&member);
if (next)
eina_strbuf_append(buf, ",");
const char *fdesc = eolian_type_enum_field_description_get(member);
const Eolian_Documentation *fdoc
= eolian_type_enum_field_documentation_get(member);
next = eina_iterator_next(members, (void**)&member);
if (next)
eina_strbuf_append(buf, ",");
if (fdesc) eina_strbuf_append_printf(buf, " /** %s */", fdesc);
else if (fdoc)
{