From 1a542bcf8bbcb94dcee65b8adf0b844d0478c809 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Thu, 13 Dec 2012 05:30:54 +0000 Subject: [PATCH] edje: don't expose private variable in our public API. SVN revision: 80793 --- legacy/edje/src/lib/Edje.h | 2 +- legacy/edje/src/lib/edje_edit.c | 3 +-- legacy/edje/src/lib/edje_load.c | 7 +------ legacy/edje/src/lib/edje_smart.c | 7 +++++-- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/legacy/edje/src/lib/Edje.h b/legacy/edje/src/lib/Edje.h index bcc2b94..36572dd 100644 --- a/legacy/edje/src/lib/Edje.h +++ b/legacy/edje/src/lib/Edje.h @@ -2671,7 +2671,7 @@ enum * * @see edje_object_file_set */ -#define edje_obj_file_set(file, group, nested, ret) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_FILE_SET), EO_TYPECHECK(const char*, file), EO_TYPECHECK(const char *, group), EO_TYPECHECK(Eina_Array *, nested), EO_TYPECHECK(Eina_Bool *, ret) +#define edje_obj_file_set(file, group, ret) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_FILE_SET), EO_TYPECHECK(const char*, file), EO_TYPECHECK(const char *, group), EO_TYPECHECK(Eina_Bool *, ret) /** * @def edje_obj_file_get diff --git a/legacy/edje/src/lib/edje_edit.c b/legacy/edje/src/lib/edje_edit.c index 33694ae..d688821 100644 --- a/legacy/edje/src/lib/edje_edit.c +++ b/legacy/edje/src/lib/edje_edit.c @@ -173,7 +173,6 @@ _edje_edit_smart_file_set(Eo *obj, void *_pd, va_list *list) { const char *file = va_arg(*list, const char *); const char *group= va_arg(*list, const char *); - Eina_Array *nested = va_arg(*list, Eina_Array *); Eina_Bool *ret = va_arg(*list, Eina_Bool *); Edje_Edit *eed = _pd; Eet_File *ef; @@ -199,7 +198,7 @@ _edje_edit_smart_file_set(Eo *obj, void *_pd, va_list *list) * groups). */ Eina_Bool int_ret = EINA_FALSE; - eo_do_super(obj, edje_obj_file_set(file, group, nested, &int_ret)); + eo_do_super(obj, edje_obj_file_set(file, group, &int_ret)); if (!int_ret) return; diff --git a/legacy/edje/src/lib/edje_load.c b/legacy/edje/src/lib/edje_load.c index 2e55cd3..a2d4fb3 100644 --- a/legacy/edje/src/lib/edje_load.c +++ b/legacy/edje/src/lib/edje_load.c @@ -75,13 +75,8 @@ edje_object_file_set(Evas_Object *obj, const char *file, const char *group) { if (!obj) return EINA_FALSE; Eina_Bool ret = EINA_FALSE; - Eina_Array *nested; - - nested = eina_array_new(8); - eo_do(obj, edje_obj_file_set(file, group, nested, &ret)); - eina_array_free(nested); - nested = NULL; + eo_do(obj, edje_obj_file_set(file, group, &ret)); _edje_object_orientation_inform(obj); return ret; } diff --git a/legacy/edje/src/lib/edje_smart.c b/legacy/edje/src/lib/edje_smart.c index fae11e0..a180bf0 100644 --- a/legacy/edje/src/lib/edje_smart.c +++ b/legacy/edje/src/lib/edje_smart.c @@ -302,11 +302,14 @@ _edje_smart_file_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list) { const char *file = va_arg(*list, const char *); const char *group = va_arg(*list, const char *); - Eina_Array *nested = va_arg(*list, Eina_Array *); Eina_Bool *ret = va_arg(*list, Eina_Bool *); + Eina_Array *nested; if (ret) *ret = EINA_FALSE; + + nested = eina_array_new(8); if (_edje_object_file_set_internal(obj, file, group, NULL, NULL, nested)) - if (ret) *ret = EINA_TRUE; + if (ret) *ret = EINA_TRUE; + eina_array_free(nested); } static void -- 2.7.4