eolian/generator: properly generate the data arg on class methods

For class methods, we need to generate unused void*, not a pointer to data struct.
This commit is contained in:
Daniel Kolesa 2014-07-24 15:32:34 +01:00
parent e2c51100c7
commit 58a9de0309
1 changed files with 4 additions and 1 deletions

View File

@ -484,9 +484,12 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
if (need_implementation)
{
Eina_Bool is_cf = eolian_function_is_class(funcid);
if (is_cf)
eina_strbuf_append(full_params, " EINA_UNUSED");
eina_strbuf_replace_all(fbody, "@#full_params", eina_strbuf_string_get(full_params));
const char *data_type = eolian_class_data_type_get(class);
if (data_type && !strcmp(data_type, "null"))
if (is_cf || (data_type && !strcmp(data_type, "null")))
eina_strbuf_replace_all(fbody, "@#Datatype_Data", "void");
else
{