Eo: remove strict class checking for composite objects.

When compositing objects, we were checking that class_of(B) is in A's
inheritance tree before allowing attaching B as a composite object of A.
This is wrong and breaks a few cases, for example: B extends a class that
is in A's inheritance tree or B implements an interface that is in A's
inheritance tree.

Thanks to Marcel for reporting.
This commit is contained in:
Tom Hacohen 2016-06-05 09:58:19 +01:00
parent e21d357adf
commit aab8389a6f
2 changed files with 0 additions and 7 deletions

View File

@ -1242,11 +1242,6 @@ _eo_base_composite_attach(Eo *parent_id, Eo_Base_Data *pd EINA_UNUSED, Eo *comp_
EO_OBJ_POINTER_RETURN_VAL(comp_obj_id, comp_obj, EINA_FALSE);
EO_OBJ_POINTER_RETURN_VAL(parent_id, parent, EINA_FALSE);
if (!eo_isa(parent_id, _eo_class_id_get(comp_obj->klass)))
{
return EINA_FALSE;
}
Eo_Base_Data *comp_pd = eo_data_scope_get(comp_obj_id, EO_BASE_CLASS);
/* Don't composite if we already have a composite object of this type */
{

View File

@ -73,8 +73,6 @@ main(int argc, char *argv[])
fail_if(!eo_composite_part_is(simple));
fail_if(eo_composite_attach(obj, simple));
fail_if(eo_composite_attach(simple, obj));
eo_unref(simple);
eo_unref(obj);