summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_vg_container.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2015-05-19 11:41:27 +0100
committerTom Hacohen <tom@stosb.com>2015-05-20 13:03:24 +0100
commit6efbfe227aaaa24eda7bcb7df916d4daf0a74400 (patch)
treec96e166b7348c5e825aca2d4af084675172e0cec /src/lib/evas/canvas/evas_vg_container.c
parente7ed0bfcedcea87f8645107a8a0775f67227d7c1 (diff)
Eo: Add a return value to eo_constructor().
From now on, constructors should return a value, usually the object being worked on, or NULL (if the constructor failed). This can also be used for implementing singletons, by just always returning the same object from the constructor. This is one of the final steps towards stabilizing Eo. @feature
Diffstat (limited to 'src/lib/evas/canvas/evas_vg_container.c')
-rw-r--r--src/lib/evas/canvas/evas_vg_container.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/evas_vg_container.c b/src/lib/evas/canvas/evas_vg_container.c
index ba0eeec..f3ee7c9 100644
--- a/src/lib/evas/canvas/evas_vg_container.c
+++ b/src/lib/evas/canvas/evas_vg_container.c
@@ -25,17 +25,19 @@ _efl_vg_container_render_pre(Eo *obj EINA_UNUSED,
25 _evas_vg_render_pre(child, s, current); 25 _evas_vg_render_pre(child, s, current);
26} 26}
27 27
28static void 28static Eo *
29_efl_vg_container_eo_base_constructor(Eo *obj, 29_efl_vg_container_eo_base_constructor(Eo *obj,
30 Efl_VG_Container_Data *pd) 30 Efl_VG_Container_Data *pd)
31{ 31{
32 Efl_VG_Base_Data *nd; 32 Efl_VG_Base_Data *nd;
33 33
34 eo_do_super(obj, MY_CLASS, eo_constructor()); 34 obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
35 35
36 nd = eo_data_scope_get(obj, EFL_VG_BASE_CLASS); 36 nd = eo_data_scope_get(obj, EFL_VG_BASE_CLASS);
37 nd->render_pre = _efl_vg_container_render_pre; 37 nd->render_pre = _efl_vg_container_render_pre;
38 nd->data = pd; 38 nd->data = pd;
39
40 return obj;
39} 41}
40 42
41static void 43static void