From: Cedric Bail Date: Mon, 4 Nov 2013 02:28:29 +0000 (+0900) Subject: edje: use const Eina_File for mmap_set function. X-Git-Tag: v1.8.0-alpha1~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1c7f60208725a1a04d9970156c2e18dd3072264c;p=platform%2Fupstream%2Fefl.git edje: use const Eina_File for mmap_set function. --- diff --git a/src/lib/edje/Edje_Common.h b/src/lib/edje/Edje_Common.h index dc5a01d..3d3351a 100644 --- a/src/lib/edje/Edje_Common.h +++ b/src/lib/edje/Edje_Common.h @@ -135,7 +135,7 @@ EAPI void edje_fontset_append_set (const char *fonts); * * Then, edje_file_data_get("test.edj", "key1") will return "value1" */ -EAPI char *edje_mmap_data_get(Eina_File *f, const char *key); +EAPI char *edje_mmap_data_get(const Eina_File *f, const char *key); /** * Get data from the file level data block of an edje file diff --git a/src/lib/edje/Edje_Eo.h b/src/lib/edje/Edje_Eo.h index b892ac6..dfb887e 100644 --- a/src/lib/edje/Edje_Eo.h +++ b/src/lib/edje/Edje_Eo.h @@ -652,7 +652,7 @@ enum * * @see edje_object_file_set */ -#define edje_obj_mmap_set(file, group, ret) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_MMAP_SET), EO_TYPECHECK(Eina_File*, file), EO_TYPECHECK(const char *, group), EO_TYPECHECK(Eina_Bool *, ret) +#define edje_obj_mmap_set(file, group, ret) EDJE_OBJ_ID(EDJE_OBJ_SUB_ID_MMAP_SET), EO_TYPECHECK(const Eina_File*, file), EO_TYPECHECK(const char *, group), EO_TYPECHECK(Eina_Bool *, ret) /** * @def edje_obj_file_get diff --git a/src/lib/edje/Edje_Legacy.h b/src/lib/edje/Edje_Legacy.h index 196e498..9b0ae01 100644 --- a/src/lib/edje/Edje_Legacy.h +++ b/src/lib/edje/Edje_Legacy.h @@ -1806,7 +1806,7 @@ EAPI Eina_Bool edje_object_file_set (Evas_Object *obj, const char * @see edje_object_mmap_set() * @since 1.8 */ -EAPI Eina_Bool edje_object_mmap_set(Evas_Object *obj, Eina_File *file, const char *group); +EAPI Eina_Bool edje_object_mmap_set(Evas_Object *obj, const Eina_File *file, const char *group); /** diff --git a/src/lib/edje/edje_cache.c b/src/lib/edje/edje_cache.c index 4a335c4..f2e9b20 100644 --- a/src/lib/edje/edje_cache.c +++ b/src/lib/edje/edje_cache.c @@ -1,6 +1,5 @@ #include "edje_private.h" - static Eina_Hash *_edje_file_hash = NULL; static int _edje_file_cache_size = 16; static Eina_List *_edje_file_cache = NULL; @@ -299,7 +298,7 @@ _edje_file_change(void *data, int ev_type EINA_UNUSED, void *event) #endif static Edje_File * -_edje_file_open(Eina_File *f, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret, time_t mtime) +_edje_file_open(const Eina_File *f, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret, time_t mtime) { Edje_Color_Class *cc; Edje_File *edf; @@ -399,7 +398,7 @@ _edje_file_dangling(Edje_File *edf) #endif Edje_File * -_edje_cache_file_coll_open(Eina_File *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret, Edje *ed) +_edje_cache_file_coll_open(const Eina_File *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret, Edje *ed) { Edje_File *edf; Eina_List *l, *hist; diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c index d78fa68..546f78e 100644 --- a/src/lib/edje/edje_load.c +++ b/src/lib/edje/edje_load.c @@ -24,7 +24,7 @@ struct _Edje_Drag_Items } page; }; -void _edje_file_add(Edje *ed, Eina_File *f); +void _edje_file_add(Edje *ed, const Eina_File *f); /* START - Nested part support */ #define _edje_smart_nested_type "Evas_Smart_Nested" @@ -83,7 +83,7 @@ edje_object_file_set(Evas_Object *obj, const char *file, const char *group) } EAPI Eina_Bool -edje_object_mmap_set(Evas_Object *obj, Eina_File *file, const char *group) +edje_object_mmap_set(Evas_Object *obj, const Eina_File *file, const char *group) { if (!obj) return EINA_FALSE; Eina_Bool ret = EINA_FALSE; @@ -295,7 +295,7 @@ edje_file_group_exists(const char *file, const char *glob) } EAPI char * -edje_mmap_data_get(Eina_File *f, const char *key) +edje_mmap_data_get(const Eina_File *f, const char *key) { Edje_File *edf; char *str = NULL; @@ -357,7 +357,7 @@ _edje_physics_world_update_cb(void *data, EPhysics_World *world EINA_UNUSED, voi #endif int -_edje_object_file_set_internal(Evas_Object *obj, Eina_File *file, const char *group, const char *parent, Eina_List *group_path, Eina_Array *nested) +_edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const char *group, const char *parent, Eina_List *group_path, Eina_Array *nested) { Edje *ed; Evas *tev; @@ -1166,7 +1166,7 @@ on_error: } void -_edje_file_add(Edje *ed, Eina_File *f) +_edje_file_add(Edje *ed, const Eina_File *f) { if (!_edje_edd_edje_file) return; if (!f) diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h index b1c199f..42422d9 100644 --- a/src/lib/edje/edje_private.h +++ b/src/lib/edje/edje_private.h @@ -1972,7 +1972,7 @@ void *_edje_signal_callback_disable(const Edje_Signal_Callback_Group *cgp, EAPI void _edje_edd_init(void); EAPI void _edje_edd_shutdown(void); -int _edje_object_file_set_internal(Evas_Object *obj, Eina_File *file, const char *group, const char *parent, Eina_List *group_path, Eina_Array *nested); +int _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const char *group, const char *parent, Eina_List *group_path, Eina_Array *nested); void _edje_file_del(Edje *ed); void _edje_file_free(Edje_File *edf); @@ -2154,7 +2154,7 @@ void _edje_textblock_styles_del(Edje *ed); void _edje_textblock_style_all_update(Edje *ed); void _edje_textblock_style_parse_and_fix(Edje_File *edf); void _edje_textblock_style_cleanup(Edje_File *edf); -Edje_File *_edje_cache_file_coll_open(Eina_File *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret, Edje *ed); +Edje_File *_edje_cache_file_coll_open(const Eina_File *file, const char *coll, int *error_ret, Edje_Part_Collection **edc_ret, Edje *ed); void _edje_cache_coll_clean(Edje_File *edf); void _edje_cache_coll_flush(Edje_File *edf); void _edje_cache_coll_unref(Edje_File *edf, Edje_Part_Collection *edc); diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c index c5c073a..4fd5471 100644 --- a/src/lib/edje/edje_smart.c +++ b/src/lib/edje/edje_smart.c @@ -363,7 +363,7 @@ _edje_smart_file_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list) static void _edje_smart_mmap_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list) { - Eina_File *f = va_arg(*list, Eina_File *); + const Eina_File *f = va_arg(*list, Eina_File *); const char *group = va_arg(*list, const char *); Eina_Bool *ret = va_arg(*list, Eina_Bool *); Eina_Array *nested;