summaryrefslogtreecommitdiff
path: root/src/examples
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-05-17 16:08:28 +0100
committerTom Hacohen <tom@stosb.com>2016-05-17 16:23:23 +0100
commit546ff7bbba788ec834c5608361c0834853f2d5d7 (patch)
tree72f867c3bbb79d0684d0bd2bf9785aa859c3ff7b /src/examples
parente9c4e7bf76513f2a2d110b93b3cced36318b6d14 (diff)
Eo: Remove eo_del() and make eo_unref() the replacement.
We used to have eo_del() as the mirrored action to eo_add(). No longer, now you just always eo_unref() to delete an object. This change makes it so the reference of the parent is shared with the reference the programmer has. So eo_parent_set(obj, NULL) can free an object, and so does eo_unref() (even if there is a parent). This means Eo no longer complains if you have a parent during deletion.
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/ecore/ecore_audio_playback.c2
-rw-r--r--src/examples/ecore/ecore_audio_to_ogg.c14
-rw-r--r--src/examples/elementary/performance/graphical.c4
3 files changed, 10 insertions, 10 deletions
diff --git a/src/examples/ecore/ecore_audio_playback.c b/src/examples/ecore/ecore_audio_playback.c
index f1624e0e67..9beb4e3b94 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)
201 201
202 inputs = eina_list_remove(inputs, event->obj); 202 inputs = eina_list_remove(inputs, event->obj);
203 ret = ecore_audio_obj_out_input_detach(out, event->obj); 203 ret = ecore_audio_obj_out_input_detach(out, event->obj);
204 eo_del(event->obj); 204 eo_unref(event->obj);
205 205
206 if (!ret) 206 if (!ret)
207 printf("Could not detach input %s\n", name); 207 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 fceed59045..2296be2e09 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)
24 printf("Done: %s\n", name); 24 printf("Done: %s\n", name);
25 25
26 ecore_audio_obj_in_output_get(event->obj, &out); 26 ecore_audio_obj_in_output_get(event->obj, &out);
27 eo_del(event->obj); 27 eo_unref(event->obj);
28 eo_del(out); 28 eo_unref(out);
29 29
30 ecore_main_loop_quit(); 30 ecore_main_loop_quit();
31 31
@@ -54,7 +54,7 @@ main(int argc, char *argv[])
54 ret = ecore_audio_obj_source_set(in, argv[1]); 54 ret = ecore_audio_obj_source_set(in, argv[1]);
55 if (!ret) { 55 if (!ret) {
56 printf("Could not set %s as input\n", argv[1]); 56 printf("Could not set %s as input\n", argv[1]);
57 eo_del(in); 57 eo_unref(in);
58 return 1; 58 return 1;
59 } 59 }
60 60
@@ -64,16 +64,16 @@ main(int argc, char *argv[])
64 ret = ecore_audio_obj_source_set(out, argv[2]); 64 ret = ecore_audio_obj_source_set(out, argv[2]);
65 if (!ret) { 65 if (!ret) {
66 printf("Could not set %s as output\n", argv[2]); 66 printf("Could not set %s as output\n", argv[2]);
67 eo_del(in); 67 eo_unref(in);
68 eo_del(out); 68 eo_unref(out);
69 return 1; 69 return 1;
70 } 70 }
71 71
72 ret = ecore_audio_obj_out_input_attach(out, in); 72 ret = ecore_audio_obj_out_input_attach(out, in);
73 if (!ret) { 73 if (!ret) {
74 printf("Could not attach input\n"); 74 printf("Could not attach input\n");
75 eo_del(out); 75 eo_unref(out);
76 eo_del(in); 76 eo_unref(in);
77 return 1; 77 return 1;
78 } 78 }
79 79
diff --git a/src/examples/elementary/performance/graphical.c b/src/examples/elementary/performance/graphical.c
index 239655e0ef..b364022b2d 100644
--- a/src/examples/elementary/performance/graphical.c
+++ b/src/examples/elementary/performance/graphical.c
@@ -289,7 +289,7 @@ _change_scene_setup()
289 { 289 {
290 evas_canvas3d_node_member_del(globalGraphical.root_node, node); 290 evas_canvas3d_node_member_del(globalGraphical.root_node, node);
291 globalGraphical.list_nodes = eina_list_remove(globalGraphical.list_nodes, node); 291 globalGraphical.list_nodes = eina_list_remove(globalGraphical.list_nodes, node);
292 /*eo_del(node);Unless evas_canvas3d_destructors work properly*/ 292 /*eo_unref(node);Unless evas_canvas3d_destructors work properly*/
293 } 293 }
294 eina_list_free(globalGraphical.list_nodes); 294 eina_list_free(globalGraphical.list_nodes);
295 eina_list_free(l); 295 eina_list_free(l);
@@ -298,7 +298,7 @@ _change_scene_setup()
298 EINA_LIST_FOREACH (globalGraphical.list_meshes, l, m) 298 EINA_LIST_FOREACH (globalGraphical.list_meshes, l, m)
299 { 299 {
300 globalGraphical.list_meshes = eina_list_remove(globalGraphical.list_meshes, m); 300 globalGraphical.list_meshes = eina_list_remove(globalGraphical.list_meshes, m);
301 /*eo_del(m); Unless evas_canvas3d_destructors work properly*/ 301 /*eo_unref(m); Unless evas_canvas3d_destructors work properly*/
302 } 302 }
303 eina_list_free(globalGraphical.list_meshes); 303 eina_list_free(globalGraphical.list_meshes);
304 eina_list_free(l); 304 eina_list_free(l);