forked from enlightenment/efl
eolian: add new __undefined_type builtin to silence warnings
This commit is contained in:
parent
7ea7f0b68a
commit
660e23fd75
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue