Eolian: fix class lookup during parsing.
If classes A and B are stored in a same file, when A inherits from B, and A needs to be generated, the generator, even if B is parsed, will not search the class in the database but will look for some b.eo. This patch fixes that issue by checking the existence of the classes into the database before looking for a corresponding file.
This commit is contained in:
parent
bc70a1bd84
commit
e1abaf7c37
|
@ -1299,16 +1299,19 @@ EAPI Eina_Bool eolian_eo_file_parse(const char *filepath)
|
|||
}
|
||||
EINA_LIST_FOREACH(eolian_class_inherits_list_get(class_name), itr, inherit_name)
|
||||
{
|
||||
char *filename = strdup(inherit_name);
|
||||
eina_str_tolower(&filename);
|
||||
filepath = eina_hash_find(_filenames, filename);
|
||||
if (!filepath)
|
||||
if (!eolian_class_exists(inherit_name))
|
||||
{
|
||||
ERR("Unable to find class %s", inherit_name);
|
||||
return EINA_FALSE;
|
||||
char *filename = strdup(inherit_name);
|
||||
eina_str_tolower(&filename);
|
||||
filepath = eina_hash_find(_filenames, filename);
|
||||
if (!filepath)
|
||||
{
|
||||
ERR("Unable to find class %s", inherit_name);
|
||||
return EINA_FALSE;
|
||||
}
|
||||
if (!eolian_eo_file_parse(filepath)) return EINA_FALSE;
|
||||
free(filename);
|
||||
}
|
||||
if (!eolian_eo_file_parse(filepath)) return EINA_FALSE;
|
||||
free(filename);
|
||||
}
|
||||
EINA_LIST_FOREACH(eolian_class_implements_list_get(class_name), itr, impl)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue