eolian gen2: terminate EFL_OPS_DEFINE list

This commit is contained in:
Daniel Kolesa 2016-09-29 15:12:21 +02:00
parent 5272935573
commit 8a39a96bc5
1 changed files with 7 additions and 2 deletions

View File

@ -491,14 +491,19 @@ _gen_initializer(const Eolian_Class *cl, Eina_Strbuf *buf)
free(ocnamel);
}
/* strip the final comma before appending */
if (eina_strbuf_length_get(ops))
{
eina_strbuf_append(ops, " );\n");
eina_strbuf_remove(ops, eina_strbuf_length_get(ops) - 2,
eina_strbuf_length_get(ops));
eina_strbuf_append(ops, "\n );\n");
eina_strbuf_append(buf, eina_strbuf_string_get(ops));
}
if (eina_strbuf_length_get(cops))
{
eina_strbuf_append(cops, " );\n");
eina_strbuf_remove(cops, eina_strbuf_length_get(cops) - 2,
eina_strbuf_length_get(cops));
eina_strbuf_append(cops, "\n );\n");
eina_strbuf_append(buf, eina_strbuf_string_get(cops));
}