From c4b40aae0d934245bf6a8749fa0e961b228a3ba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 27 Sep 2013 00:13:31 +0200 Subject: [PATCH] eo: eo_class_get() supports objects and classes --- src/lib/eo/eo.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c index f6b9d3507e..371da282f6 100644 --- a/src/lib/eo/eo.c +++ b/src/lib/eo/eo.c @@ -512,6 +512,12 @@ eo_class_do_super_internal(const char *file, int line, const Eo *klass_id, EAPI const Eo * eo_class_get(const Eo *obj_id) { + if (_eo_is_a_class(obj_id)) + { + EO_CLASS_POINTER_RETURN_VAL(obj_id, _klass, NULL); + return obj_id; + } + EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, NULL); if (obj->klass)