From: Jérémy Zurcher Date: Thu, 3 Oct 2013 12:17:03 +0000 (+0200) Subject: eo2: fix eo_base_data_get(), eo_composite_attach(), eo_composite_detach() X-Git-Tag: v1.10.0-alpha1~200^2~92 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e51e397b89d039e25b38f2339f5147b8eb3e8b3a;p=platform%2Fupstream%2Fefl.git eo2: fix eo_base_data_get(), eo_composite_attach(), eo_composite_detach() --- diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index b046f1e..5a9dec3 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -1327,7 +1327,7 @@ eo2_base_data_set(const char *key, const void *data, eo_base_data_free_func free * @see #eo_base_data_del */ #define eo_base_data_get(key, data) EO_BASE_ID(EO_BASE_SUB_ID_DATA_GET), EO_TYPECHECK(const char *, key), EO_TYPECHECK(void **, data) -EAPI void +EAPI void * eo2_base_data_get(const char *key); /** diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index 44a8d4d..b409953 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -2014,7 +2014,11 @@ eo_composite_attach(Eo *comp_obj_id, Eo *parent_id) comp_obj->composite = EINA_TRUE; *comp_dst = comp_obj; - eo_do(comp_obj_id, eo_parent_set(parent_id)); + + if (comp_obj->klass->desc->version == EO2_VERSION) + eo2_do(comp_obj_id, eo2_parent_set(parent_id)); + else + eo_do(comp_obj_id, eo_parent_set(parent_id)); return EINA_TRUE; } @@ -2036,7 +2040,10 @@ eo_composite_detach(Eo *comp_obj_id, Eo *parent_id) { comp_obj->composite = EINA_FALSE; *comp_itr = NULL; - eo_do(comp_obj_id, eo_parent_set(NULL)); + if (comp_obj->klass->desc->version == EO2_VERSION) + eo2_do(comp_obj_id, eo2_parent_set(NULL)); + else + eo_do(comp_obj_id, eo_parent_set(NULL)); return EINA_TRUE; } } diff --git a/src/lib/eo/eo2_base_class.c b/src/lib/eo/eo2_base_class.c index 1cbccef..55ef48e 100644 --- a/src/lib/eo/eo2_base_class.c +++ b/src/lib/eo/eo2_base_class.c @@ -102,7 +102,7 @@ _data_get(Eo *obj EINA_UNUSED, void *class_data, const char *key) return NULL; } -EAPI EO2_VOID_FUNC_BODYV(eo2_base_data_get, EO2_FUNC_CALL(key), const char *key); +EAPI EO2_FUNC_BODYV(eo2_base_data_get, void*, NULL, EO2_FUNC_CALL(key), const char *key); static void _parent_set(Eo *obj, void *class_data, Eo *parent_id)