forked from enlightenment/efl
Eo: error when calling constructor/destructor out of context.
SVN revision: 71900
This commit is contained in:
parent
9c929ba2ed
commit
402bad0186
|
@ -1361,6 +1361,12 @@ _eo_error_unset(Eo *obj)
|
||||||
void
|
void
|
||||||
_eo_condtor_done(Eo *obj)
|
_eo_condtor_done(Eo *obj)
|
||||||
{
|
{
|
||||||
|
if (obj->condtor_done)
|
||||||
|
{
|
||||||
|
ERR("Object %p is already constructed at this point.", obj);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
obj->condtor_done = EINA_TRUE;
|
obj->condtor_done = EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,12 @@ START_TEST(eo_simple)
|
||||||
Eo *obj = eo_add(EO_BASE_CLASS, NULL);
|
Eo *obj = eo_add(EO_BASE_CLASS, NULL);
|
||||||
fail_if(obj);
|
fail_if(obj);
|
||||||
|
|
||||||
|
obj = eo_add(SIMPLE_CLASS, NULL);
|
||||||
|
fail_if(!obj);
|
||||||
|
eo_do(obj, eo_constructor());
|
||||||
|
eo_do(obj, eo_destructor());
|
||||||
|
eo_unref(obj);
|
||||||
|
|
||||||
eo_shutdown();
|
eo_shutdown();
|
||||||
}
|
}
|
||||||
END_TEST
|
END_TEST
|
||||||
|
|
Loading…
Reference in New Issue