forked from enlightenment/efl
Eobj: Fixed inheritance checks and fixed mixin examples accordingly.
SVN revision: 70263
This commit is contained in:
parent
ceca1938c4
commit
544a663dd2
|
@ -68,5 +68,5 @@ mixin_class_get(void)
|
|||
NULL
|
||||
};
|
||||
|
||||
return _my_class = eobj_class_new(&class_desc, EOBJ_CLASS_BASE, NULL);
|
||||
return _my_class = eobj_class_new(&class_desc, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ mixin_class_get(void)
|
|||
NULL
|
||||
};
|
||||
|
||||
_my_class = eobj_class_new(&class_desc, EOBJ_CLASS_BASE, NULL);
|
||||
_my_class = eobj_class_new(&class_desc, NULL, NULL);
|
||||
|
||||
return _my_class;
|
||||
}
|
||||
|
|
|
@ -683,17 +683,15 @@ eobj_class_new(const Eobj_Class_Description *desc, const Eobj_Class *parent, ...
|
|||
if ((klass->parent->desc->type != EOBJ_CLASS_TYPE_REGULAR) &&
|
||||
(klass->parent->desc->type != EOBJ_CLASS_TYPE_REGULAR_NO_INSTANT))
|
||||
{
|
||||
/* FIXME: Actually handle it. */
|
||||
ERR("Regular classes ('%s') aren't allowed to inherit from non-regular classes ('%s').", klass->desc->name, klass->parent->desc->name);
|
||||
goto cleanup;
|
||||
}
|
||||
break;
|
||||
case EOBJ_CLASS_TYPE_INTERFACE:
|
||||
case EOBJ_CLASS_TYPE_MIXIN:
|
||||
if ((klass->parent->desc->type != EOBJ_CLASS_TYPE_REGULAR) &&
|
||||
(klass->parent->desc->type != EOBJ_CLASS_TYPE_REGULAR_NO_INSTANT))
|
||||
if ((klass->parent->desc->type != EOBJ_CLASS_TYPE_INTERFACE) &&
|
||||
(klass->parent->desc->type != EOBJ_CLASS_TYPE_MIXIN))
|
||||
{
|
||||
/* FIXME: Actually handle it. */
|
||||
ERR("Non-regular classes ('%s') aren't allowed to inherit from regular classes ('%s').", klass->desc->name, klass->parent->desc->name);
|
||||
goto cleanup;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue