summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-22 16:46:07 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-22 16:46:07 +0100
commitb339313e4b8df1076b7db6fb68d6ea09d337521b (patch)
treed3d549283d80a28c799998c40d14d26bd12b24ac
parent9bbc224f966a40f221ae87a4ff0c134be289d3ba (diff)
eolian: remove obsolete code dealing with multiple classes per file
-rw-r--r--src/lib/eolian/database_fill.c15
-rw-r--r--src/lib/eolian/eo_lexer.c4
-rw-r--r--src/lib/eolian/eo_lexer.h1
-rw-r--r--src/lib/eolian/eo_parser.c2
-rw-r--r--src/lib/eolian/eolian_database.c15
5 files changed, 11 insertions, 26 deletions
diff --git a/src/lib/eolian/database_fill.c b/src/lib/eolian/database_fill.c
index 38ff1a31d9..9a24a11389 100644
--- a/src/lib/eolian/database_fill.c
+++ b/src/lib/eolian/database_fill.c
@@ -235,20 +235,15 @@ eo_parser_database_fill(const char *filename, Eina_Bool eot)
235 235
236 if (eot) goto done; 236 if (eot) goto done;
237 237
238 if (!eina_list_count(ls->tmp.classes)) 238 if (!(cl = ls->tmp.kls))
239 { 239 {
240 fprintf(stderr, "eolian: no classes for file '%s'\n", filename); 240 fprintf(stderr, "eolian: no class for file '%s'\n", filename);
241 goto error; 241 goto error;
242 } 242 }
243 ls->tmp.kls = NULL;
243 244
244 while (ls->tmp.classes) 245 if (!_db_fill_class(cl))
245 { 246 goto error;
246 cl = eina_list_data_get(ls->tmp.classes);
247 if (!_db_fill_class(cl))
248 goto error;
249 ls->tmp.classes = eina_list_remove_list(ls->tmp.classes,
250 ls->tmp.classes);
251 }
252 247
253done: 248done:
254 if (eot) 249 if (eot)
diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c
index c84df4b362..e83856422d 100644
--- a/src/lib/eolian/eo_lexer.c
+++ b/src/lib/eolian/eo_lexer.c
@@ -677,7 +677,6 @@ _temps_free(Eo_Lexer_Temps *tmp)
677{ 677{
678 Eina_Strbuf *buf; 678 Eina_Strbuf *buf;
679 Eolian_Type *tp; 679 Eolian_Type *tp;
680 Eolian_Class *cl;
681 const char *s; 680 const char *s;
682 681
683 if (tmp->kls) 682 if (tmp->kls)
@@ -697,9 +696,6 @@ _temps_free(Eo_Lexer_Temps *tmp)
697 696
698 EINA_LIST_FREE(tmp->strs, s) 697 EINA_LIST_FREE(tmp->strs, s)
699 if (s) eina_stringshare_del(s); 698 if (s) eina_stringshare_del(s);
700
701 EINA_LIST_FREE(tmp->classes, cl)
702 database_class_del(cl);
703} 699}
704 700
705void 701void
diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h
index 60c13a651f..0ffda4abbd 100644
--- a/src/lib/eolian/eo_lexer.h
+++ b/src/lib/eolian/eo_lexer.h
@@ -98,7 +98,6 @@ typedef struct _Eo_Lexer_Temps
98{ 98{
99 Eolian_Class *kls; 99 Eolian_Class *kls;
100 Eolian_Variable *var; 100 Eolian_Variable *var;
101 Eina_List *classes;
102 Eina_List *str_bufs; 101 Eina_List *str_bufs;
103 Eina_List *type_defs; 102 Eina_List *type_defs;
104 Eina_List *expr_defs; 103 Eina_List *expr_defs;
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index d8e37ce8b6..5323cf4ff7 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -1942,8 +1942,6 @@ parse_unit(Eo_Lexer *ls, Eina_Bool eot)
1942 return EINA_FALSE; 1942 return EINA_FALSE;
1943found_class: 1943found_class:
1944 database_decl_add(ls->tmp.kls->full_name, EOLIAN_DECL_CLASS, ls->tmp.kls); 1944 database_decl_add(ls->tmp.kls->full_name, EOLIAN_DECL_CLASS, ls->tmp.kls);
1945 ls->tmp.classes = eina_list_append(ls->tmp.classes, ls->tmp.kls);
1946 ls->tmp.kls = NULL;
1947 return EINA_TRUE; 1945 return EINA_TRUE;
1948} 1946}
1949 1947
diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c
index d9eb110ec4..7a0348704b 100644
--- a/src/lib/eolian/eolian_database.c
+++ b/src/lib/eolian/eolian_database.c
@@ -228,20 +228,17 @@ eolian_eo_file_parse(const char *filepath)
228 Eolian_Constructor *ctor; 228 Eolian_Constructor *ctor;
229 if (!class) 229 if (!class)
230 { 230 {
231 const char *full_filepath = eina_hash_find(_filenames, bfilename); 231 if (!eo_parser_database_fill(filepath, EINA_FALSE))
232 if (!full_filepath) full_filepath = filepath;
233 if (!eo_parser_database_fill(full_filepath, EINA_FALSE))
234 { 232 {
235 free(bfiledup); 233 free(bfiledup);
236 goto error; 234 goto error;
237 } 235 }
238 class = eolian_class_get_by_file(bfilename); 236 class = eolian_class_get_by_file(bfilename);
239 if (!class) 237 }
240 { 238 else
241 fprintf(stderr, "eolian: no class for file '%s'\n", bfilename); 239 {
242 free(bfiledup); 240 free(bfiledup);
243 goto error; 241 return EINA_TRUE;
244 }
245 } 242 }
246 free(bfiledup); 243 free(bfiledup);
247 itr = eolian_class_implements_get(class); 244 itr = eolian_class_implements_get(class);