diff options
author | Tom Hacohen <tom@stosb.com> | 2016-06-05 09:58:19 +0100 |
---|---|---|
committer | Tom Hacohen <tom@stosb.com> | 2016-06-05 10:57:07 +0100 |
commit | aab8389a6f07273530cc28905ef36578efa6a5c3 (patch) | |
tree | 57befd66fe89e3bd6dc6656f9e8aad8e6f043bc5 | |
parent | e21d357adf9b223659c4595bf4483a3111f44c65 (diff) | |
download | efl-aab8389a6f07273530cc28905ef36578efa6a5c3.tar.gz |
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.
-rw-r--r-- | src/lib/eo/eo_base_class.c | 5 | ||||
-rw-r--r-- | src/tests/eo/composite_objects/composite_objects_main.c | 2 |
2 files changed, 0 insertions, 7 deletions
diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c index 5d8601b91d..e378b70ec1 100644 --- a/src/lib/eo/eo_base_class.c +++ b/src/lib/eo/eo_base_class.c @@ -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 */ { diff --git a/src/tests/eo/composite_objects/composite_objects_main.c b/src/tests/eo/composite_objects/composite_objects_main.c index b32d5f995f..e424192529 100644 --- a/src/tests/eo/composite_objects/composite_objects_main.c +++ b/src/tests/eo/composite_objects/composite_objects_main.c @@ -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); |