summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2013-09-27 00:13:31 +0200
committerTom Hacohen <tom@stosb.com>2013-09-27 14:01:46 +0100
commitc4b40aae0d934245bf6a8749fa0e961b228a3ba9 (patch)
tree26ade96e90d508dbd2a836cd325131ea55b07b82 /src
parent8855024e16623ef33c409572fb81e37bf26d097a (diff)
eo: eo_class_get() supports objects and classes
Diffstat (limited to 'src')
-rw-r--r--src/lib/eo/eo.c6
1 files changed, 6 insertions, 0 deletions
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,
512EAPI const Eo * 512EAPI const Eo *
513eo_class_get(const Eo *obj_id) 513eo_class_get(const Eo *obj_id)
514{ 514{
515 if (_eo_is_a_class(obj_id))
516 {
517 EO_CLASS_POINTER_RETURN_VAL(obj_id, _klass, NULL);
518 return obj_id;
519 }
520
515 EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, NULL); 521 EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, NULL);
516 522
517 if (obj->klass) 523 if (obj->klass)