q66 pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=660e23fd75b40f09dfaba099b25121bf9d7e834e

commit 660e23fd75b40f09dfaba099b25121bf9d7e834e
Author: Daniel Kolesa <d.kol...@osg.samsung.com>
Date:   Wed Jun 10 16:42:12 2015 +0100

    eolian: add new __undefined_type builtin to silence warnings
---
 src/bin/eolian/types_generator.c   | 8 ++++++++
 src/lib/eolian/database_validate.c | 2 ++
 src/tests/eolian/data/typedef.eo   | 2 ++
 src/tests/eolian/eolian_parsing.c  | 2 ++
 4 files changed, 14 insertions(+)

diff --git a/src/bin/eolian/types_generator.c b/src/bin/eolian/types_generator.c
index 3bdd5d3..5979aa9 100644
--- a/src/bin/eolian/types_generator.c
+++ b/src/bin/eolian/types_generator.c
@@ -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)
           {
diff --git a/src/lib/eolian/database_validate.c 
b/src/lib/eolian/database_validate.c
index b1f1a9f..c5d3609 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -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)
diff --git a/src/tests/eolian/data/typedef.eo b/src/tests/eolian/data/typedef.eo
index 65036eb..71bebb8 100644
--- a/src/tests/eolian/data/typedef.eo
+++ b/src/tests/eolian/data/typedef.eo
@@ -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;
diff --git a/src/tests/eolian/eolian_parsing.c 
b/src/tests/eolian/eolian_parsing.c
index f5e441b..76438cd 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -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();

-- 


Reply via email to