eolian: clean up type generation + fix function pointers

This commit is contained in:
Daniel Kolesa 2014-08-22 14:04:22 +01:00
parent 4fa161fffa
commit 19d8209266
2 changed files with 4 additions and 6 deletions

View File

@ -60,11 +60,8 @@ _type_generate(const Eolian_Type *tp, Eina_Bool in_typedef)
else
{
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 || space ? " " : "",
name?name:"");
Eina_Stringshare *c_type = eolian_type_c_type_named_get(base_tp, name);
eina_strbuf_append_printf(buf, "typedef %s", c_type);
free(name);
}
break;

View File

@ -262,7 +262,8 @@ database_type_to_str(const Eolian_Type *tp, Eina_Strbuf *buf, const char *name)
}
if (name)
{
eina_strbuf_append_char(buf, ' ');
if (tp->type != EOLIAN_TYPE_POINTER)
eina_strbuf_append_char(buf, ' ');
eina_strbuf_append(buf, name);
}
}