This seems to have been broken since 0f7f7922bab; is_incomplete() will only return true for non-aliases. It could be fixed by reverting that hunk of 0f7f7922bab, but we intend rather to change the representation of aliases so that no "fixing" is needed.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- tools/widl/parser.y | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y index ff867655fa..ff6ed1f685 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -54,7 +54,6 @@ struct _import_t
typelist_t incomplete_types = LIST_INIT(incomplete_types);
-static void fix_incomplete(void); static void fix_incomplete_types(type_t *complete_type);
static str_list_t *append_str(str_list_t *list, char *str); @@ -315,8 +314,7 @@ static typelib_t *current_typelib;
%%
-input: gbl_statements m_acf { fix_incomplete(); - check_statements($1, FALSE); +input: gbl_statements m_acf { check_statements($1, FALSE); check_all_user_types($1); write_header($1); write_id_data($1); @@ -1914,30 +1912,6 @@ void add_incomplete(type_t *t) list_add_tail(&incomplete_types, &tn->entry); }
-static void fix_type(type_t *t) -{ - if (type_is_alias(t) && is_incomplete(t)) { - type_t *ot = type_alias_get_aliasee(t); - fix_type(ot); - if (type_get_type_detect_alias(ot) == TYPE_STRUCT || - type_get_type_detect_alias(ot) == TYPE_UNION || - type_get_type_detect_alias(ot) == TYPE_ENCAPSULATED_UNION) - t->details.structure = ot->details.structure; - t->defined = ot->defined; - } -} - -static void fix_incomplete(void) -{ - struct typenode *tn, *next; - - LIST_FOR_EACH_ENTRY_SAFE(tn, next, &incomplete_types, struct typenode, entry) { - fix_type(tn->type); - list_remove(&tn->entry); - free(tn); - } -} - static void fix_incomplete_types(type_t *complete_type) { struct typenode *tn, *next;