Zebediah Figura : widl: Get rid of fix_incomplete().

Alexandre Julliard julliard at winehq.org
Wed Aug 14 20:17:22 CDT 2019


Module: wine
Branch: master
Commit: c4f5fb383bb7f28052cbbcc3c47ecbcd3aef1998
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=c4f5fb383bb7f28052cbbcc3c47ecbcd3aef1998

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Tue Aug 13 21:08:04 2019 -0500

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
0f7f7922bab, but we intend rather to change the representation of aliases so
that no "fixing" is needed.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 ff86765..ff6ed1f 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;




More information about the wine-cvs mailing list