summaryrefslogtreecommitdiff
path: root/src/lib/ecore/ecore_idle_enterer.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2015-05-20 14:56:45 +0100
committerTom Hacohen <tom@stosb.com>2015-05-20 16:25:38 +0100
commit92fb2917cba7b91a83fbfd39b876d585921d6d3e (patch)
tree4a9aa3641cd5a3ddf706f51a262adfc405d96d9d /src/lib/ecore/ecore_idle_enterer.c
parent7c769163d9eb122412675dca621e83ed7648e60e (diff)
Eo: Remove eo_error_set() and clean up finalizer()
This is another cleanup in perparation for the Eo stable release. This is no longer needed thanks to the proper error reporting with eo_constructor()'s new return value. The finalizer change cleans it up a bit so it catches more cases/issues. This also means that the finalizer cleans up the object in all cases, and not only some. @feature.
Diffstat (limited to 'src/lib/ecore/ecore_idle_enterer.c')
-rw-r--r--src/lib/ecore/ecore_idle_enterer.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/ecore/ecore_idle_enterer.c b/src/lib/ecore/ecore_idle_enterer.c
index 45fd601..c4091ee 100644
--- a/src/lib/ecore/ecore_idle_enterer.c
+++ b/src/lib/ecore/ecore_idle_enterer.c
@@ -39,7 +39,6 @@ _ecore_idle_enterer_add(Ecore_Idle_Enterer *obj,
39{ 39{
40 if (EINA_UNLIKELY(!eina_main_loop_is())) 40 if (EINA_UNLIKELY(!eina_main_loop_is()))
41 { 41 {
42 eo_error_set(obj);
43 EINA_MAIN_LOOP_CHECK_RETURN_VAL(EINA_FALSE); 42 EINA_MAIN_LOOP_CHECK_RETURN_VAL(EINA_FALSE);
44 } 43 }
45 44
@@ -48,7 +47,6 @@ _ecore_idle_enterer_add(Ecore_Idle_Enterer *obj,
48 47
49 if (!func) 48 if (!func)
50 { 49 {
51 eo_error_set(obj);
52 ERR("callback function must be set up for an object of class: '%s'", MY_CLASS_NAME); 50 ERR("callback function must be set up for an object of class: '%s'", MY_CLASS_NAME);
53 return EINA_FALSE; 51 return EINA_FALSE;
54 } 52 }
@@ -135,6 +133,17 @@ _ecore_idle_enterer_eo_base_destructor(Eo *obj, Ecore_Idle_Enterer_Data *idle_en
135 eo_do_super(obj, MY_CLASS, eo_destructor()); 133 eo_do_super(obj, MY_CLASS, eo_destructor());
136} 134}
137 135
136EOLIAN static Eo *
137_ecore_idle_enterer_eo_base_finalize(Eo *obj, Ecore_Idle_Enterer_Data *idle_enterer)
138{
139 if (!idle_enterer->func)
140 {
141 return NULL;
142 }
143
144 return eo_do_super_ret(obj, MY_CLASS, obj, eo_finalize());
145}
146
138void 147void
139_ecore_idle_enterer_shutdown(void) 148_ecore_idle_enterer_shutdown(void)
140{ 149{