summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_vg_gradient_linear.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_gradient_linear.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_gradient_linear.c')
-rw-r--r--src/lib/evas/canvas/evas_vg_gradient_linear.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/evas_vg_gradient_linear.c b/src/lib/evas/canvas/evas_vg_gradient_linear.c
index 9f05fac4ad..9a54f7ac39 100644
--- a/src/lib/evas/canvas/evas_vg_gradient_linear.c
+++ b/src/lib/evas/canvas/evas_vg_gradient_linear.c
@@ -88,17 +88,19 @@ _efl_vg_gradient_linear_render_pre(Eo *obj,
88 ector_renderer_prepare()); 88 ector_renderer_prepare());
89} 89}
90 90
91static void 91static Eo *
92_efl_vg_gradient_linear_eo_base_constructor(Eo *obj, 92_efl_vg_gradient_linear_eo_base_constructor(Eo *obj,
93 Efl_VG_Gradient_Linear_Data *pd) 93 Efl_VG_Gradient_Linear_Data *pd)
94{ 94{
95 Efl_VG_Base_Data *nd; 95 Efl_VG_Base_Data *nd;
96 96
97 eo_do_super(obj, MY_CLASS, eo_constructor()); 97 obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
98 98
99 nd = eo_data_scope_get(obj, EFL_VG_BASE_CLASS); 99 nd = eo_data_scope_get(obj, EFL_VG_BASE_CLASS);
100 nd->render_pre = _efl_vg_gradient_linear_render_pre; 100 nd->render_pre = _efl_vg_gradient_linear_render_pre;
101 nd->data = pd; 101 nd->data = pd;
102
103 return obj;
102} 104}
103 105
104static void 106static void