eolian: property cleanup
authorDaniel Kolesa <d.kolesa@samsung.com>
Wed, 10 Sep 2014 15:46:34 +0000 (16:46 +0100)
committerDaniel Kolesa <d.kolesa@samsung.com>
Wed, 10 Sep 2014 15:46:34 +0000 (16:46 +0100)
src/lib/eolian/database_fill.c
src/lib/eolian/eo_parser.c

index d0081cddccff463b19cb8c2a9295c02d3c2e1f5e..33ef6ec631d43ab47a87b3ee12260c5e8b7d74d9 100644 (file)
@@ -61,29 +61,31 @@ _db_fill_property(Eolian_Class *cl, Eo_Class_Def *kls, Eo_Property_Def *prop)
 
    if (prop->get_accessor)
      {
-        if (kls->type == EOLIAN_CLASS_INTERFACE)
-          foo_id->get_virtual_pure = EINA_TRUE;
         foo_id->base = prop->base;
         prop->base.file = NULL;
      }
 
    if (prop->set_accessor)
      {
-        if (kls->type == EOLIAN_CLASS_INTERFACE)
-          foo_id->set_virtual_pure = EINA_TRUE;
         foo_id->set_base = prop->set_base;
         prop->set_base.file = NULL;
      }
-
-   if (!prop->get_accessor && !prop->set_accessor)
+   else
      {
-        foo_id->type = EOLIAN_PROPERTY;
-        if (kls->type == EOLIAN_CLASS_INTERFACE)
-          foo_id->get_virtual_pure = foo_id->set_virtual_pure = EINA_TRUE;
         foo_id->base = prop->base;
         prop->base.file = NULL;
      }
 
+   if (kls->type == EOLIAN_CLASS_INTERFACE)
+     {
+        if (foo_id->type == EOLIAN_PROP_GET)
+          foo_id->get_virtual_pure = EINA_TRUE;
+        else if (foo_id->type == EOLIAN_PROP_SET)
+          foo_id->set_virtual_pure = EINA_TRUE;
+        if (foo_id->type == EOLIAN_PROPERTY)
+          foo_id->get_virtual_pure = foo_id->set_virtual_pure = EINA_TRUE;
+     }
+
    cl->properties = eina_list_append(cl->properties, foo_id);
 }
 
index 37d1b5cbb8a0a49481d0282e7b523f9c6910c652..baf6d7c8a6175b1312e4a92c73fbb89f415b5b26 100644 (file)
@@ -1392,6 +1392,8 @@ body:
      }
 end:
    check_match(ls, '}', '{', line, col);
+   if (!has_get && !has_set)
+     prop->type = EOLIAN_PROPERTY;
 }
 
 static void