eolian: add support for the container array
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Wed, 23 Jan 2019 13:39:44 +0000 (14:39 +0100)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 24 Jan 2019 05:20:19 +0000 (14:20 +0900)
this fixes a lot of different warnings in the efl_mono test generation.

Reviewed-by: Daniel Kolesa <daniel@octaforge.org>
Differential Revision: https://phab.enlightenment.org/D7730

src/bin/eolian/sources.c

index d80ca74abe5820084cc51a12cb801a55038b185a..a0caefce6c44f2840b0929fae6d1a24cd250e119 100644 (file)
@@ -258,6 +258,18 @@ _generate_iterative_free(Eina_Strbuf **buf, const Eolian_Type *type, const Eolia
         eina_strbuf_append_buffer(*buf, param);
         eina_strbuf_append(*buf, ");\n");
      }
+   else if (t == EOLIAN_TYPE_BUILTIN_ARRAY)
+     {
+        eina_strbuf_append_printf(*buf, "   while((");
+        eina_strbuf_append_buffer(*buf, iter_param);
+        eina_strbuf_append_printf(*buf, " = eina_array_pop(");
+        eina_strbuf_append_buffer(*buf, param);
+        eina_strbuf_append_printf(*buf, ")))\n");
+        _generate_loop_content(buf, inner_type, iter_param);
+        eina_strbuf_append_printf(*buf, "   eina_array_free(");
+        eina_strbuf_append_buffer(*buf, param);
+        eina_strbuf_append_printf(*buf, ");\n");
+      }
    else
      {
         printf("Error, container unknown?! %d\n", (int)t);