forked from enlightenment/efl
eolian: keep track of all currently parsing files
This commit is contained in:
parent
dc4c0c64f8
commit
dfbb777bf1
|
@ -218,7 +218,7 @@ eo_parser_database_fill(const char *filename, Eina_Bool eot)
|
|||
if (eot && eina_hash_find(_parsedeots, filename))
|
||||
return EINA_TRUE;
|
||||
|
||||
if (eot) eina_hash_set(_parsingeots, filename, (void *)EINA_TRUE);
|
||||
eina_hash_set(_parsingeos, filename, (void *)EINA_TRUE);
|
||||
|
||||
ls = eo_lexer_new(filename);
|
||||
if (!ls)
|
||||
|
@ -256,16 +256,14 @@ eo_parser_database_fill(const char *filename, Eina_Bool eot)
|
|||
|
||||
done:
|
||||
if (eot)
|
||||
{
|
||||
eina_hash_set(_parsedeots, filename, (void *)EINA_TRUE);
|
||||
eina_hash_set(_parsingeots, filename, (void *)EINA_FALSE);
|
||||
}
|
||||
eina_hash_set(_parsedeots, filename, (void *)EINA_TRUE);
|
||||
eina_hash_set(_parsingeos, filename, (void *)EINA_FALSE);
|
||||
|
||||
eo_lexer_free(ls);
|
||||
return EINA_TRUE;
|
||||
|
||||
error:
|
||||
if (eot) eina_hash_set(_parsingeots, filename, (void *)EINA_FALSE);
|
||||
eina_hash_set(_parsingeos, filename, (void *)EINA_FALSE);
|
||||
eo_lexer_free(ls);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
|
|
@ -1845,7 +1845,7 @@ parse_unit(Eo_Lexer *ls, Eina_Bool eot)
|
|||
"unknown import '%s'", ls->t.value.s);
|
||||
eo_lexer_syntax_error(ls, errbuf);
|
||||
}
|
||||
if (eina_hash_find(_parsingeots, found))
|
||||
if (eina_hash_find(_parsingeos, found))
|
||||
{
|
||||
pop_strbuf(ls);
|
||||
snprintf(errbuf, sizeof(errbuf),
|
||||
|
|
|
@ -25,7 +25,7 @@ Eina_Hash *_depclasses = NULL;
|
|||
Eina_Hash *_decls = NULL;
|
||||
|
||||
Eina_Hash *_parsedeots = NULL;
|
||||
Eina_Hash *_parsingeots = NULL;
|
||||
Eina_Hash *_parsingeos = NULL;
|
||||
|
||||
static int _database_init_count = 0;
|
||||
|
||||
|
@ -70,7 +70,7 @@ database_init()
|
|||
_depclasses = eina_hash_stringshared_new(EINA_FREE_CB(_deplist_free));
|
||||
_decls = eina_hash_stringshared_new(free);
|
||||
_parsedeots = eina_hash_string_small_new(NULL);
|
||||
_parsingeots = eina_hash_string_small_new(NULL);
|
||||
_parsingeos = eina_hash_string_small_new(NULL);
|
||||
return ++_database_init_count;
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ database_shutdown()
|
|||
eina_hash_free(_depclasses); _depclasses = NULL;
|
||||
eina_hash_free(_decls ); _decls = NULL;
|
||||
eina_hash_free(_parsedeots); _parsedeots = NULL;
|
||||
eina_hash_free(_parsingeots); _parsingeots = NULL;
|
||||
eina_hash_free(_parsingeos); _parsingeos = NULL;
|
||||
eina_shutdown();
|
||||
}
|
||||
return _database_init_count;
|
||||
|
|
|
@ -54,7 +54,7 @@ extern Eina_Hash *_decls;
|
|||
|
||||
/* holds parsed/currently parsing eot files to keep track */
|
||||
extern Eina_Hash *_parsedeots;
|
||||
extern Eina_Hash *_parsingeots;
|
||||
extern Eina_Hash *_parsingeos;
|
||||
|
||||
typedef struct _Eolian_Object
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue