eolian: validate inner types of complex types

This makes sure the inner types are all correctly defined and
that freefuncs are actually correctly filled.
This commit is contained in:
Daniel Kolesa 2017-09-28 23:22:05 +02:00
parent 96d3af10bf
commit 7c7e5ec423
6 changed files with 18 additions and 2 deletions

View 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 {

View File

@ -1,3 +1,5 @@
import efl_types;
class Efl.Observable (Efl.Object) {
[[Efl observable class]]
methods {

View File

@ -1,3 +1,5 @@
import elm_general;
mixin Efl.Access.Action ()
{
[[Accessible action mixin]]

View 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;

View 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)
{

View 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;