From 7c7e5ec4239eeeb4412baca2cba2fb31823738ec Mon Sep 17 00:00:00 2001 From: Daniel Kolesa Date: Thu, 28 Sep 2017 23:22:05 +0200 Subject: [PATCH] eolian: validate inner types of complex types 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 | 2 +- src/lib/efl/interfaces/efl_observable.eo | 2 ++ src/lib/elementary/efl_access_action.eo | 2 ++ src/lib/elementary/elm_general.eot | 4 ++++ src/lib/elementary/elm_interface_atspi_widget_action.eo | 2 +- src/lib/eolian/database_validate.c | 8 ++++++++ 6 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/lib/ecore/efl_model_composite_selection.eo b/src/lib/ecore/efl_model_composite_selection.eo index bccf0070ad..cc66ed482c 100644 --- a/src/lib/ecore/efl_model_composite_selection.eo +++ b/src/lib/ecore/efl_model_composite_selection.eo @@ -6,7 +6,7 @@ class Efl.Model.Composite.Selection (Efl.Model.Composite.Boolean) params { idx: int; } - return: future; + return: future; } @property exclusive_selection { values { diff --git a/src/lib/efl/interfaces/efl_observable.eo b/src/lib/efl/interfaces/efl_observable.eo index 002a495c5d..517113bf27 100644 --- a/src/lib/efl/interfaces/efl_observable.eo +++ b/src/lib/efl/interfaces/efl_observable.eo @@ -1,3 +1,5 @@ +import efl_types; + class Efl.Observable (Efl.Object) { [[Efl observable class]] methods { diff --git a/src/lib/elementary/efl_access_action.eo b/src/lib/elementary/efl_access_action.eo index 931ecf2fd6..cbdbc71fc7 100644 --- a/src/lib/elementary/efl_access_action.eo +++ b/src/lib/elementary/efl_access_action.eo @@ -1,3 +1,5 @@ +import elm_general; + mixin Efl.Access.Action () { [[Accessible action mixin]] diff --git a/src/lib/elementary/elm_general.eot b/src/lib/elementary/elm_general.eot index 3ce39e50f3..b4b05552b2 100644 --- a/src/lib/elementary/elm_general.eot +++ b/src/lib/elementary/elm_general.eot @@ -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; diff --git a/src/lib/elementary/elm_interface_atspi_widget_action.eo b/src/lib/elementary/elm_interface_atspi_widget_action.eo index 061d7e78e8..869ccc547d 100644 --- a/src/lib/elementary/elm_interface_atspi_widget_action.eo +++ b/src/lib/elementary/elm_interface_atspi_widget_action.eo @@ -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) { diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c index dd4ea21c9b..3df9eb65b2 100644 --- a/src/lib/eolian/database_validate.c +++ b/src/lib/eolian/database_validate.c @@ -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;