diff --git a/src/bindings/eo_cxx/eo_ops.hh b/src/bindings/eo_cxx/eo_ops.hh index f2d51334f7..3629e77fcf 100644 --- a/src/bindings/eo_cxx/eo_ops.hh +++ b/src/bindings/eo_cxx/eo_ops.hh @@ -87,7 +87,7 @@ base_data_get(const Eo *obj, const char *key) inline void base_data_del(Eo *obj, const char *key) { - eo_key_data_del(obj, key); + eo_key_del(obj, key); } inline void diff --git a/src/bindings/luajit/eo.lua b/src/bindings/luajit/eo.lua index 6f7bd160ce..0419f829e6 100644 --- a/src/bindings/luajit/eo.lua +++ b/src/bindings/luajit/eo.lua @@ -101,7 +101,7 @@ ffi.cdef [[ void eo_key_data_set(const char *key, const void *data, eo_key_data_free_func free_func); void *eo_key_data_get(const char *key); - void eo_key_data_del(const char *key); + void eo_key_del(const char *key); Eina_Iterator *eo_children_iterator_new(void); diff --git a/src/lib/elementary/efl_ui_grid.c b/src/lib/elementary/efl_ui_grid.c index 1a43e3278f..f0af2ff977 100644 --- a/src/lib/elementary/efl_ui_grid.c +++ b/src/lib/elementary/efl_ui_grid.c @@ -590,7 +590,7 @@ end: pd->items = (Grid_Item *) eina_inlist_remove(EINA_INLIST_GET(pd->items), EINA_INLIST_GET(gi)); pd->count--; - eo_key_data_del(subobj, GRID_ITEM_KEY); + eo_key_del(subobj, GRID_ITEM_KEY); free(gi); } diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c index 06fa1f0066..e62912a2fa 100644 --- a/src/lib/elementary/elm_cnp.c +++ b/src/lib/elementary/elm_cnp.c @@ -3913,7 +3913,7 @@ _local_elm_drop_target_del(Evas_Object *obj, Elm_Sel_Format format, if (!dropable->cbs_list) { drops = eina_list_remove(drops, dropable); - eo_key_data_del(obj, "__elm_dropable"); + eo_key_del(obj, "__elm_dropable"); free(dropable); dropable = NULL; evas_object_event_callback_del(obj, EVAS_CALLBACK_DEL, diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo index d1fc1ab6e3..19c50eb3dd 100644 --- a/src/lib/eo/eo_base.eo +++ b/src/lib/eo/eo_base.eo @@ -221,7 +221,7 @@ abstract Eo.Base () } return: void *; [[the data for the key]] } - key_data_del { + key_del { [[Del generic data from object.]] params { @in key: const(char)*; [[the key associated with the data]] @@ -250,12 +250,6 @@ abstract Eo.Base () } return: Eo.Base *; [[the object reference for the key]] } - key_obj_del { - [[Del generic objecrt reference from object.]] - params { - @in key: const(char)*; [[the key associated with the object ref]] - } - } key_value_set { [[Set value on the object. @@ -278,12 +272,6 @@ abstract Eo.Base () } return: Eina.Value *; [[the value for the key]] } - key_value_del { - [[Del generic value from object.]] - params { - @in key: const(char)*; [[the key associated with the value]] - } - } event_thaw { [[thaw events of object. diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c index f81e54e10f..a525886ca6 100644 --- a/src/lib/eo/eo_base_class.c +++ b/src/lib/eo/eo_base_class.c @@ -188,7 +188,7 @@ _eo_base_key_data_get(const Eo *obj, Eo_Base_Data *pd, const char *key) } EOLIAN static void -_eo_base_key_data_del(Eo *obj, Eo_Base_Data *pd, const char *key) +_eo_base_key_del(Eo *obj, Eo_Base_Data *pd, const char *key) { Eo_Generic_Data_Node *node; @@ -276,31 +276,6 @@ _eo_base_key_obj_get(const Eo *obj, Eo_Base_Data *pd, const char *key) return NULL; } -EOLIAN static void -_eo_base_key_obj_del(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *key) -{ - Eo_Generic_Data_Node *node; - - if (!key) return; - EINA_INLIST_FOREACH(pd->generic_data, node) - { - if (!strcmp(node->key, key)) - { - pd->generic_data = eina_inlist_remove(pd->generic_data, - EINA_INLIST_GET(node)); - if (node->data_is_obj) - { - eo_event_callback_del(node->data, EO_BASE_EVENT_DEL, - _eo_base_cb_key_obj_del, obj); - eo_unref(node->data); - } - else if (node->data_is_value) eina_value_free(node->data); - _eo_generic_data_node_free(node); - return; - } - } -} - EOLIAN static void _eo_base_key_value_set(Eo *obj, Eo_Base_Data *pd, const char *key, Eina_Value *value) { @@ -364,31 +339,6 @@ _eo_base_key_value_get(const Eo *obj, Eo_Base_Data *pd, const char *key) return NULL; } -EOLIAN static void -_eo_base_key_value_del(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *key) -{ - Eo_Generic_Data_Node *node; - - if (!key) return; - EINA_INLIST_FOREACH(pd->generic_data, node) - { - if (!strcmp(node->key, key)) - { - pd->generic_data = eina_inlist_remove(pd->generic_data, - EINA_INLIST_GET(node)); - if (node->data_is_obj) - { - eo_event_callback_del(node->data, EO_BASE_EVENT_DEL, - _eo_base_cb_key_obj_del, obj); - eo_unref(node->data); - } - else if (node->data_is_value) eina_value_free(node->data); - _eo_generic_data_node_free(node); - return; - } - } -} - EOLIAN static void _eo_base_id_set(Eo *obj EINA_UNUSED, Eo_Base_Data *pd, const char *id) { diff --git a/src/lib/evas/canvas/evas_data.c b/src/lib/evas/canvas/evas_data.c index e991e065ad..ba4e113f66 100644 --- a/src/lib/evas/canvas/evas_data.c +++ b/src/lib/evas/canvas/evas_data.c @@ -30,6 +30,6 @@ evas_object_data_del(Evas_Object *obj, const char *key) MAGIC_CHECK_END(); void *data = NULL; data = eo_key_data_get(obj, key); - eo_key_data_del(obj, key); + eo_key_del(obj, key); return data; } diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c index 2980c19a77..a6444ee942 100644 --- a/src/tests/eo/suite/eo_test_general.c +++ b/src/tests/eo/suite/eo_test_general.c @@ -608,7 +608,7 @@ START_TEST(eo_generic_data) eo_key_data_set(obj, "test1", (void *) 1); data = eo_key_data_get(obj, "test1"); fail_if(1 != (intptr_t) data); - eo_key_data_del(obj, "test1"); + eo_key_del(obj, "test1"); data = eo_key_data_get(obj, "test1"); fail_if(data); @@ -621,13 +621,13 @@ START_TEST(eo_generic_data) data = eo_key_data_get(obj, "test2"); fail_if(2 != (intptr_t) data); - eo_key_data_del(obj, "test2"); + eo_key_del(obj, "test2"); data = eo_key_data_get(obj, "test2"); fail_if(data); data = eo_key_data_get(obj, "test1"); fail_if(1 != (intptr_t) data); - eo_key_data_del(obj, "test1"); + eo_key_del(obj, "test1"); data = eo_key_data_get(obj, "test1"); fail_if(data); @@ -671,6 +671,7 @@ START_TEST(eo_generic_data) eo_key_value_del(obj, "value1"); value2 = eo_key_value_get(obj, "value1"); fail_if(value2 != NULL); + eo_key_del(obj, "value1"); eo_unref(obj); eo_unref(obj2);