Eolian: Fix class look up.
authorDaniel Zaoui <daniel.zaoui@samsung.com>
Mon, 2 Jun 2014 13:58:35 +0000 (16:58 +0300)
committerDaniel Zaoui <daniel.zaoui@samsung.com>
Mon, 2 Jun 2014 14:13:34 +0000 (17:13 +0300)
If a class (e.g Evas_Object) is expected as a base class but is not
present in the existing expected file (e.g evas_object.eo), it will not
fail.
This patch fixes it by checking the existence of the class into the
database after the parsing of the file.

@fix

src/lib/eolian/eolian_database.c

index 1ef535d..5ef7804 100644 (file)
@@ -1414,10 +1414,15 @@ EAPI Eina_Bool eolian_eo_file_parse(const char *filepath)
              filepath = eina_hash_find(_filenames, filename);
              if (!filepath)
                {
-                  ERR("Unable to find class %s", inherit_name);
+                  ERR("Unable to find a file for class %s", inherit_name);
                   return EINA_FALSE;
                }
              if (!eolian_eo_file_parse(filepath)) return EINA_FALSE;
+             if (!eolian_class_find_by_name(inherit_name))
+               {
+                  ERR("Unable to find class %s", inherit_name);
+                  return EINA_FALSE;
+               }
              free(filename);
           }
      }