From 8a39a96bc5f7b2ba9bb37bbf5244872ce64a357a Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Thu, 29 Sep 2016 15:12:21 +0200 Subject: [PATCH] eolian gen2: terminate EFL_OPS_DEFINE list --- src/bin/eolian2/sources.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/bin/eolian2/sources.c b/src/bin/eolian2/sources.c index b89c72b..6b836e2 100644 --- a/src/bin/eolian2/sources.c +++ b/src/bin/eolian2/sources.c @@ -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)); } -- 2.7.4