eolian: validate inner types of complex types
authorDaniel Kolesa <d.kolesa@osg.samsung.com>
Thu, 28 Sep 2017 21:22:05 +0000 (23:22 +0200)
committerDaniel Kolesa <d.kolesa@osg.samsung.com>
Thu, 28 Sep 2017 21:22:05 +0000 (23:22 +0200)
This makes sure the inner types are all correctly defined and
that freefuncs are actually correctly filled.

src/lib/ecore/efl_model_composite_selection.eo
src/lib/efl/interfaces/efl_observable.eo
src/lib/elementary/efl_access_action.eo
src/lib/elementary/elm_general.eot
src/lib/elementary/elm_interface_atspi_widget_action.eo
src/lib/eolian/database_validate.c

index bccf007..cc66ed4 100644 (file)
@@ -6,7 +6,7 @@ class Efl.Model.Composite.Selection (Efl.Model.Composite.Boolean)
          params {
            idx: int;
          }
-         return: future<eina.value>;
+         return: future<any_value>;
       }
       @property exclusive_selection {
          values {
index 002a495..517113b 100644 (file)
@@ -1,3 +1,5 @@
+import efl_types;
+
 class Efl.Observable (Efl.Object) {
    [[Efl observable class]]
    methods {
index 931ecf2..cbdbc71 100644 (file)
@@ -1,3 +1,5 @@
+import elm_general;
+
 mixin Efl.Access.Action ()
 {
    [[Accessible action mixin]]
index 3ce39e5..b4b0555 100644 (file)
@@ -229,3 +229,7 @@ enum Elm.Activate
    left, [[Activate left]]
    back, [[Activate back]]
 }
+
+/* FIXME: shouldn't exist */
+struct @extern Elm_Gen_Item;
+struct @extern Elm_Atspi_Action;
index 061d7e7..869ccc5 100644 (file)
@@ -1,4 +1,4 @@
-type Elm_Atspi_Action: __undefined_type; [[Elementary AT-SPI action type]]
+import elm_general;
 
 mixin Elm.Interface.Atspi_Widget_Action (Efl.Access.Action)
 {
index dd4ea21..3df9eb6 100644 (file)
@@ -170,6 +170,14 @@ _validate_type(Eolian_Type *tp)
                      tp->freefunc = eina_stringshare_add(eo_complex_frees[
                        eo_lexer_keyword_str_to_id(tp->full_name) - KW_accessor]);
                   }
+                Eolian_Type *itp = tp->base_type;
+                /* validate types in brackets so freefuncs get written... */
+                while (itp)
+                  {
+                     if (!_validate_type(itp))
+                       return EINA_FALSE;
+                     itp = itp->next_type;
+                  }
                 return EINA_TRUE;
              }
            Eolian_Typedecl *tpp;