}
static void
-_atype_to_str(const Eolian_Typedecl *tp, Eina_Strbuf *buf)
+_append_name(const Eolian_Typedecl *tp, Eina_Strbuf *buf)
{
- Eina_Strbuf *fulln = eina_strbuf_new();
Eina_List *l;
const char *sp;
+ EINA_LIST_FOREACH(tp->namespaces, l, sp)
+ {
+ eina_strbuf_append(buf, sp);
+ eina_strbuf_append_char(buf, '_');
+ }
+ eina_strbuf_append(buf, tp->name);
+}
+
+static void
+_atype_to_str(const Eolian_Typedecl *tp, Eina_Strbuf *buf)
+{
eina_strbuf_append(buf, "typedef ");
- EINA_LIST_FOREACH(tp->namespaces, l, sp)
+ if (tp->base_type->type == EOLIAN_TYPE_REGULAR &&
+ !strcmp(tp->base_type->name, "__builtin_event_cb"))
{
- eina_strbuf_append(fulln, sp);
- eina_strbuf_append_char(fulln, '_');
+ eina_strbuf_append(buf, "Eina_Bool (*");
+ _append_name(tp, buf);
+ eina_strbuf_append(buf, ")(void *data, const Eo_Event *event)");
+ return;
}
- eina_strbuf_append(fulln, tp->name);
+ Eina_Strbuf *fulln = eina_strbuf_new();
+ _append_name(tp, fulln);
database_type_to_str(tp->base_type, buf, eina_strbuf_string_get(fulln));
eina_strbuf_free(fulln);
}
fail_if(!eina_iterator_next(iter, (void**)&tdl));
/* not generated undefined type, skip */
fail_if(!eina_iterator_next(iter, (void**)&tdl));
+ /* event type, tested by generation tests */
+ fail_if(!eina_iterator_next(iter, (void**)&tdl));
fail_if(eina_iterator_next(iter, (void**)&tdl));
eolian_shutdown();