eolian generator: use new call syntax

This commit is contained in:
Daniel Kolesa 2016-03-01 14:13:16 +00:00 committed by Tom Hacohen
parent eb5aa57159
commit 737a297a79
2 changed files with 8 additions and 10 deletions

View File

@ -160,6 +160,8 @@ _prototype_generate(const Eolian_Function *foo, Eolian_Function_Type ftype, Eina
_params_generate(foo, ftype, var_as_ret, params, short_params);
if (eina_strbuf_length_get(params))
eina_strbuf_prepend_printf(params, ", ");
if (eina_strbuf_length_get(short_params))
eina_strbuf_prepend_printf(short_params, ", ");
fname = eolian_function_name_get(foo);
if (fname)
@ -172,9 +174,9 @@ _prototype_generate(const Eolian_Function *foo, Eolian_Function_Type ftype, Eina
{
eina_strbuf_append_printf
(super_invok,
" eo_do_super(obj, %s_%s, %s_%s(%s));\n",
class_env.upper_eo_prefix, class_env.upper_classtype,
" %s_%s(eo_super(obj, %s_%s)%s);\n",
impl_env.lower_eo_prefix, eolian_function_name_get(foo),
class_env.upper_eo_prefix, class_env.upper_classtype,
eina_strbuf_string_get(short_params));
}
}

View File

@ -23,9 +23,7 @@ tmpl_eapi_body[] ="\
EAPI @#ret_type\n\
@#eapi_func(@#full_params)\n\
{\n\
@#ret_type ret;\n\
eo_do(@#eo_obj, ret = @#eo_func(@#eo_params));\n\
return ret;\n\
return @#eo_func(@#eo_obj@#eo_params);\n\
}\n\
";
static const char
@ -34,7 +32,7 @@ tmpl_eapi_body_void[] ="\
EAPI void\n\
@#eapi_func(@#full_params)\n\
{\n\
eo_do(@#eo_obj, @#eo_func(@#eo_params));\n\
@#eo_func(@#eo_obj@#eo_params);\n\
}\n\
";
@ -266,8 +264,7 @@ _eapi_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eo
if (eina_strbuf_length_get(fparam)) eina_strbuf_append(fparam, ", ");
eina_strbuf_append_printf(fparam, "%s %s", ptype, pname);
eina_stringshare_del(ptype);
if (eina_strbuf_length_get(eoparam)) eina_strbuf_append(eoparam, ", ");
eina_strbuf_append_printf(eoparam, "%s", pname);
eina_strbuf_append_printf(eoparam, ", %s", pname);
}
eina_iterator_free(itr);
if (!var_as_ret)
@ -286,8 +283,7 @@ _eapi_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eo
eina_strbuf_append_printf(fparam, "%s%s%s%s",
ptype, had_star?"":" ", add_star?"*":"", pname);
eina_stringshare_del(ptype);
if (eina_strbuf_length_get(eoparam)) eina_strbuf_append(eoparam, ", ");
eina_strbuf_append_printf(eoparam, "%s", pname);
eina_strbuf_append_printf(eoparam, ", %s", pname);
}
eina_iterator_free(itr);
}