eolian: fix type generation for function pointers

This commit is contained in:
Daniel Kolesa 2014-08-22 13:45:20 +01:00
parent 8b6eadcb3c
commit 189bc4512d
2 changed files with 3 additions and 1 deletions

View File

@ -61,8 +61,9 @@ _type_generate(const Eolian_Type *tp, Eina_Bool in_typedef)
{
char *name = _concat_name(tp);
Eina_Stringshare *c_type = eolian_type_c_type_get(base_tp);
Eina_Bool space = eolian_type_type_get(base_tp) != EOLIAN_TYPE_POINTER;
eina_strbuf_append_printf(buf, "typedef %s%s%s",
c_type, !name || strchr(c_type, '*')?"":" ",
c_type, !name || space ? " " : "",
name?name:"");
free(name);
}

View File

@ -89,6 +89,7 @@ _ftype_to_str(const Eolian_Type *tp, Eina_Strbuf *buf, const char *name)
first = EINA_FALSE;
database_type_to_str(stp, buf, NULL);
}
eina_strbuf_append(buf, ")");
}
static void