}
static void
-_etype_to_str(const Eolian_Typedecl *tp, Eina_Strbuf *buf)
+_etype_to_str(const Eolian_Unit *src, const Eolian_Typedecl *tp,
+ Eina_Strbuf *buf)
{
Eolian_Enum_Type_Field *ef;
Eina_List *l;
eina_strbuf_append(buf, ef->name);
if (ef->value)
{
- /* FIXME: pass unit properly */
- Eolian_Value val = eolian_expression_eval(NULL, ef->value,
+ Eolian_Value val = eolian_expression_eval(src, ef->value,
EOLIAN_MASK_INT);
const char *ret;
eina_strbuf_append(buf, " = ");
}
void
-database_typedecl_to_str(const Eolian_Typedecl *tp, Eina_Strbuf *buf)
+database_typedecl_to_str(const Eolian_Unit *src, const Eolian_Typedecl *tp,
+ Eina_Strbuf *buf)
{
switch (tp->type)
{
_atype_to_str(tp, buf);
break;
case EOLIAN_TYPEDECL_ENUM:
- _etype_to_str(tp, buf);
+ _etype_to_str(src, tp, buf);
break;
case EOLIAN_TYPEDECL_STRUCT:
case EOLIAN_TYPEDECL_STRUCT_OPAQUE:
Eina_Strbuf *buf;
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
buf = eina_strbuf_new();
- database_typedecl_to_str(tp, buf);
+ /* FIXME: pass unit properly */
+ database_typedecl_to_str(NULL, tp, buf);
ret = eina_stringshare_add(eina_strbuf_string_get(buf));
eina_strbuf_free(buf);
return ret;
void database_typedecl_del(Eolian_Typedecl *tp);
void database_type_to_str(const Eolian_Type *tp, Eina_Strbuf *buf, const char *name);
-void database_typedecl_to_str(const Eolian_Typedecl *tp, Eina_Strbuf *buf);
+void database_typedecl_to_str(const Eolian_Unit *src, const Eolian_Typedecl *tp, Eina_Strbuf *buf);
/* expressions */