aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-06-10 16:42:12 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-06-10 16:56:37 +0100
commit660e23fd75b40f09dfaba099b25121bf9d7e834e (patch)
tree07268db1b602dc43790a0c66aca347df50463a4f
parenteolian: fix wrong type keyword check (diff)
downloadefl-660e23fd75b40f09dfaba099b25121bf9d7e834e.tar.gz
eolian: add new __undefined_type builtin to silence warnings
-rw-r--r--src/bin/eolian/types_generator.c8
-rw-r--r--src/lib/eolian/database_validate.c2
-rw-r--r--src/tests/eolian/data/typedef.eo2
-rw-r--r--src/tests/eolian/eolian_parsing.c2
4 files changed, 14 insertions, 0 deletions
diff --git a/src/bin/eolian/types_generator.c b/src/bin/eolian/types_generator.c
index 3bdd5d3981..5979aa9da2 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 b1f1a9f864..c5d36098c0 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 65036eb794..71bebb821d 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 f5e441ba85..76438cd28b 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();