eolian gen2: terminate EFL_OPS_DEFINE list
authorDaniel Kolesa <d.kolesa@osg.samsung.com>
Thu, 29 Sep 2016 13:12:21 +0000 (15:12 +0200)
committerDaniel Kolesa <d.kolesa@osg.samsung.com>
Fri, 7 Oct 2016 09:54:23 +0000 (11:54 +0200)
src/bin/eolian2/sources.c

index b89c72b..6b836e2 100644 (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));
      }