summaryrefslogtreecommitdiff
path: root/src/examples/eolian_cxx/colourable.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/examples/eolian_cxx/colourable.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/examples/eolian_cxx/colourable.c')
-rw-r--r--src/examples/eolian_cxx/colourable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/examples/eolian_cxx/colourable.c b/src/examples/eolian_cxx/colourable.c
index 1c7ff5e445..655d63c5c2 100644
--- a/src/examples/eolian_cxx/colourable.c
+++ b/src/examples/eolian_cxx/colourable.c
@@ -26,7 +26,7 @@ struct _Colourable_Data
26 26
27typedef struct _Colourable_Data Colourable_Data; 27typedef struct _Colourable_Data Colourable_Data;
28 28
29void 29Eo *
30_colourable_eo_base_constructor(Eo *obj, Colourable_Data *self EINA_UNUSED) 30_colourable_eo_base_constructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
31{ 31{
32 if(!_colourable_impl_logdomain) 32 if(!_colourable_impl_logdomain)
@@ -35,7 +35,7 @@ _colourable_eo_base_constructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
35 = eina_log_domain_register("colourable", EINA_COLOR_BLUE); 35 = eina_log_domain_register("colourable", EINA_COLOR_BLUE);
36 } 36 }
37 DBG("_colourable_constructor(%p, %p)\n", obj, MY_CLASS); 37 DBG("_colourable_constructor(%p, %p)\n", obj, MY_CLASS);
38 eo_do_super(obj, MY_CLASS, eo_constructor()); 38 return eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
39} 39}
40 40
41void 41void