diff options
Diffstat (limited to 'src/lib/eo/eo.c')
-rw-r--r-- | src/lib/eo/eo.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index 57adcb1a84..d4a67729f8 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -868,10 +868,14 @@ _efl_add_internal_start(const char *file, int line, const Efl_Class *klass_id, E EO_CLASS_POINTER_GOTO_PROXY(klass_id, klass, err_klass); - if (parent_id) + if (EINA_LIKELY(parent_id != NULL)) { EO_OBJ_POINTER_GOTO_PROXY(parent_id, parent, err_parent); } + else + { + ERR("Object of class %s created without a parent!", klass->desc->name); + } // not likely so use goto to alleviate l1 instruction cache of rare code if (EINA_UNLIKELY(klass->desc->type != EFL_CLASS_TYPE_REGULAR)) @@ -1918,6 +1922,16 @@ err: EO_OBJ_DONE(obj_id); } +EAPI void +___efl_auto_unref_set(Eo *obj_id, Eina_Bool enable) +{ + // Write-only property + EO_OBJ_POINTER(obj_id, obj); + obj->auto_unref = enable ? 1 : 0; + if (enable) + obj->was_auto_unref = EINA_TRUE; +} + EAPI int ___efl_ref2_count(const Eo *obj_id) { |