diff options
57 files changed, 153 insertions, 128 deletions
diff --git a/src/bin/elementary/test_application_server.c b/src/bin/elementary/test_application_server.c index e0c1f0ae32..f2b5cf0a66 100644 --- a/src/bin/elementary/test_application_server.c +++ b/src/bin/elementary/test_application_server.c @@ -45,7 +45,7 @@ _close_cb(void *data, const Eo_Event *event) App_View_Context *ctx = data; if (ctx->win) evas_object_del(ctx->win); - eo_unref(event->object); + eo_del(event->object); return EINA_TRUE; } diff --git a/src/bin/elementary/test_task_switcher.c b/src/bin/elementary/test_task_switcher.c index 803ced8e51..8133b7ff15 100644 --- a/src/bin/elementary/test_task_switcher.c +++ b/src/bin/elementary/test_task_switcher.c @@ -283,7 +283,7 @@ _win_del(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_ { Elm_App_Client *app; EINA_LIST_FREE(apps_list, app) - eo_unref(app); + eo_del(app); } static void diff --git a/src/bin/elementary/test_ui_grid.c b/src/bin/elementary/test_ui_grid.c index 5b5166c74b..cb9ea1ee0f 100644 --- a/src/bin/elementary/test_ui_grid.c +++ b/src/bin/elementary/test_ui_grid.c @@ -502,7 +502,7 @@ static void remove_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED) { //efl_pack_unpack(data, obj); - eo_unref(obj); + eo_del(obj); } static void diff --git a/src/bin/elementary/test_win_plug.c b/src/bin/elementary/test_win_plug.c index 23052a7c1b..2794bb3982 100644 --- a/src/bin/elementary/test_win_plug.c +++ b/src/bin/elementary/test_win_plug.c @@ -146,7 +146,7 @@ create_handles(Evas_Object *obj) static Eina_Bool _notify_end(void *data EINA_UNUSED, const Eo_Event *event) { - eo_unref(event->object); + eo_del(event->object); return EINA_FALSE; } diff --git a/src/examples/ecore/ecore_audio_playback.c b/src/examples/ecore/ecore_audio_playback.c index 1453dc2f7b..29be761f72 100644 --- a/src/examples/ecore/ecore_audio_playback.c +++ b/src/examples/ecore/ecore_audio_playback.c @@ -201,7 +201,7 @@ static Eina_Bool _play_finished(void *data EINA_UNUSED, const Eo_Event *event) inputs = eina_list_remove(inputs, event->object); ret = ecore_audio_obj_out_input_detach(out, event->object); - eo_unref(event->object); + eo_del(event->object); if (!ret) printf("Could not detach input %s\n", name); diff --git a/src/examples/ecore/ecore_audio_to_ogg.c b/src/examples/ecore/ecore_audio_to_ogg.c index 7041451430..a9451eab0e 100644 --- a/src/examples/ecore/ecore_audio_to_ogg.c +++ b/src/examples/ecore/ecore_audio_to_ogg.c @@ -24,8 +24,8 @@ static Eina_Bool _play_finished(void *data EINA_UNUSED, const Eo_Event *event) printf("Done: %s\n", name); ecore_audio_obj_in_output_get(event->object, &out); - eo_unref(event->object); - eo_unref(out); + eo_del(event->object); + eo_del(out); ecore_main_loop_quit(); @@ -54,7 +54,7 @@ main(int argc, char *argv[]) ret = ecore_audio_obj_source_set(in, argv[1]); if (!ret) { printf("Could not set %s as input\n", argv[1]); - eo_unref(in); + eo_del(in); return 1; } @@ -64,16 +64,16 @@ main(int argc, char *argv[]) ret = ecore_audio_obj_source_set(out, argv[2]); if (!ret) { printf("Could not set %s as output\n", argv[2]); - eo_unref(in); - eo_unref(out); + eo_del(in); + eo_del(out); return 1; } ret = ecore_audio_obj_out_input_attach(out, in); if (!ret) { printf("Could not attach input\n"); - eo_unref(out); - eo_unref(in); + eo_del(out); + eo_del(in); return 1; } diff --git a/src/examples/elementary/performance/graphical.c b/src/examples/elementary/performance/graphical.c index b364022b2d..239655e0ef 100644 --- a/src/examples/elementary/performance/graphical.c +++ b/src/examples/elementary/performance/graphical.c @@ -289,7 +289,7 @@ _change_scene_setup() { evas_canvas3d_node_member_del(globalGraphical.root_node, node); globalGraphical.list_nodes = eina_list_remove(globalGraphical.list_nodes, node); - /*eo_unref(node);Unless evas_canvas3d_destructors work properly*/ + /*eo_del(node);Unless evas_canvas3d_destructors work properly*/ } eina_list_free(globalGraphical.list_nodes); eina_list_free(l); @@ -298,7 +298,7 @@ _change_scene_setup() EINA_LIST_FOREACH (globalGraphical.list_meshes, l, m) { globalGraphical.list_meshes = eina_list_remove(globalGraphical.list_meshes, m); - /*eo_unref(m); Unless evas_canvas3d_destructors work properly*/ + /*eo_del(m); Unless evas_canvas3d_destructors work properly*/ } eina_list_free(globalGraphical.list_meshes); eina_list_free(l); diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c index da0dfda91b..6c533335be 100644 --- a/src/lib/ecore/ecore.c +++ b/src/lib/ecore/ecore.c @@ -367,7 +367,7 @@ ecore_shutdown(void) } #endif - eo_unref(_mainloop_singleton); + eo_del(_mainloop_singleton); _mainloop_singleton = NULL; if (_ecore_fps_debug) _ecore_fps_debug_shutdown(); @@ -413,7 +413,7 @@ ecore_shutdown(void) if (vpath) { - eo_unref(vpath); + eo_del(vpath); vpath = NULL; } diff --git a/src/lib/ecore/ecore_exe.c b/src/lib/ecore/ecore_exe.c index 941eb72293..3063b79685 100644 --- a/src/lib/ecore/ecore_exe.c +++ b/src/lib/ecore/ecore_exe.c @@ -209,7 +209,7 @@ ecore_exe_free(Ecore_Exe *obj) return NULL; void *data = exe->data; - eo_unref(obj); + eo_del(obj); return data; } diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index 71d44b9570..6a6095c80a 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -2833,7 +2833,7 @@ _efl_loop_timeout_cb(void *data, const Eo_Event *event EINA_UNUSED) eina_promise_owner_value_set(t->promise, &t->data, NULL); - eo_unref(t->u.timer); + eo_del(t->u.timer); return EO_CALLBACK_CONTINUE; } @@ -2876,7 +2876,7 @@ _efl_loop_job_cancel(void* data, Eina_Promise_Owner* promise EINA_UNUSED) if (j->job_is) ecore_job_del(j->u.job); else - eo_unref(j->u.timer); + eo_del(j->u.timer); _efl_loop_internal_cancel(j); } diff --git a/src/lib/ecore/ecore_timer.c b/src/lib/ecore/ecore_timer.c index 041fafeba5..15d80cb91e 100644 --- a/src/lib/ecore/ecore_timer.c +++ b/src/lib/ecore/ecore_timer.c @@ -172,7 +172,7 @@ _ecore_timer_legacy_tick(void *data, const Eo_Event *event) legacy->inside_call = 1; if (!_ecore_call_task_cb(legacy->func, (void*)legacy->data) || legacy->delete_me) - eo_unref(event->object); + eo_del(event->object); return EO_CALLBACK_CONTINUE; } @@ -239,7 +239,7 @@ ecore_timer_del(Ecore_Timer *timer) if (legacy->inside_call) legacy->delete_me = EINA_TRUE; else - eo_unref(timer); + eo_del(timer); return data; } @@ -484,10 +484,10 @@ _efl_timer_shutdown(void) Efl_Timer_Data *timer; EINA_INLIST_FREE(timers, timer) - eo_unref(timer->object); + eo_del(timer->object); EINA_INLIST_FREE(suspended, timer) - eo_unref(timer->object); + eo_del(timer->object); timer_current = NULL; } diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c index 2dc0d57e5c..7faf36dd9f 100644 --- a/src/lib/ecore_con/ecore_con.c +++ b/src/lib/ecore_con/ecore_con.c @@ -332,7 +332,7 @@ _efl_network_lookup(Eo *kls_obj EINA_UNUSED, void *pd EINA_UNUSED, const char *n return EINA_TRUE; free(lk); - eo_unref(obj); + eo_del(obj); return EINA_FALSE; } @@ -1293,7 +1293,7 @@ ecore_con_event_client_error(Ecore_Con_Client *obj, const char *error) static void _ecore_con_server_free(Ecore_Con_Server *obj) { - eo_unref(obj); + eo_del(obj); } EOLIAN static void @@ -1381,7 +1381,7 @@ end: static void _ecore_con_client_free(Ecore_Con_Client *obj) { - eo_unref(obj); + eo_del(obj); } EOLIAN static void @@ -2130,7 +2130,7 @@ error: ecore_event_del(ev); } } - eo_unref(obj); + eo_del(obj); if (clerr || errno) ecore_con_event_server_error(svr_obj, clerr ? : strerror(errno)); return ECORE_CALLBACK_RENEW; } diff --git a/src/lib/ecore_con/ecore_con_eet.c b/src/lib/ecore_con/ecore_con_eet.c index 29cc8b7ce6..4812d577ba 100644 --- a/src/lib/ecore_con/ecore_con_eet.c +++ b/src/lib/ecore_con/ecore_con_eet.c @@ -742,7 +742,7 @@ ecore_con_eet_client_new(Ecore_Con_Server *server) EAPI void ecore_con_eet_server_free(Ecore_Con_Eet *r) { - eo_unref(r); + eo_del(r); } EAPI void diff --git a/src/lib/ecore_con/ecore_con_local_win32.c b/src/lib/ecore_con/ecore_con_local_win32.c index 8814a864f3..14bf8b2b45 100644 --- a/src/lib/ecore_con/ecore_con_local_win32.c +++ b/src/lib/ecore_con/ecore_con_local_win32.c @@ -356,7 +356,7 @@ del_handler_read: close_event_read: CloseHandle(svr->event_read); free_cl: - eo_unref(cl_obj); + eo_del(cl_obj); return ECORE_CALLBACK_CANCEL; } diff --git a/src/lib/ecore_con/ecore_con_url.c b/src/lib/ecore_con/ecore_con_url.c index 72870af1fe..3037d2cd5b 100644 --- a/src/lib/ecore_con/ecore_con_url.c +++ b/src/lib/ecore_con/ecore_con_url.c @@ -374,7 +374,7 @@ ecore_con_url_free(Ecore_Con_Url *url_obj) eo_event_callback_array_del(url_obj, efl_network_url_event_table_callbacks(), NULL); - eo_unref(url_obj); + eo_del(url_obj); } static void diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index 9086babc6a..0fdd1a1230 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c @@ -200,14 +200,14 @@ _edje_edit_efl_file_file_set(Eo *obj, Edje_Edit *eed, const char *file, const ch int_ret = efl_file_set(eo_super(obj, MY_CLASS), file, group); if (!int_ret) { - eo_unref(file_obj); + eo_del(file_obj); return ret; } eed->program_scripts = eina_hash_int32_new((Eina_Free_Cb)_edje_edit_program_script_free); ef = eet_open(file, EET_FILE_MODE_READ); - eo_unref(file_obj); + eo_del(file_obj); snprintf(buf, sizeof(buf), "edje/scripts/embryo/source/%i", eed->base->collection->id); diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c index 1a5800365d..2d08526fd8 100644 --- a/src/lib/edje/edje_load.c +++ b/src/lib/edje/edje_load.c @@ -257,7 +257,7 @@ edje_file_collection_list(const char *file) lst = edje_mmap_collection_list(f); eina_file_close(f); - eo_unref(file_obj); + eo_del(file_obj); return lst; } diff --git a/src/lib/edje/edje_multisense.c b/src/lib/edje/edje_multisense.c index 8020cd6c05..31028ce176 100644 --- a/src/lib/edje/edje_multisense.c +++ b/src/lib/edje/edje_multisense.c @@ -10,7 +10,7 @@ static Eina_Bool outfail = EINA_FALSE; static Eina_Bool _play_finished(void *data EINA_UNUSED, const Eo_Event *event) { - eo_unref(event->object); + eo_del(event->object); return EINA_TRUE; } @@ -19,7 +19,7 @@ static Eina_Bool _out_fail(void *data EINA_UNUSED, const Eo_Event *event) { outfail = EINA_TRUE; - eo_unref(event->object); + eo_del(event->object); out = NULL; return EINA_TRUE; } @@ -219,14 +219,14 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c #elif HAVE_PULSE ERR("Could not create multisense audio out (pulse)"); #endif - eo_unref(in); + eo_del(in); return EINA_FALSE; } ret = ecore_audio_obj_out_input_attach(out, in); if (!ret) { ERR("Could not attach input"); - eo_unref(in); + eo_del(in); return EINA_FALSE; } } @@ -289,7 +289,7 @@ _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const if (!ret) { ERR("Could not attach input"); - eo_unref(in); + eo_del(in); return EINA_FALSE; } } @@ -337,7 +337,7 @@ _edje_multisense_shutdown(void) if (out) { // XXX: this causes an abort inside of pa!!!!! - //eo_unref(out); + //eo_del(out); out = NULL; outs = 0; } diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c index b271d2b1de..ebfcf0cf23 100644 --- a/src/lib/edje/edje_smart.c +++ b/src/lib/edje/edje_smart.c @@ -52,7 +52,7 @@ _edje_object_eo_base_destructor(Eo *obj, Edje *class_data) { if (class_data->file_obj) { - eo_unref(class_data->file_obj); + eo_del(class_data->file_obj); class_data->file_obj = NULL; } eo_destructor(eo_super(obj, MY_CLASS)); @@ -366,7 +366,7 @@ _edje_object_efl_file_file_set(Eo *obj, Edje *ed, const char *file, const char * if (ed->file_obj) { - eo_unref(ed->file_obj); + eo_del(ed->file_obj); ed->file_obj = NULL; } if (file) @@ -382,7 +382,7 @@ _edje_object_efl_file_file_set(Eo *obj, Edje *ed, const char *file, const char * f = eina_file_open(file2, EINA_FALSE); if (!f) { - eo_unref(ed->file_obj); + eo_del(ed->file_obj); ed->file_obj = NULL; if (ed->path) eina_stringshare_del(ed->path); ed->path = NULL; diff --git a/src/lib/elementary/elc_ctxpopup.c b/src/lib/elementary/elc_ctxpopup.c index 4e070fd481..3ef52c5ddf 100644 --- a/src/lib/elementary/elc_ctxpopup.c +++ b/src/lib/elementary/elc_ctxpopup.c @@ -1146,7 +1146,7 @@ _elm_ctxpopup_evas_object_smart_del(Eo *obj, Elm_Ctxpopup_Data *sd) ELM_SAFE_FREE(sd->bg, evas_object_del); EINA_LIST_FREE(sd->items, it) - eo_unref(it); + eo_del(it); evas_obj_smart_del(eo_super(obj, MY_CLASS)); } diff --git a/src/lib/elementary/elc_hoversel.c b/src/lib/elementary/elc_hoversel.c index df041f321a..3d97254f3e 100644 --- a/src/lib/elementary/elc_hoversel.c +++ b/src/lib/elementary/elc_hoversel.c @@ -575,7 +575,7 @@ _elm_hoversel_evas_object_smart_del(Eo *obj, Elm_Hoversel_Data *sd) { ELM_HOVERSEL_ITEM_DATA_GET(eo_item, it); ELM_SAFE_FREE(VIEW(it), evas_object_del); - eo_unref(eo_item); + eo_del(eo_item); } elm_hoversel_hover_parent_set(obj, NULL); diff --git a/src/lib/elementary/elc_multibuttonentry.c b/src/lib/elementary/elc_multibuttonentry.c index 08a7635e60..a154571b51 100644 --- a/src/lib/elementary/elc_multibuttonentry.c +++ b/src/lib/elementary/elc_multibuttonentry.c @@ -1594,7 +1594,7 @@ _elm_multibuttonentry_evas_object_smart_del(Eo *obj, Elm_Multibuttonentry_Data * Elm_Multibuttonentry_Item_Filter *_item_filter = NULL; EINA_LIST_FREE(sd->items, eo_item) - eo_unref(eo_item); + eo_del(eo_item); sd->items = NULL; diff --git a/src/lib/elementary/elm_app_client.c b/src/lib/elementary/elm_app_client.c index 22e41d1f09..fcdee64c86 100644 --- a/src/lib/elementary/elm_app_client.c +++ b/src/lib/elementary/elm_app_client.c @@ -104,7 +104,7 @@ _iface_del(void *data, const Eldbus_Message *msg) eina_hash_del(cdata->views, path, NULL); eo_event_callback_call(eo, ELM_APP_CLIENT_EVENT_VIEW_DELETED, view); - eo_unref(view); + eo_del(view); } } @@ -145,7 +145,7 @@ _pkg_name_owner_changed_cb(void *data, const char *bus EINA_UNUSED, const char * eina_hash_del(cdata->views, path, NULL); eo_event_callback_call(eo, ELM_APP_CLIENT_EVENT_VIEW_DELETED, view); - eo_unref(view); + eo_del(view); } } @@ -313,7 +313,7 @@ _elm_app_client_eo_base_destructor(Eo *eo, Elm_App_Client_Data *data) iter = eina_hash_iterator_data_new(data->views); EINA_ITERATOR_FOREACH(iter, view) - eo_unref(view); + eo_del(view); eina_iterator_free(iter); eina_hash_free(data->views); diff --git a/src/lib/elementary/elm_app_server.c b/src/lib/elementary/elm_app_server.c index 52284aa5ff..4899388846 100644 --- a/src/lib/elementary/elm_app_server.c +++ b/src/lib/elementary/elm_app_server.c @@ -46,7 +46,7 @@ _view_append(Elm_App_Server_Data *data, Elm_App_Server_View *view) if (eina_hash_find(data->views, view_id)) { ERR("%p already have a view with id=%s", data->pkg, view_id); - eo_unref(view); + eo_del(view); return EINA_FALSE; } @@ -434,7 +434,7 @@ _elm_app_server_eo_base_destructor(Eo *obj, Elm_App_Server_Data *data) { //do not modify hash when iterating eo_event_callback_del(view, EO_EVENT_DEL, _view_del_cb, data); - eo_unref(view); + eo_del(view); } eina_iterator_free(iter); eina_hash_free(data->views); diff --git a/src/lib/elementary/elm_atspi_bridge.c b/src/lib/elementary/elm_atspi_bridge.c index b42a109ac1..c49568d1df 100644 --- a/src/lib/elementary/elm_atspi_bridge.c +++ b/src/lib/elementary/elm_atspi_bridge.c @@ -4460,7 +4460,7 @@ _elm_atspi_bridge_shutdown(void) { if (_init_count) { - eo_unref(_instance); + eo_del(_instance); _init_count = 0; } } diff --git a/src/lib/elementary/elm_colorselector.c b/src/lib/elementary/elm_colorselector.c index 12e8cda550..f29b872cd7 100644 --- a/src/lib/elementary/elm_colorselector.c +++ b/src/lib/elementary/elm_colorselector.c @@ -232,7 +232,7 @@ _items_del(Elm_Colorselector_Data *sd) EINA_LIST_FREE(sd->items, item) { - eo_unref (item); + eo_del (item); } sd->items = NULL; diff --git a/src/lib/elementary/elm_dayselector.c b/src/lib/elementary/elm_dayselector.c index 500db014ab..bc03214118 100644 --- a/src/lib/elementary/elm_dayselector.c +++ b/src/lib/elementary/elm_dayselector.c @@ -175,7 +175,7 @@ _item_del_cb(void *data, elm_layout_signal_emit(obj, buf, "elm"); VIEW(it) = NULL; - eo_unref(EO_OBJ(it)); + eo_del(EO_OBJ(it)); elm_layout_sizing_eval(obj); break; @@ -261,7 +261,7 @@ _elm_dayselector_content_set(Eo *obj, Elm_Dayselector_Data *sd, const char *item int_ret = efl_content_set(efl_part(eo_super(obj, MY_CLASS), buf), content); if (!int_ret) { - eo_unref(eo_it); + eo_del(eo_it); return EINA_FALSE; } @@ -337,7 +337,7 @@ _elm_dayselector_content_unset(Eo *obj, Elm_Dayselector_Data *sd, const char *it elm_layout_signal_emit(obj, buf, "elm"); VIEW(it) = NULL; - eo_unref(EO_OBJ(it)); + eo_del(EO_OBJ(it)); elm_layout_sizing_eval(obj); @@ -444,7 +444,7 @@ _elm_dayselector_evas_object_smart_del(Eo *obj, Elm_Dayselector_Data *sd) { sd->items = eina_list_remove(sd->items, it); eina_stringshare_del(it->day_style); - eo_unref(EO_OBJ(it)); + eo_del(EO_OBJ(it)); } /* handles freeing sd */ diff --git a/src/lib/elementary/elm_diskselector.c b/src/lib/elementary/elm_diskselector.c index 8e5c0d1ac3..249a26e8a1 100644 --- a/src/lib/elementary/elm_diskselector.c +++ b/src/lib/elementary/elm_diskselector.c @@ -1131,7 +1131,7 @@ _round_item_del(Elm_Diskselector_Data *sd EINA_UNUSED, Elm_Diskselector_Item_Data *it) { if (!it) return; - eo_unref(EO_OBJ(it)); + eo_del(EO_OBJ(it)); } static void @@ -1362,28 +1362,28 @@ _elm_diskselector_evas_object_smart_del(Eo *obj, Elm_Diskselector_Data *sd) if (sd->last) { evas_object_del(sd->VIEW(last)); - eo_unref(EO_OBJ(sd->last)); + eo_del(EO_OBJ(sd->last)); sd->last = NULL; } if (sd->s_last) { evas_object_del(sd->VIEW(s_last)); - eo_unref(EO_OBJ(sd->s_last)); + eo_del(EO_OBJ(sd->s_last)); sd->s_last = NULL; } if (sd->second) { evas_object_del(sd->VIEW(second)); - eo_unref(EO_OBJ(sd->second)); + eo_del(EO_OBJ(sd->second)); sd->second = NULL; } if (sd->first) { evas_object_del(sd->VIEW(first)); - eo_unref(EO_OBJ(sd->first)); + eo_del(EO_OBJ(sd->first)); sd->first = NULL; } @@ -1392,7 +1392,7 @@ _elm_diskselector_evas_object_smart_del(Eo *obj, Elm_Diskselector_Data *sd) if (it) { evas_object_del(VIEW(it)); - eo_unref(EO_OBJ(it)); + eo_del(EO_OBJ(it)); } } sd->under_items = eina_list_free(sd->under_items); @@ -1402,14 +1402,14 @@ _elm_diskselector_evas_object_smart_del(Eo *obj, Elm_Diskselector_Data *sd) if (it) { evas_object_del(VIEW(it)); - eo_unref(EO_OBJ(it)); + eo_del(EO_OBJ(it)); } } sd->over_items = eina_list_free(sd->over_items); EINA_LIST_FOREACH_SAFE(sd->items, l, l2, it) { - eo_unref(EO_OBJ(it)); + eo_del(EO_OBJ(it)); } sd->items = eina_list_free(sd->items); sd->r_items = eina_list_free(sd->r_items); @@ -1636,7 +1636,7 @@ _elm_diskselector_clear(Eo *obj, Elm_Diskselector_Data *sd) sd->selected_item = NULL; EINA_LIST_FREE(sd->items, it) { - eo_unref(EO_OBJ(it)); + eo_del(EO_OBJ(it)); } _round_items_del(sd); diff --git a/src/lib/elementary/elm_gengrid.c b/src/lib/elementary/elm_gengrid.c index 0f73473b52..ef49a484e7 100644 --- a/src/lib/elementary/elm_gengrid.c +++ b/src/lib/elementary/elm_gengrid.c @@ -4082,7 +4082,7 @@ _internal_elm_gengrid_clear(Evas_Object *obj, if (next) itn = ELM_GEN_ITEM_FROM_INLIST(next); if (itn) itn->walking++; /* prevent early death of subitem */ it->del_cb(it); - eo_unref(EO_OBJ(it)); + eo_del(EO_OBJ(it)); if (itn) itn->walking--; } } @@ -4154,7 +4154,7 @@ _item_select(Elm_Gen_Item *it) if ((!it->walking) && (it->generation < sd->generation)) { it->del_cb(it); - eo_unref(eo_it); + eo_del(eo_it); sd->last_selected_item = NULL; } } diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c index 3ec4cab877..85a7341d72 100644 --- a/src/lib/elementary/elm_genlist.c +++ b/src/lib/elementary/elm_genlist.c @@ -5861,7 +5861,7 @@ _item_select(Elm_Gen_Item *it) item_deleted: it->walking = -1; //This item was removed from it's item list. _item_del(it); - eo_unref(eo_it); + eo_del(eo_it); evas_object_unref(obj); return EINA_TRUE; } diff --git a/src/lib/elementary/elm_list.c b/src/lib/elementary/elm_list.c index 5706b895f4..a11baae2dd 100644 --- a/src/lib/elementary/elm_list.c +++ b/src/lib/elementary/elm_list.c @@ -672,7 +672,7 @@ _elm_list_deletions_process(Elm_List_Data *sd) /* issuing free because of "locking" item del pre hook */ _elm_list_item_free(it); - eo_unref(EO_OBJ(it)); + eo_del(EO_OBJ(it)); } sd->walking--; @@ -2489,7 +2489,7 @@ _elm_list_evas_object_smart_del(Eo *obj, Elm_List_Data *sd) /* issuing free because of "locking" item del pre hook */ _elm_list_item_free(it); WIDGET(it) = NULL; - eo_unref(eo_it); + eo_del(eo_it); } _elm_list_unwalk(obj, sd); @@ -2750,7 +2750,7 @@ _elm_list_clear(Eo *obj, Elm_List_Data *sd) ELM_LIST_ITEM_DATA_GET(eo_it, it); /* issuing free because of "locking" item del pre hook */ _elm_list_item_free(it); - eo_unref(eo_it); + eo_del(eo_it); } _elm_list_unwalk(obj, sd); diff --git a/src/lib/elementary/elm_menu.c b/src/lib/elementary/elm_menu.c index 86ffd926c0..e9339a0248 100644 --- a/src/lib/elementary/elm_menu.c +++ b/src/lib/elementary/elm_menu.c @@ -54,7 +54,7 @@ _item_del(Elm_Object_Item *eo_item) _item_del(child); eina_list_free(item->submenu.items); - eo_unref(eo_item); + eo_del(eo_item); } static void diff --git a/src/lib/elementary/elm_segment_control.c b/src/lib/elementary/elm_segment_control.c index b1a26b518e..d77b93227a 100644 --- a/src/lib/elementary/elm_segment_control.c +++ b/src/lib/elementary/elm_segment_control.c @@ -633,7 +633,7 @@ _elm_segment_control_evas_object_smart_del(Eo *obj, Elm_Segment_Control_Data *sd EINA_LIST_FREE(sd->items, eo_it) { - eo_unref(eo_it); + eo_del(eo_it); } evas_obj_smart_del(eo_super(obj, MY_CLASS)); diff --git a/src/lib/elementary/elm_slideshow.c b/src/lib/elementary/elm_slideshow.c index 98d0931294..c3d5879ab7 100644 --- a/src/lib/elementary/elm_slideshow.c +++ b/src/lib/elementary/elm_slideshow.c @@ -643,7 +643,7 @@ _elm_slideshow_clear(Eo *obj EINA_UNUSED, Elm_Slideshow_Data *sd) sd->current = NULL; EINA_LIST_FOREACH_SAFE(sd->items, itr, itr2, eo_item) - eo_unref(eo_item); + eo_del(eo_item); } EOLIAN static const Eina_List* diff --git a/src/lib/elementary/elm_sys_notify.c b/src/lib/elementary/elm_sys_notify.c index 1cb69c2cd9..c58659a1a3 100644 --- a/src/lib/elementary/elm_sys_notify.c +++ b/src/lib/elementary/elm_sys_notify.c @@ -155,7 +155,7 @@ _elm_sys_notify_servers_set(Eo *obj EINA_UNUSED, { /* Delete if server type is not provided */ if (!(servers & (1 << i))) - eo_unref(sd->servers[i]); + eo_del(sd->servers[i]); } else { @@ -223,7 +223,7 @@ _elm_unneed_sys_notify(void) if (manager) { elm_obj_sys_notify_servers_set(manager, ELM_SYS_NOTIFY_SERVER_NONE); - eo_unref(manager); + eo_del(manager); } } diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index 35d9163bd9..d42d26ca06 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -4575,7 +4575,7 @@ _elm_widget_item_del(Eo *eo_item EINA_UNUSED, Elm_Widget_Item_Data *item) Eina_Bool del_ok; del_ok = elm_wdg_item_del_pre(item->eo_obj); if (del_ok) - eo_unref(item->eo_obj); + eo_del(item->eo_obj); return; } diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index 61af39bc1b..4e5120de45 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -861,6 +861,7 @@ EAPI int eo_ref_get(const Eo *obj); * * @see eo_del_intercept_get() * @see eo_unref() + * @see eo_del() */ EAPI void eo_del_intercept_set(Eo *obj, Eo_Del_Intercept del_intercept_func); diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index 8ff5f4ac27..2797d1ae8d 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -718,7 +718,7 @@ _eo_add_internal_start(const char *file, int line, const Eo_Class *klass_id, Eo /* We have two refs at this point. */ _eo_unref(obj); - _eo_unref(obj); + eo_del((Eo *) obj->header.id); return NULL; } else if (eo_id != _eo_obj_id_get(obj)) @@ -776,7 +776,7 @@ _eo_add_internal_end(Eo *eo_id, Eo *finalized_id) cleanup: _eo_unref(obj); - _eo_unref(obj); + eo_del((Eo *) obj->header.id); return NULL; } diff --git a/src/lib/eo/eo_base.eo b/src/lib/eo/eo_base.eo index 8d0de471c6..5ce07d8083 100644 --- a/src/lib/eo/eo_base.eo +++ b/src/lib/eo/eo_base.eo @@ -73,6 +73,15 @@ abstract Eo.Base () parent: Eo.Base @nullable; [[the new parent]] } } + del @const { + [[Unrefs the object and reparents it to NULL. + + Because eo_del() unrefs and reparents to NULL, it doesn't really delete the object. + + This method accepts a const object for convenience, so all objects + could be passed to it easily. + ]] + } @property name { [[ The name of the object. diff --git a/src/lib/eo/eo_base_class.c b/src/lib/eo/eo_base_class.c index 1743695019..5d8601b91d 100644 --- a/src/lib/eo/eo_base_class.c +++ b/src/lib/eo/eo_base_class.c @@ -465,6 +465,19 @@ _eo_base_comment_get(Eo *obj EINA_UNUSED, Eo_Base_Data *pd) } EOLIAN static void +_eo_base_del(const Eo *obj, Eo_Base_Data *pd EINA_UNUSED) +{ + if (eo_parent_get((Eo *) obj)) + { + eo_parent_set((Eo *) obj, NULL); + } + else + { + eo_unref(obj); + } +} + +EOLIAN static void _eo_base_parent_set(Eo *obj, Eo_Base_Data *pd, Eo *parent_id) { if (pd->parent == parent_id) @@ -1433,6 +1446,7 @@ _eo_base_destructor(Eo *obj, Eo_Base_Data *pd) if (pd->parent) { + ERR("Object '%p' still has a parent at the time of destruction.", obj); eo_parent_set(obj, NULL); } diff --git a/src/lib/evas/canvas/efl_canvas_image.c b/src/lib/evas/canvas/efl_canvas_image.c index dc4167fe78..e799773df4 100644 --- a/src/lib/evas/canvas/efl_canvas_image.c +++ b/src/lib/evas/canvas/efl_canvas_image.c @@ -623,7 +623,7 @@ _image_pixels_set(Evas_Object_Protected_Data *obj, } if (o->file_obj) { - eo_unref(o->file_obj); + eo_del(o->file_obj); o->file_obj = NULL; } diff --git a/src/lib/evas/canvas/evas_image_legacy.c b/src/lib/evas/canvas/evas_image_legacy.c index cc9b395dc5..897192ebd6 100644 --- a/src/lib/evas/canvas/evas_image_legacy.c +++ b/src/lib/evas/canvas/evas_image_legacy.c @@ -584,7 +584,7 @@ evas_object_image_data_set(Eo *eo_obj, void *data) o->engine_data = NULL; if (o->file_obj) { - eo_unref(o->file_obj); + eo_del(o->file_obj); o->file_obj = NULL; } } @@ -664,7 +664,7 @@ evas_object_image_data_copy_set(Eo *eo_obj, void *data) ENFN->image_free(ENDT, o->engine_data); if (o->file_obj) { - eo_unref(o->file_obj); + eo_del(o->file_obj); o->file_obj = NULL; } o->engine_data = ENFN->image_new_from_copied_data(ENDT, diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 740413ae56..bb192b9868 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -262,7 +262,7 @@ _evas_image_init_set(const Eina_File *f, const char *file, const char *key, } if (o->file_obj) { - eo_unref(o->file_obj); + eo_del(o->file_obj); o->file_obj = NULL; } o->load_error = EVAS_LOAD_ERROR_NONE; @@ -1429,7 +1429,7 @@ evas_object_image_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj) o->engine_data = NULL; if (o->file_obj) { - eo_unref(o->file_obj); + eo_del(o->file_obj); o->file_obj = NULL; } if (o->pixels->pixel_updates) diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c index 661a16cda5..e3ac031e5f 100644 --- a/src/lib/evas/canvas/evas_object_main.c +++ b/src/lib/evas/canvas/evas_object_main.c @@ -735,7 +735,7 @@ evas_object_del(Evas_Object *eo_obj) evas_object_hide(eo_obj); obj->eo_del_called = EINA_TRUE; - eo_unref(eo_obj); + eo_del(eo_obj); } EOLIAN static void diff --git a/src/lib/evas/canvas/evas_vg_node.c b/src/lib/evas/canvas/evas_vg_node.c index 3c44b914f6..5f17c8b7af 100644 --- a/src/lib/evas/canvas/evas_vg_node.c +++ b/src/lib/evas/canvas/evas_vg_node.c @@ -292,7 +292,7 @@ _efl_vg_eo_base_destructor(Eo *obj, Efl_VG_Data *pd) if (pd->renderer) { - eo_unref(pd->renderer); + eo_del(pd->renderer); pd->renderer = NULL; } if (pd->intp) @@ -675,7 +675,7 @@ _efl_vg_interpolate(Eo *obj, tod = eo_data_scope_get(to, EFL_VG_CLASS); from_map = 1.0 - pos_map; - eo_unref(pd->renderer); + eo_del(pd->renderer); pd->renderer = NULL; if (fromd->m || tod->m) @@ -765,7 +765,7 @@ _efl_vg_dup(Eo *obj, Efl_VG_Data *pd, const Efl_VG *from) if (pd->renderer) { - eo_unref(pd->renderer); + eo_del(pd->renderer); pd->renderer = NULL; } diff --git a/src/lib/evas/filters/evas_filter.c b/src/lib/evas/filters/evas_filter.c index 1bb6609cd8..fef55f492d 100644 --- a/src/lib/evas/filters/evas_filter.c +++ b/src/lib/evas/filters/evas_filter.c @@ -90,7 +90,7 @@ static void _filter_buffer_backing_free(Evas_Filter_Buffer *fb) { if (!fb || !fb->buffer) return; - eo_unref(fb->buffer); + eo_del(fb->buffer); fb->buffer = NULL; } diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c index 11a5530320..ca8d83950b 100644 --- a/src/modules/evas/engines/gl_generic/evas_engine.c +++ b/src/modules/evas/engines/gl_generic/evas_engine.c @@ -2490,7 +2490,7 @@ eng_ector_create(void *data EINA_UNUSED) static void eng_ector_destroy(void *data EINA_UNUSED, Ector_Surface *ector) { - if (ector) eo_unref(ector); + if (ector) eo_del(ector); } static Ector_Buffer * diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c index 40c084aea0..f67e6946cb 100644 --- a/src/modules/evas/engines/software_generic/evas_engine.c +++ b/src/modules/evas/engines/software_generic/evas_engine.c @@ -4065,7 +4065,7 @@ eng_ector_create(void *data EINA_UNUSED) static void eng_ector_destroy(void *data EINA_UNUSED, Ector_Surface *ector) { - if (ector) eo_unref(ector); + if (ector) eo_del(ector); } static Ector_Buffer * diff --git a/src/tests/ecore/ecore_test_ecore_audio.c b/src/tests/ecore/ecore_test_ecore_audio.c index 2174f9a24c..480e5a2b8b 100644 --- a/src/tests/ecore/ecore_test_ecore_audio.c +++ b/src/tests/ecore/ecore_test_ecore_audio.c @@ -83,8 +83,8 @@ START_TEST(ecore_test_ecore_audio_obj_pulse) ecore_main_loop_begin(); fail_if(pulse_context_failed); - eo_unref(out); - eo_unref(in); + eo_del(out); + eo_del(in); } END_TEST #endif @@ -100,7 +100,7 @@ static Eina_Bool _idle_del(void *data) { Eo *in = data; - eo_unref(in); + eo_del(in); ecore_idler_add(_quit, NULL); return EINA_FALSE; @@ -218,8 +218,8 @@ START_TEST(ecore_test_ecore_audio_obj_tone) ecore_main_loop_begin(); - eo_unref(in); - eo_unref(out); + eo_del(in); + eo_del(out); //TODO: Compare and fail ecore_file_remove(TESTS_BUILD_DIR"/tmp.wav"); @@ -308,8 +308,8 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile) ecore_main_loop_begin(); - eo_unref(in); - eo_unref(out); + eo_del(in); + eo_del(out); //TODO: Compare and fail ecore_file_remove(TESTS_BUILD_DIR"/tmp.wav"); @@ -361,20 +361,20 @@ START_TEST(ecore_test_ecore_audio_obj_in_out) fail_if(eina_list_count(in3) != 2); fail_if(eina_list_data_get(in3) != in); - eo_unref(in2); + eo_del(in2); in3 = ecore_audio_obj_out_inputs_get(out); fail_if(eina_list_count(in3) != 1); fail_if(eina_list_data_get(in3) != in); - eo_unref(out); + eo_del(out); out2 = ecore_audio_obj_in_output_get(in); fail_if(out2); - eo_unref(in); + eo_del(in); } END_TEST @@ -433,8 +433,8 @@ START_TEST(ecore_test_ecore_audio_obj_vio) ecore_main_loop_begin(); - eo_unref(out); - eo_unref(in); + eo_del(out); + eo_del(in); } END_TEST @@ -533,7 +533,7 @@ START_TEST(ecore_test_ecore_audio_obj_in) fail_if(buf[i] != 0x00); } - eo_unref(in); + eo_del(in); } END_TEST @@ -581,7 +581,7 @@ START_TEST(ecore_test_ecore_audio_obj) volume = ecore_audio_obj_volume_get(obj); fail_if(volume != 0.5); - eo_unref(obj); + eo_del(obj); } } diff --git a/src/tests/edje/edje_test_edje.c b/src/tests/edje/edje_test_edje.c index 2b2b47a594..2de5f147b7 100644 --- a/src/tests/edje/edje_test_edje.c +++ b/src/tests/edje/edje_test_edje.c @@ -705,7 +705,7 @@ START_TEST(edje_test_table_eoapi) fail_if(!efl_pack_clear(proxy)); fail_if(efl_content_count(efl_part(obj, "table2")) != 1); fail_if(efl_content_count(proxy) != 4); - eo_unref(proxy); + eo_del(proxy); EDJE_TEST_FREE_EVAS(); } diff --git a/src/tests/elementary/elm_test_atspi.c b/src/tests/elementary/elm_test_atspi.c index 2b39efc554..82c1564e37 100644 --- a/src/tests/elementary/elm_test_atspi.c +++ b/src/tests/elementary/elm_test_atspi.c @@ -438,7 +438,7 @@ START_TEST (elm_atspi_relationship_remove) /* Test if relationship is implicity removed when object is deleted */ elm_interface_atspi_accessible_relationship_append(g_btn, ELM_ATSPI_RELATION_FLOWS_TO, g_bg); elm_interface_atspi_accessible_relationship_append(g_btn, ELM_ATSPI_RELATION_FLOWS_FROM, g_bg); - eo_unref(g_bg); + eo_del(g_bg); set = elm_interface_atspi_accessible_relation_set_get(g_btn); rel_to = rel_from = NULL; diff --git a/src/tests/emotion/emotion_test_main-eo.c b/src/tests/emotion/emotion_test_main-eo.c index 83937428c3..86a0cbb93e 100644 --- a/src/tests/emotion/emotion_test_main-eo.c +++ b/src/tests/emotion/emotion_test_main-eo.c @@ -97,7 +97,7 @@ main_signal_exit(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *ev EINA_ EINA_LIST_FREE(video_objs, o) { emotion_object_last_position_save(o); - eo_unref(o); + eo_del(o); } return EINA_TRUE; } diff --git a/src/tests/eo/children/children_main.c b/src/tests/eo/children/children_main.c index ba6f6a285e..9d30277333 100644 --- a/src/tests/eo/children/children_main.c +++ b/src/tests/eo/children/children_main.c @@ -40,7 +40,7 @@ main(int argc, char *argv[]) eina_iterator_free(iter); - eo_unref(child2); + eo_del(child2); iter = eo_children_iterator_new(parent); fail_if(!iter); @@ -52,7 +52,7 @@ main(int argc, char *argv[]) eina_iterator_free(iter); - eo_unref(child1); + eo_del(child1); iter = eo_children_iterator_new(parent); fail_if(!iter); @@ -62,7 +62,7 @@ main(int argc, char *argv[]) eina_iterator_free(iter); - eo_unref(child3); + eo_del(child3); iter = eo_children_iterator_new(parent); fail_if(iter); diff --git a/src/tests/eo/suite/eo_test_class_behaviour_errors.c b/src/tests/eo/suite/eo_test_class_behaviour_errors.c index 8533b3105e..12c478f454 100644 --- a/src/tests/eo/suite/eo_test_class_behaviour_errors.c +++ b/src/tests/eo/suite/eo_test_class_behaviour_errors.c @@ -81,8 +81,8 @@ START_TEST(eo_destructor_double_del) fail_if(!obj); TEST_EO_ERROR("_eo_unref", "Object %p already destructed."); - eo_unref(obj); - eo_unref(obj); + eo_del(obj); + eo_del(obj); eina_log_print_cb_set(eina_log_print_cb_stderr, NULL); diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c index 055bd3c12a..ddbe0987cc 100644 --- a/src/tests/eo/suite/eo_test_general.c +++ b/src/tests/eo/suite/eo_test_general.c @@ -378,11 +378,11 @@ START_TEST(eo_composite_tests) fail_if(!eo_composite_part_is(obj2)); /* Check that a deletion of a child detaches from the parent. */ - eo_unref(obj2); + eo_del(obj2); fail_if(!eo_composite_attach(obj3, obj)); /* Check that a deletion of the parent detaches the child. */ - eo_unref(obj3); + eo_del(obj3); fail_if(eo_composite_part_is(obj)); eo_unref(obj); @@ -582,9 +582,9 @@ START_TEST(eo_refs) ck_assert_int_eq(eo_ref_get(obj2), 1); ck_assert_int_eq(eo_ref_get(obj3), 1); - eo_unref(obj); - eo_unref(obj2); - eo_unref(obj3); + eo_del(obj); + eo_del(obj2); + eo_del(obj3); /* Just check it doesn't seg atm. */ obj = eo_add(SIMPLE_CLASS, NULL); @@ -596,7 +596,7 @@ START_TEST(eo_refs) obj2 = eo_add(SIMPLE_CLASS, obj); eo_unref(obj2); eo_ref(obj2); - eo_unref(obj2); + eo_del(obj2); eo_unref(obj); eo_shutdown(); @@ -811,6 +811,7 @@ START_TEST(eo_magic_checks) eo_ref((Eo *) buf); eo_unref((Eo *) buf); + eo_del((Eo *) buf); eo_isa((Eo *) buf, SIMPLE_CLASS); eo_isa(obj, (Eo_Class *) buf); @@ -1125,7 +1126,7 @@ START_TEST(eo_del_intercept) fail_if(!obj); fail_if(!eo_isa(obj, klass)); eo_del_intercept_set(obj, _del_intercept); - eo_unref(obj); + eo_del(obj); fail_if(!intercepted); fail_if(eo_isa(obj, klass)); @@ -1185,7 +1186,7 @@ START_TEST(eo_name) objtmp = eo_name_find(obj, "*mple:joe"); fail_if(objtmp != obj2); - eo_unref(obj); + eo_del(obj); eo_shutdown(); } @@ -1215,7 +1216,7 @@ START_TEST(eo_comment) comment = eo_comment_get(obj); fail_if(NULL != comment); - eo_unref(obj); + eo_del(obj); eo_shutdown(); } @@ -1232,7 +1233,7 @@ START_TEST(eo_rec_interface) objtmp = eo_provider_find(obj2, SEARCHABLE_CLASS); fail_if(objtmp != s); - eo_unref(obj); + eo_del(obj); eo_shutdown(); } diff --git a/src/tests/evas/evas_test_image.c b/src/tests/evas/evas_test_image.c index 1408525dc4..7f90754872 100644 --- a/src/tests/evas/evas_test_image.c +++ b/src/tests/evas/evas_test_image.c @@ -638,16 +638,16 @@ START_TEST(evas_object_image_defaults) fail_if(evas_object_image_filled_get(o)); evas_object_image_fill_get(o, &x, &y, &w, &h); fail_if(x || y || w || h); - eo_unref(o); + eo_del(o); o = evas_object_image_filled_add(e); fail_if(!evas_object_image_filled_get(o)); - eo_unref(o); + eo_del(o); /* test eo defaults */ o = eo_add(EVAS_IMAGE_CLASS, e); fail_if(!efl_gfx_fill_auto_get(o)); - eo_unref(o); + eo_del(o); evas_free(e); evas_shutdown(); diff --git a/src/tests/evas/evas_test_mesh.c b/src/tests/evas/evas_test_mesh.c index 9dea211c04..aba8a0bfc8 100644 --- a/src/tests/evas/evas_test_mesh.c +++ b/src/tests/evas/evas_test_mesh.c @@ -65,8 +65,8 @@ fail_if(!set_ok); \ res = _compare_meshes(mesh, mesh2); \ fail_if(res == 1); \ - eo_unref(mesh2); \ - eo_unref(mesh); \ + eo_del(mesh2); \ + eo_del(mesh); \ unlink(buffer); \ } |