summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2014-09-23 14:36:18 +0100
committerTom Hacohen <tom@stosb.com>2014-09-23 14:36:20 +0100
commitb33372b1f6191c4d671cff0e0a96cda5dd000f50 (patch)
treeea5424967bc38af68dea89d603b244d536523a24
parent0f24804c1acbfa9e1b55e667d6b501b1831da17d (diff)
Eo do: simplify eo_do macro.
This moves the mainloop check inside the function. There was never need for it to be in client code (i.e a header/macro). This is better suited inside eo_do_start because this is a macro some bindings have to re-implement, and we definitely don't want it to be any more complicated than it has to be. This breaks ABI and makes elm 1.12 depend on efl 1.11. This is not an issue as because of eolian and interfaces it's already the case.
-rw-r--r--src/lib/eo/Eo.h5
-rw-r--r--src/lib/eo/eo.c3
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 14e85f1..bf64f2a 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -573,7 +573,7 @@ EAPI Eo_Op _eo_api_op_id_get(const void *api_func, Eina_Bool is_main_loop, const
573EAPI Eina_Bool _eo_call_resolve(const char *func_name, const Eo_Op op, Eo_Op_Call_Data *call, Eina_Bool is_main_loop, const char *file, int line); 573EAPI Eina_Bool _eo_call_resolve(const char *func_name, const Eo_Op op, Eo_Op_Call_Data *call, Eina_Bool is_main_loop, const char *file, int line);
574 574
575// start of eo_do barrier, gets the object pointer and ref it, put it on the stask 575// start of eo_do barrier, gets the object pointer and ref it, put it on the stask
576 EAPI Eina_Bool _eo_do_start(const Eo *obj, const Eo_Class *cur_klass, Eina_Bool is_super, Eina_Bool is_main_loop, const char *file, const char *func, int line); 576 EAPI Eina_Bool _eo_do_start(const Eo *obj, const Eo_Class *cur_klass, Eina_Bool is_super, const char *file, const char *func, int line);
577 577
578// end of the eo_do barrier, unref the obj, move the stack pointer 578// end of the eo_do barrier, unref the obj, move the stack pointer
579EAPI void _eo_do_end(const Eo **ojb); 579EAPI void _eo_do_end(const Eo **ojb);
@@ -584,9 +584,8 @@ EAPI void _eo_do_end(const Eo **ojb);
584 584
585#define _eo_do_common(eoid, clsid, is_super, ...) \ 585#define _eo_do_common(eoid, clsid, is_super, ...) \
586 ({ \ 586 ({ \
587 Eina_Bool is_main_loop = eina_main_loop_is(); \
588 const Eo *_eoid_ EO_DO_CLEANUP = eoid; \ 587 const Eo *_eoid_ EO_DO_CLEANUP = eoid; \
589 _eo_do_start(_eoid_, clsid, is_super, is_main_loop, __FILE__, __FUNCTION__, __LINE__); \ 588 _eo_do_start(_eoid_, clsid, is_super, __FILE__, __FUNCTION__, __LINE__); \
590 __VA_ARGS__; \ 589 __VA_ARGS__; \
591 }) 590 })
592 591
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index e04e2a2..b6c6efa 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -504,8 +504,9 @@ _eo_do_internal(const Eo *eo_id, const Eo_Class *cur_klass_id,
504} 504}
505 505
506EAPI Eina_Bool 506EAPI Eina_Bool
507_eo_do_start(const Eo *eo_id, const Eo_Class *cur_klass_id, Eina_Bool is_super, Eina_Bool is_main_loop, const char *file EINA_UNUSED, const char *func EINA_UNUSED, int line EINA_UNUSED) 507_eo_do_start(const Eo *eo_id, const Eo_Class *cur_klass_id, Eina_Bool is_super, const char *file EINA_UNUSED, const char *func EINA_UNUSED, int line EINA_UNUSED)
508{ 508{
509 Eina_Bool is_main_loop = eina_main_loop_is();
509 Eina_Bool ret = EINA_TRUE; 510 Eina_Bool ret = EINA_TRUE;
510 Eo_Stack_Frame *fptr, *pfptr; 511 Eo_Stack_Frame *fptr, *pfptr;
511 Eo_Call_Stack *stack = _eo_call_stack_get(is_main_loop); 512 Eo_Call_Stack *stack = _eo_call_stack_get(is_main_loop);