summaryrefslogtreecommitdiff
path: root/src/lib/emotion/emotion_smart.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/emotion/emotion_smart.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/emotion/emotion_smart.c')
-rw-r--r--src/lib/emotion/emotion_smart.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c
index 8cf5899..fbbbb49 100644
--- a/src/lib/emotion/emotion_smart.c
+++ b/src/lib/emotion/emotion_smart.c
@@ -263,11 +263,13 @@ emotion_object_add(Evas *evas)
263 return e; 263 return e;
264} 264}
265 265
266EOLIAN static void 266EOLIAN static Eo *
267_emotion_object_eo_base_constructor(Eo *obj, Emotion_Object_Data *pd EINA_UNUSED) 267_emotion_object_eo_base_constructor(Eo *obj, Emotion_Object_Data *pd EINA_UNUSED)
268{ 268{
269 eo_do_super(obj, MY_CLASS, eo_constructor()); 269 obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
270 eo_do(obj, evas_obj_type_set(E_OBJ_NAME)); 270 eo_do(obj, evas_obj_type_set(E_OBJ_NAME));
271
272 return obj;
271} 273}
272 274
273EAPI Evas_Object * 275EAPI Evas_Object *