diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2014-02-19 10:21:30 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2014-02-19 10:21:30 +0100 |
commit | 52b7b4413ca02bd71ff726c2ef8c867bb071cb28 (patch) | |
tree | 167c0dd51eb99f8da5b1deccf59087ea2e8df0d1 | |
parent | 6aad364ed6790e6adbb6235813271b4db176a913 (diff) | |
download | efl-devs/jeyzu/eo-composites.tar.gz |
eo: eo_add_internal() ensures that all needed composites have been attacheddevs/jeyzu/eo-composites
-rw-r--r-- | src/lib/eo/eo.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index de79d77af2..b96800ec1b 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -1132,6 +1132,20 @@ eo_add_internal(const char *file, int line, const Eo_Class *klass_id, Eo *parent goto fail; } + if (obj->composites) + { + const _Eo_Object **comp_itr = obj->composites; + for (unsigned int i = 0; i < klass->composites_count; i++, comp_itr++) + { + if (!*comp_itr) + { + ERR("in %s:%d: Object of class '%s' - One or more composites objects have not been attached.", + file, line, klass->desc->name); + goto fail; + } + } + } + _eo_unref(obj); return _eo_id_get(obj); |