summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/evas_object_table.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_object_table.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_object_table.c')
-rw-r--r--src/lib/evas/canvas/evas_object_table.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/evas/canvas/evas_object_table.c b/src/lib/evas/canvas/evas_object_table.c
index ea50553..cc61e19 100644
--- a/src/lib/evas/canvas/evas_object_table.c
+++ b/src/lib/evas/canvas/evas_object_table.c
@@ -966,11 +966,13 @@ evas_object_table_add(Evas *evas)
966 return obj; 966 return obj;
967} 967}
968 968
969EOLIAN static void 969EOLIAN static Eo *
970_evas_table_eo_base_constructor(Eo *obj, Evas_Table_Data *class_data EINA_UNUSED) 970_evas_table_eo_base_constructor(Eo *obj, Evas_Table_Data *class_data EINA_UNUSED)
971{ 971{
972 eo_do_super(obj, MY_CLASS, eo_constructor()); 972 obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
973 eo_do(obj, evas_obj_type_set(MY_CLASS_NAME_LEGACY)); 973 eo_do(obj, evas_obj_type_set(MY_CLASS_NAME_LEGACY));
974
975 return obj;
974} 976}
975 977
976EOLIAN static Evas_Object* 978EOLIAN static Evas_Object*