diff options
author | Daniel Kolesa <d.kolesa@samsung.com> | 2019-12-02 12:06:34 +0100 |
---|---|---|
committer | Daniel Kolesa <d.kolesa@samsung.com> | 2019-12-02 12:09:50 +0100 |
commit | cf3ec7473b49339c88af2169e54f94bb7fd271bf (patch) | |
tree | 58953c9a97bedeceda64694b93b662a24be78d97 | |
parent | 9f50f08349adb801d5b1b8ad3c6201a15762cb34 (diff) | |
download | efl-cf3ec7473b49339c88af2169e54f94bb7fd271bf.tar.gz |
eolian_gen: fix fallback 0 default values for slices
-rw-r--r-- | src/bin/eolian/sources.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bin/eolian/sources.c b/src/bin/eolian/sources.c index 58be274e4f..26e031f4c7 100644 --- a/src/bin/eolian/sources.c +++ b/src/bin/eolian/sources.c @@ -139,6 +139,16 @@ _append_defval(Eina_Strbuf *buf, const Eolian_Expression *exp, const Eolian_Type free(sn); return; } + /* slices are value types that don't boil down to pointers */ + switch (eolian_type_builtin_type_get(btp)) + { + case EOLIAN_TYPE_BUILTIN_SLICE: + case EOLIAN_TYPE_BUILTIN_RW_SLICE: + eina_strbuf_append_printf(buf, "((%s){0})", eolian_type_c_name_get(btp)); + return; + default: + break; + } /* enums and remaining regulars... 0 should do */ eina_strbuf_append(buf, "0"); } |