eolian: add new __undefined_type builtin to silence warnings

This commit is contained in:
Daniel Kolesa 2015-06-10 16:42:12 +01:00
parent 7ea7f0b68a
commit 660e23fd75
4 changed files with 14 additions and 0 deletions

View File

@ -217,6 +217,14 @@ types_header_generate(const char *eo_filename, Eina_Strbuf *buf, Eina_Bool full)
if (!tp || eolian_type_is_extern(tp))
continue;
if (eolian_type_type_get(tp) == EOLIAN_TYPE_ALIAS)
{
const Eolian_Type *btp = eolian_type_base_type_get(tp);
if (eolian_type_type_get(btp) == EOLIAN_TYPE_REGULAR)
if (!strcmp(eolian_type_full_name_get(btp), "__undefined_type"))
continue;
}
Eina_Strbuf *tbuf = _type_generate(tp, full);
if (tbuf)
{

View File

@ -51,6 +51,8 @@ _validate_type(const Eolian_Type *tp)
int id = eo_lexer_keyword_str_to_id(tp->full_name);
if (id)
return eo_lexer_is_type_keyword(id);
if (!strcmp(tp->full_name, "__undefined_type"))
return EINA_TRUE;
/* user defined */
tpp = eolian_type_base_type_get(tp);
if (!tpp)

View File

@ -3,6 +3,8 @@ type List_Objects: own(list<Eo *>*); /* A little more complex */
type @extern Evas.Pants: float; /* not generated */
type Undef: __undefined_type; /* not generated */
enum Enum.Bar
{
legacy: bar;

View File

@ -397,6 +397,8 @@ START_TEST(eolian_typedef)
fail_if(strcmp(type_name, "List_Objects"));
/* not generated extern, skip */
fail_if(!eina_iterator_next(iter, (void**)&atype));
/* not generated undefined type, skip */
fail_if(!eina_iterator_next(iter, (void**)&atype));
fail_if(eina_iterator_next(iter, (void**)&atype));
eolian_shutdown();