summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-11-19 14:04:37 +0000
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-11-19 14:05:16 +0000
commitb3867ce395f9a65dfebcfe9b05d4c1fe6861d2cf (patch)
tree27841ae2cd2037e109aa9bcacff5f53f0290d3ad /src
parentb2202a50646922134d4ee9dbcc49cd664a395d9b (diff)
eolian: turn "undefined type" into its own EOLIAN_TYPE
Diffstat (limited to 'src')
-rw-r--r--src/bin/eolian/types_generator.c5
-rw-r--r--src/bindings/luajit/eolian.lua3
-rw-r--r--src/lib/eolian/Eolian.h3
-rw-r--r--src/lib/eolian/database_validate.c3
-rw-r--r--src/lib/eolian/eo_lexer.h2
-rw-r--r--src/lib/eolian/eo_parser.c5
6 files changed, 13 insertions, 8 deletions
diff --git a/src/bin/eolian/types_generator.c b/src/bin/eolian/types_generator.c
index 5fee46b729..32864fded7 100644
--- a/src/bin/eolian/types_generator.c
+++ b/src/bin/eolian/types_generator.c
@@ -198,9 +198,8 @@ types_header_generate(const char *eo_filename, Eina_Strbuf *buf, Eina_Bool full,
198 if (eolian_type_type_get(tp) == EOLIAN_TYPE_ALIAS) 198 if (eolian_type_type_get(tp) == EOLIAN_TYPE_ALIAS)
199 { 199 {
200 const Eolian_Type *btp = eolian_type_base_type_get(tp); 200 const Eolian_Type *btp = eolian_type_base_type_get(tp);
201 if (eolian_type_type_get(btp) == EOLIAN_TYPE_REGULAR) 201 if (eolian_type_type_get(btp) == EOLIAN_TYPE_UNDEFINED)
202 if (!strcmp(eolian_type_full_name_get(btp), "__undefined_type")) 202 continue;
203 continue;
204 } 203 }
205 204
206 Eina_Strbuf *tbuf = _type_generate(tp, full, use_legacy); 205 Eina_Strbuf *tbuf = _type_generate(tp, full, use_legacy);
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index e71eaadf83..96be587a62 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -424,7 +424,8 @@ M.type_type = {
424 STRUCT_OPAQUE = 7, 424 STRUCT_OPAQUE = 7,
425 ENUM = 8, 425 ENUM = 8,
426 ALIAS = 9, 426 ALIAS = 9,
427 CLASS = 10 427 CLASS = 10,
428 UNDEFINED = 11
428} 429}
429 430
430ffi.metatype("Eolian_Struct_Type_Field", { 431ffi.metatype("Eolian_Struct_Type_Field", {
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 2aeb664838..44b4e9abe1 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -208,7 +208,8 @@ typedef enum
208 EOLIAN_TYPE_STRUCT_OPAQUE, 208 EOLIAN_TYPE_STRUCT_OPAQUE,
209 EOLIAN_TYPE_ENUM, 209 EOLIAN_TYPE_ENUM,
210 EOLIAN_TYPE_ALIAS, 210 EOLIAN_TYPE_ALIAS,
211 EOLIAN_TYPE_CLASS 211 EOLIAN_TYPE_CLASS,
212 EOLIAN_TYPE_UNDEFINED
212} Eolian_Type_Type; 213} Eolian_Type_Type;
213 214
214typedef enum 215typedef enum
diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c
index 43ab8bcba7..938d6c817e 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -176,6 +176,7 @@ _validate_type(const Eolian_Type *tp)
176 switch (tp->type) 176 switch (tp->type)
177 { 177 {
178 case EOLIAN_TYPE_VOID: 178 case EOLIAN_TYPE_VOID:
179 case EOLIAN_TYPE_UNDEFINED:
179 case EOLIAN_TYPE_COMPLEX: 180 case EOLIAN_TYPE_COMPLEX:
180 return EINA_TRUE; 181 return EINA_TRUE;
181 case EOLIAN_TYPE_REGULAR: 182 case EOLIAN_TYPE_REGULAR:
@@ -185,8 +186,6 @@ _validate_type(const Eolian_Type *tp)
185 int id = eo_lexer_keyword_str_to_id(tp->full_name); 186 int id = eo_lexer_keyword_str_to_id(tp->full_name);
186 if (id) 187 if (id)
187 return eo_lexer_is_type_keyword(id); 188 return eo_lexer_is_type_keyword(id);
188 if (!strcmp(tp->full_name, "__undefined_type"))
189 return EINA_TRUE;
190 /* user defined */ 189 /* user defined */
191 tpp = eolian_type_base_type_get(tp); 190 tpp = eolian_type_base_type_get(tp);
192 if (!tpp) 191 if (!tpp)
diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h
index 8bb8f688ce..9508765288 100644
--- a/src/lib/eolian/eo_lexer.h
+++ b/src/lib/eolian/eo_lexer.h
@@ -52,7 +52,7 @@ enum Tokens
52 \ 52 \
53 KW(accessor), KW(array), KW(iterator), KW(hash), KW(list), KW(generic_value), \ 53 KW(accessor), KW(array), KW(iterator), KW(hash), KW(list), KW(generic_value), \
54 \ 54 \
55 KW(__builtin_event_cb), \ 55 KW(__builtin_event_cb), KW(__undefined_type), \
56 \ 56 \
57 KW(true), KW(false), KW(null) 57 KW(true), KW(false), KW(null)
58 58
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 53dbe32fc8..43fb30f04d 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -752,6 +752,11 @@ parse_type_void_base(Eo_Lexer *ls, Eina_Bool noptr)
752 def->type = EOLIAN_TYPE_VOID; 752 def->type = EOLIAN_TYPE_VOID;
753 eo_lexer_get(ls); 753 eo_lexer_get(ls);
754 } 754 }
755 else if (ls->t.kw == KW___undefined_type)
756 {
757 def->type = EOLIAN_TYPE_UNDEFINED;
758 eo_lexer_get(ls);
759 }
755 else 760 else
756 { 761 {
757 int tpid = ls->t.kw; 762 int tpid = ls->t.kw;