forked from enlightenment/efl
eolian: validate each class with its own unit's in mind only
This is stricter (doesn't allow outer symbols to leak in). Also needed fixing some eo files.
This commit is contained in:
parent
8267124023
commit
e4fd05469d
|
@ -1,3 +1,5 @@
|
|||
import efl_net_control_access_point;
|
||||
|
||||
enum Efl.Net.Control.Technology.Type {
|
||||
[[Technology types
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import eina_types;
|
||||
import efl_gfx_types;
|
||||
|
||||
const Efl.Gfx.Size.Hint.Expand: double = 1.0;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import eina_types;
|
||||
import efl_gfx_types;
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// FIXME: Documentation lacks proper references due to cyclic imports.
|
||||
// FIXME: What about AnyRTL? And other strange directions?
|
||||
|
||||
import efl_orientation;
|
||||
|
||||
enum Efl.Ui.Dir
|
||||
{
|
||||
[[Direction for UI objects and layouts.
|
||||
|
|
|
@ -660,7 +660,7 @@ end:
|
|||
|
||||
/* FIXME: need much better error handling here */
|
||||
static Eina_Bool
|
||||
_db_fill_inherits(const Eolian_Unit *src, Eolian_Class *cl, Eina_Hash *fhash)
|
||||
_db_fill_inherits(Eolian_Class *cl, Eina_Hash *fhash)
|
||||
{
|
||||
if (eina_hash_find(fhash, cl->base.name))
|
||||
return EINA_TRUE;
|
||||
|
@ -677,7 +677,7 @@ _db_fill_inherits(const Eolian_Unit *src, Eolian_Class *cl, Eina_Hash *fhash)
|
|||
eina_stringshare_del(inn);
|
||||
continue;
|
||||
}
|
||||
Eolian_Class *icl = eina_hash_find(src->classes, inn);
|
||||
Eolian_Class *icl = eina_hash_find(cl->base.unit->classes, inn);
|
||||
if (!icl)
|
||||
{
|
||||
succ = EINA_FALSE;
|
||||
|
@ -689,7 +689,7 @@ _db_fill_inherits(const Eolian_Unit *src, Eolian_Class *cl, Eina_Hash *fhash)
|
|||
{
|
||||
cl->inherits = eina_list_append(cl->inherits, icl);
|
||||
/* recursively fill so the tree is valid */
|
||||
if (!icl->valid_impls && !_db_fill_inherits(src, icl, fhash))
|
||||
if (!icl->valid_impls && !_db_fill_inherits(icl, fhash))
|
||||
succ = EINA_FALSE;
|
||||
}
|
||||
eina_stringshare_del(inn);
|
||||
|
@ -725,7 +725,7 @@ _validate_implement(const Eolian_Unit *src, Eolian_Implement *impl)
|
|||
}
|
||||
|
||||
static Eina_Bool
|
||||
_validate_class(Validate_State *vals, const Eolian_Unit *src, Eolian_Class *cl,
|
||||
_validate_class(Validate_State *vals, Eolian_Class *cl,
|
||||
Eina_Hash *nhash, Eina_Hash *chash)
|
||||
{
|
||||
Eina_List *l;
|
||||
|
@ -742,6 +742,8 @@ _validate_class(Validate_State *vals, const Eolian_Unit *src, Eolian_Class *cl,
|
|||
if (eina_hash_find(chash, cl->base.name))
|
||||
return EINA_TRUE;
|
||||
|
||||
const Eolian_Unit *src = cl->base.unit;
|
||||
|
||||
Eina_Bool valid = cl->base.validated;
|
||||
|
||||
EINA_LIST_FOREACH(cl->inherits, l, icl)
|
||||
|
@ -772,7 +774,7 @@ _validate_class(Validate_State *vals, const Eolian_Unit *src, Eolian_Class *cl,
|
|||
default:
|
||||
break;
|
||||
}
|
||||
if (!_validate_class(vals, src, icl, nhash, chash))
|
||||
if (!_validate_class(vals, icl, nhash, chash))
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
|
@ -859,7 +861,7 @@ database_validate(const Eolian_Unit *src)
|
|||
if (cl->valid_impls)
|
||||
continue;
|
||||
Eina_Hash *fhash = eina_hash_stringshared_new(NULL);
|
||||
if (!_db_fill_inherits(src, cl, fhash))
|
||||
if (!_db_fill_inherits(cl, fhash))
|
||||
{
|
||||
eina_hash_free(fhash);
|
||||
return EINA_FALSE;
|
||||
|
@ -874,7 +876,7 @@ database_validate(const Eolian_Unit *src)
|
|||
EINA_ITERATOR_FOREACH(iter, cl)
|
||||
{
|
||||
eina_hash_free_buckets(nhash);
|
||||
if (!_validate_class(&vals, src, cl, nhash, chash))
|
||||
if (!_validate_class(&vals, cl, nhash, chash))
|
||||
{
|
||||
eina_iterator_free(iter);
|
||||
eina_hash_free(nhash);
|
||||
|
|
Loading…
Reference in New Issue