eo: efl_isa with a EFL_OVERRIDE_CLASS should return true
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Mon, 11 Feb 2019 18:21:02 +0000 (19:21 +0100)
committerWonki Kim <wonki_.kim@samsung.com>
Fri, 8 Mar 2019 11:49:33 +0000 (20:49 +0900)
this is important, as basically every single class etc. can be a
EFL_OVERRIDE_CLASS. This makes efl_override work with eo_debug.

Differential Revision: https://phab.enlightenment.org/D7910

src/lib/eo/eo.c

index 5e4e456..4b8e01e 100644 (file)
@@ -1766,6 +1766,10 @@ efl_isa(const Eo *eo_id, const Efl_Class *klass_id)
 
    if (EINA_UNLIKELY(!eo_id)) return EINA_FALSE;
 
+   // Everything can add a override to an existing class, which pretty much means, everything is a efl override
+   // This is required in order to support our debug-profile for the users of efl_override
+   if (EINA_UNLIKELY(klass_id == EFL_OBJECT_OVERRIDE_CLASS)) return EINA_TRUE;
+
    // Case where we are looking if eo_id is a class that contain klass_id
    if (EINA_UNLIKELY(_eo_is_a_class(eo_id)))
      {