summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-20 15:41:07 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-05-20 15:41:07 +0100
commitdfbb777bf144c528eeaffe7b85a5e90957eeba94 (patch)
treecf468f72819299e343cecd817d25180abe8e83c4 /src
parentdc4c0c64f8e73622c4e5290f12e67c6db32ccb1b (diff)
eolian: keep track of all currently parsing files
Diffstat (limited to 'src')
-rw-r--r--src/lib/eolian/database_fill.c10
-rw-r--r--src/lib/eolian/eo_parser.c2
-rw-r--r--src/lib/eolian/eolian_database.c6
-rw-r--r--src/lib/eolian/eolian_database.h2
4 files changed, 9 insertions, 11 deletions
diff --git a/src/lib/eolian/database_fill.c b/src/lib/eolian/database_fill.c
index 58eaace475..e1ef5b066f 100644
--- a/src/lib/eolian/database_fill.c
+++ b/src/lib/eolian/database_fill.c
@@ -218,7 +218,7 @@ eo_parser_database_fill(const char *filename, Eina_Bool eot)
218 if (eot && eina_hash_find(_parsedeots, filename)) 218 if (eot && eina_hash_find(_parsedeots, filename))
219 return EINA_TRUE; 219 return EINA_TRUE;
220 220
221 if (eot) eina_hash_set(_parsingeots, filename, (void *)EINA_TRUE); 221 eina_hash_set(_parsingeos, filename, (void *)EINA_TRUE);
222 222
223 ls = eo_lexer_new(filename); 223 ls = eo_lexer_new(filename);
224 if (!ls) 224 if (!ls)
@@ -256,16 +256,14 @@ eo_parser_database_fill(const char *filename, Eina_Bool eot)
256 256
257done: 257done:
258 if (eot) 258 if (eot)
259 { 259 eina_hash_set(_parsedeots, filename, (void *)EINA_TRUE);
260 eina_hash_set(_parsedeots, filename, (void *)EINA_TRUE); 260 eina_hash_set(_parsingeos, filename, (void *)EINA_FALSE);
261 eina_hash_set(_parsingeots, filename, (void *)EINA_FALSE);
262 }
263 261
264 eo_lexer_free(ls); 262 eo_lexer_free(ls);
265 return EINA_TRUE; 263 return EINA_TRUE;
266 264
267error: 265error:
268 if (eot) eina_hash_set(_parsingeots, filename, (void *)EINA_FALSE); 266 eina_hash_set(_parsingeos, filename, (void *)EINA_FALSE);
269 eo_lexer_free(ls); 267 eo_lexer_free(ls);
270 return EINA_FALSE; 268 return EINA_FALSE;
271} 269}
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 34bf9b2145..6a695a06ff 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -1845,7 +1845,7 @@ parse_unit(Eo_Lexer *ls, Eina_Bool eot)
1845 "unknown import '%s'", ls->t.value.s); 1845 "unknown import '%s'", ls->t.value.s);
1846 eo_lexer_syntax_error(ls, errbuf); 1846 eo_lexer_syntax_error(ls, errbuf);
1847 } 1847 }
1848 if (eina_hash_find(_parsingeots, found)) 1848 if (eina_hash_find(_parsingeos, found))
1849 { 1849 {
1850 pop_strbuf(ls); 1850 pop_strbuf(ls);
1851 snprintf(errbuf, sizeof(errbuf), 1851 snprintf(errbuf, sizeof(errbuf),
diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c
index 9d8f1518f8..5ba11241d5 100644
--- a/src/lib/eolian/eolian_database.c
+++ b/src/lib/eolian/eolian_database.c
@@ -25,7 +25,7 @@ Eina_Hash *_depclasses = NULL;
25Eina_Hash *_decls = NULL; 25Eina_Hash *_decls = NULL;
26 26
27Eina_Hash *_parsedeots = NULL; 27Eina_Hash *_parsedeots = NULL;
28Eina_Hash *_parsingeots = NULL; 28Eina_Hash *_parsingeos = NULL;
29 29
30static int _database_init_count = 0; 30static int _database_init_count = 0;
31 31
@@ -70,7 +70,7 @@ database_init()
70 _depclasses = eina_hash_stringshared_new(EINA_FREE_CB(_deplist_free)); 70 _depclasses = eina_hash_stringshared_new(EINA_FREE_CB(_deplist_free));
71 _decls = eina_hash_stringshared_new(free); 71 _decls = eina_hash_stringshared_new(free);
72 _parsedeots = eina_hash_string_small_new(NULL); 72 _parsedeots = eina_hash_string_small_new(NULL);
73 _parsingeots = eina_hash_string_small_new(NULL); 73 _parsingeos = eina_hash_string_small_new(NULL);
74 return ++_database_init_count; 74 return ++_database_init_count;
75} 75}
76 76
@@ -103,7 +103,7 @@ database_shutdown()
103 eina_hash_free(_depclasses); _depclasses = NULL; 103 eina_hash_free(_depclasses); _depclasses = NULL;
104 eina_hash_free(_decls ); _decls = NULL; 104 eina_hash_free(_decls ); _decls = NULL;
105 eina_hash_free(_parsedeots); _parsedeots = NULL; 105 eina_hash_free(_parsedeots); _parsedeots = NULL;
106 eina_hash_free(_parsingeots); _parsingeots = NULL; 106 eina_hash_free(_parsingeos); _parsingeos = NULL;
107 eina_shutdown(); 107 eina_shutdown();
108 } 108 }
109 return _database_init_count; 109 return _database_init_count;
diff --git a/src/lib/eolian/eolian_database.h b/src/lib/eolian/eolian_database.h
index 5910152cb4..2129e9501f 100644
--- a/src/lib/eolian/eolian_database.h
+++ b/src/lib/eolian/eolian_database.h
@@ -54,7 +54,7 @@ extern Eina_Hash *_decls;
54 54
55/* holds parsed/currently parsing eot files to keep track */ 55/* holds parsed/currently parsing eot files to keep track */
56extern Eina_Hash *_parsedeots; 56extern Eina_Hash *_parsedeots;
57extern Eina_Hash *_parsingeots; 57extern Eina_Hash *_parsingeos;
58 58
59typedef struct _Eolian_Object 59typedef struct _Eolian_Object
60{ 60{