diff options
author | Benny Baumann <BenBE@geshi.org> | 2020-11-01 01:09:51 +0100 |
---|---|---|
committer | Benny Baumann <BenBE@geshi.org> | 2020-11-02 22:15:01 +0100 |
commit | 45869513bfebba80cc2ab42e4218f68b34b1e6ac (patch) | |
tree | f064631dbff141bf1c945db8cff40b7bb82fd169 /Object.c | |
parent | 61e14d4bb25268593019e6df3eb02264b4ac8e0e (diff) |
Embracing branches
Diffstat (limited to 'Object.c')
-rw-r--r-- | Object.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -20,12 +20,16 @@ const ObjectClass Object_class = { bool Object_isA(const Object* o, const ObjectClass* klass) { if (!o) return false; + const ObjectClass* type = o->klass; while (type) { - if (type == klass) + if (type == klass) { return true; + } + type = type->extends; } + return false; } |