// eo object method calls batch,
#define _eo_do_common(eoid, clsid, is_super, ...) \
- do \
- { \
- const Eo *_eoid_ = eoid; \
- if (_eo_do_start(_eoid_, clsid, is_super, __FILE__, __FUNCTION__, __LINE__)) \
- { \
- const Eo *_id_clean_ EO_DO_CLEANUP = _eoid_; \
- __VA_ARGS__; \
- (void) _id_clean_; \
- } \
- } while (0)
+ ({ \
+ const Eo *_eoid_ EO_DO_CLEANUP = eoid; \
+ _eo_do_start(_eoid_, clsid, is_super, __FILE__, __FUNCTION__, __LINE__); \
+ __VA_ARGS__; \
+ })
#define eo_do(eoid, ...) _eo_do_common(eoid, NULL, EINA_FALSE, __VA_ARGS__)
EAPI Eina_Bool
_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)
{
+ Eina_Bool ret = EINA_TRUE;
Eo_Stack_Frame *fptr, *pfptr;
Eo_Call_Stack *stack = _eo_call_stack_get();
fptr++;
if (!_eo_do_internal(eo_id, cur_klass_id, is_super, fptr, pfptr))
- return EINA_FALSE;
+ {
+ fptr->o.obj = NULL;
+ fptr->cur_klass = NULL;
+
+ ret = EINA_FALSE;
+ }
stack->frame_ptr++;
- return EINA_TRUE;
+ return ret;
}
EAPI void
if (op == EO_NOOP) return EINA_FALSE;
fptr = _eo_call_stack_get()->frame_ptr;
+
+ if (EINA_UNLIKELY(!fptr->o.obj))
+ return EINA_FALSE;
+
is_obj = !_eo_is_a_class(fptr->eo_id);
klass = (is_obj) ? fptr->o.obj->klass : fptr->o.kls;
Eina_Bool class_ref = _eo_is_a_class(stack->frame_ptr->eo_id);
+ if (EINA_UNLIKELY(!stack->frame_ptr->o.obj))
+ return EO_NOOP;
+
if (class_ref)
klass = stack->frame_ptr->o.kls;
else
return NULL;
}
+ if (EINA_UNLIKELY(!fptr->o.obj))
+ return NULL;
+
if (!fptr->o.obj->condtor_done || fptr->o.obj->do_error)
{
const _Eo_Class *klass = (fptr->cur_klass) ?