eo2: set eo2_constructor and eo2_destructor chaining
This commit is contained in:
parent
7621758c80
commit
2edd305507
|
@ -812,6 +812,11 @@ EAPI void eo_error_set_internal(const Eo *obj, const char *file, int line);
|
|||
const Eo_Class *_tmp_klass = klass; \
|
||||
eo_add_internal(__FILE__, __LINE__, _tmp_klass, parent, eo_constructor(), ## __VA_ARGS__, EO_NOOP); \
|
||||
})
|
||||
#define eo2_add(klass, parent, ...) \
|
||||
({ \
|
||||
const Eo_Class *_tmp_klass = klass; \
|
||||
eo_add_internal(__FILE__, __LINE__, _tmp_klass, parent, ## __VA_ARGS__, EO_NOOP); \
|
||||
})
|
||||
|
||||
/**
|
||||
* @def eo_add_custom
|
||||
|
|
|
@ -1362,6 +1362,9 @@ eo_add_internal(const char *file, int line, const Eo_Class *klass_id, Eo *parent
|
|||
|
||||
_eo_parent_internal_set(obj, parent_id);
|
||||
|
||||
if (klass->desc->version == EO2_VERSION)
|
||||
eo2_do((Eo *)obj_id, eo2_constructor());
|
||||
|
||||
/* Run the relevant do stuff. */
|
||||
{
|
||||
va_list p_list;
|
||||
|
|
|
@ -216,9 +216,22 @@ _eo_del_internal(const char *file, int line, _Eo_Object *obj)
|
|||
|
||||
const _Eo_Class *klass = obj->klass;
|
||||
|
||||
if (klass->desc->version == EO2_VERSION)
|
||||
eo2_do((Eo *)obj->obj_id, eo2_event_callback_call(EO_EV_DEL, NULL););
|
||||
else
|
||||
eo_do((Eo *) obj->obj_id, eo_event_callback_call(EO_EV_DEL, NULL, NULL));
|
||||
|
||||
_eo_condtor_reset(obj);
|
||||
|
||||
do_err = eo_do(_eo_id_get(obj), eo_destructor());
|
||||
if (klass->desc->version == EO2_VERSION)
|
||||
{
|
||||
// FIXME: eo2
|
||||
do_err = EINA_TRUE;
|
||||
eo2_do((Eo *)obj->obj_id, eo2_destructor(););
|
||||
}
|
||||
else
|
||||
do_err = eo_do((Eo *)obj->obj_id, eo_destructor());
|
||||
|
||||
if (EINA_UNLIKELY(!do_err))
|
||||
{
|
||||
ERR("in %s:%d: Object of class '%s' - One of the object destructors have failed.",
|
||||
|
|
Loading…
Reference in New Issue