summaryrefslogtreecommitdiff
path: root/src
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 /src
parent7ea7f0b68ab1314fd893db4281c4502fb6a654d9 (diff)
eolian: add new __undefined_type builtin to silence warnings
Diffstat (limited to 'src')
-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)
217 if (!tp || eolian_type_is_extern(tp)) 217 if (!tp || eolian_type_is_extern(tp))
218 continue; 218 continue;
219 219
220 if (eolian_type_type_get(tp) == EOLIAN_TYPE_ALIAS)
221 {
222 const Eolian_Type *btp = eolian_type_base_type_get(tp);
223 if (eolian_type_type_get(btp) == EOLIAN_TYPE_REGULAR)
224 if (!strcmp(eolian_type_full_name_get(btp), "__undefined_type"))
225 continue;
226 }
227
220 Eina_Strbuf *tbuf = _type_generate(tp, full); 228 Eina_Strbuf *tbuf = _type_generate(tp, full);
221 if (tbuf) 229 if (tbuf)
222 { 230 {
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)
51 int id = eo_lexer_keyword_str_to_id(tp->full_name); 51 int id = eo_lexer_keyword_str_to_id(tp->full_name);
52 if (id) 52 if (id)
53 return eo_lexer_is_type_keyword(id); 53 return eo_lexer_is_type_keyword(id);
54 if (!strcmp(tp->full_name, "__undefined_type"))
55 return EINA_TRUE;
54 /* user defined */ 56 /* user defined */
55 tpp = eolian_type_base_type_get(tp); 57 tpp = eolian_type_base_type_get(tp);
56 if (!tpp) 58 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 */
3 3
4type @extern Evas.Pants: float; /* not generated */ 4type @extern Evas.Pants: float; /* not generated */
5 5
6type Undef: __undefined_type; /* not generated */
7
6enum Enum.Bar 8enum Enum.Bar
7{ 9{
8 legacy: bar; 10 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)
397 fail_if(strcmp(type_name, "List_Objects")); 397 fail_if(strcmp(type_name, "List_Objects"));
398 /* not generated extern, skip */ 398 /* not generated extern, skip */
399 fail_if(!eina_iterator_next(iter, (void**)&atype)); 399 fail_if(!eina_iterator_next(iter, (void**)&atype));
400 /* not generated undefined type, skip */
401 fail_if(!eina_iterator_next(iter, (void**)&atype));
400 fail_if(eina_iterator_next(iter, (void**)&atype)); 402 fail_if(eina_iterator_next(iter, (void**)&atype));
401 403
402 eolian_shutdown(); 404 eolian_shutdown();