widl: Get rid of fix_incomplete().

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
0f7f7922ba, 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>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-08-13 21:08:04 -05:00 committed by Alexandre Julliard
parent 083032b5ef
commit c4f5fb383b
1 changed files with 1 additions and 27 deletions

View File

@ -54,7 +54,6 @@ struct _import_t
typelist_t incomplete_types = LIST_INIT(incomplete_types); typelist_t incomplete_types = LIST_INIT(incomplete_types);
static void fix_incomplete(void);
static void fix_incomplete_types(type_t *complete_type); static void fix_incomplete_types(type_t *complete_type);
static str_list_t *append_str(str_list_t *list, char *str); 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(); input: gbl_statements m_acf { check_statements($1, FALSE);
check_statements($1, FALSE);
check_all_user_types($1); check_all_user_types($1);
write_header($1); write_header($1);
write_id_data($1); write_id_data($1);
@ -1914,30 +1912,6 @@ void add_incomplete(type_t *t)
list_add_tail(&incomplete_types, &tn->entry); 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) static void fix_incomplete_types(type_t *complete_type)
{ {
struct typenode *tn, *next; struct typenode *tn, *next;