eo2: add eo2_call_stack_depth

This commit is contained in:
Jérémy Zurcher 2013-07-27 22:46:50 +02:00 committed by Tom Hacohen
parent eeff3e898c
commit adc1ac0c23
2 changed files with 9 additions and 0 deletions

View File

@ -680,6 +680,8 @@ EAPI Eina_Bool eo2_do_start(Eo *obj_id, Eina_Bool do_super);
// end of the eo2_do barrier, unref the obj, move the stack pointer
EAPI void eo2_do_end();
EAPI int eo2_call_stack_depth();
// eo object method calls batch,
// DO NOT use return statement in it, use break if necessary
#define eo2_do(objid, ...) \

View File

@ -300,6 +300,13 @@ static Eo2_Call_Stack eo2_call_stack = {
},
NULL };
EAPI int
eo2_call_stack_depth()
{
return ((eo2_call_stack.frame_ptr == NULL) ? 0 :
1 + (eo2_call_stack.frame_ptr - eo2_call_stack.stack));
}
EAPI Eina_Bool
eo2_do_start(Eo *obj_id, Eina_Bool do_super)
{