q66 pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a5c7f92a52db98291e381e306842ea147631e103
commit a5c7f92a52db98291e381e306842ea147631e103 Author: Daniel Kolesa <d.kol...@samsung.com> Date: Tue Sep 10 14:25:03 2019 +0200 eolian: fix default value handling for @by_ref types We must check all pointerness first, and append NULL as default when that applies, because @by_ref is not carried in the typedecl info. Therefore, it would result in a false positive and try to make a zeroed struct, which we don't want. --- src/bin/eolian/sources.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c index fd0c32bb07..dd4b1f29ef 100644 --- a/src/bin/eolian/sources.c +++ b/src/bin/eolian/sources.c @@ -123,7 +123,7 @@ _append_defval(Eina_Strbuf *buf, const Eolian_Expression *exp, const Eolian_Type } /* default value or fallback */ const Eolian_Type *btp = eolian_type_aliased_base_get(tp); - if (eolian_type_is_ptr(btp)) + if (eolian_type_is_ptr(btp) || strchr(ctp, '*')) { eina_strbuf_append(buf, "NULL"); return; @@ -139,11 +139,6 @@ _append_defval(Eina_Strbuf *buf, const Eolian_Expression *exp, const Eolian_Type free(sn); return; } - if (strchr(ctp, '*')) - { - eina_strbuf_append(buf, "NULL"); - return; - } /* enums and remaining regulars... 0 should do */ eina_strbuf_append(buf, "0"); } --