diff options
author | Daniel Zaoui <daniel.zaoui@samsung.com> | 2014-04-11 10:38:53 +0300 |
---|---|---|
committer | Daniel Zaoui <daniel.zaoui@samsung.com> | 2014-04-13 11:30:39 +0300 |
commit | fc9682bd7f3c23fafbc5ad7504ef0affc7ff0fb1 (patch) | |
tree | 914c83d4ad9fa99992c39cc2d7b3f877fdbf92c9 | |
parent | bdb8542e3bca2ca8e9a01590c2d470e4d321cb79 (diff) | |
download | efl-fc9682bd7f3c23fafbc5ad7504ef0affc7ff0fb1.tar.gz |
Eolian: fix generation of Eo2 functions definitions.
When keys are used in property, the Eo2 macro was not well chosen.
-rw-r--r-- | src/bin/eolian/eo1_generator.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/eolian/eo1_generator.c b/src/bin/eolian/eo1_generator.c index ce4ffd6f37..fb3bce4d44 100644 --- a/src/bin/eolian/eo1_generator.c +++ b/src/bin/eolian/eo1_generator.c @@ -513,7 +513,8 @@ eo1_bind_func_generate(const char *classname, Eolian_Function funcid, Eolian_Fun is_const?"const ":"", ptype, pname, is_const?"const ":"", _varg_upgr(ptype)); #endif - eina_strbuf_append_printf(params, ", %s", pname); + if (eina_strbuf_length_get(params)) eina_strbuf_append(params, ", "); + eina_strbuf_append_printf(params, "%s", pname); eina_strbuf_append_printf(full_params, ", %s%s %s", is_const?"const ":"", ptype, pname); @@ -596,9 +597,8 @@ eo1_bind_func_generate(const char *classname, Eolian_Function funcid, Eolian_Fun { Eina_Strbuf *eo_func_decl = eina_strbuf_new(); Eina_Bool has_params = - !var_as_ret && - (eina_list_count(eolian_parameters_list_get(funcid)) != 0 || - eina_list_count(eolian_property_keys_list_get(funcid))); + eina_list_count(eolian_property_keys_list_get(funcid)) || + (!var_as_ret && eina_list_count(eolian_parameters_list_get(funcid)) != 0); Eina_Bool ret_is_void = (!rettype || !strcmp(rettype, "void")); eina_strbuf_append_printf(eo_func_decl, "EAPI EO_%sFUNC_BODY%s(%s_%s%s", |