Rob Shearman : widl: Move the ifaces field of the type_t structure to coclass details.

Alexandre Julliard julliard at winehq.org
Tue Jan 6 08:23:16 CST 2009


Module: wine
Branch: master
Commit: 8a42bc1f7b615c19d5cb03a8293c3827635bf925
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8a42bc1f7b615c19d5cb03a8293c3827635bf925

Author: Rob Shearman <robertshearman at gmail.com>
Date:   Mon Jan  5 23:34:44 2009 +0000

widl: Move the ifaces field of the type_t structure to coclass details.

---

 tools/widl/parser.y    |    1 -
 tools/widl/typetree.c  |    2 +-
 tools/widl/typetree.h  |    2 +-
 tools/widl/widltypes.h |    7 ++++++-
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index b8e1d4d..c9e8844 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -1295,7 +1295,6 @@ type_t *make_type(unsigned char type, type_t *ref)
   t->attrs = NULL;
   t->orig = NULL;
   memset(&t->details, 0, sizeof(t->details));
-  t->ifaces = NULL;
   t->typestring_offset = 0;
   t->ptrdesc = 0;
   t->declarray = FALSE;
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c
index 8a42d56..83650ee 100644
--- a/tools/widl/typetree.c
+++ b/tools/widl/typetree.c
@@ -140,7 +140,7 @@ void type_module_define(type_t *module, statement_list_t *stmts)
 
 type_t *type_coclass_define(type_t *coclass, ifref_list_t *ifaces)
 {
-    coclass->ifaces = ifaces;
+    coclass->details.coclass.ifaces = ifaces;
     coclass->defined = TRUE;
     return coclass;
 }
diff --git a/tools/widl/typetree.h b/tools/widl/typetree.h
index af4d5e6..597531d 100644
--- a/tools/widl/typetree.h
+++ b/tools/widl/typetree.h
@@ -157,7 +157,7 @@ static inline int type_is_alias(const type_t *type)
 static inline ifref_list_t *type_coclass_get_ifaces(const type_t *type)
 {
     assert(type->type == RPC_FC_COCLASS);
-    return type->ifaces;
+    return type->details.coclass.ifaces;
 }
 
 #endif /* WIDL_TYPE_TREE_H */
diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h
index 6835e62..9dd23bf 100644
--- a/tools/widl/widltypes.h
+++ b/tools/widl/widltypes.h
@@ -296,6 +296,11 @@ struct array_details
   expr_t *size_is, *length_is;
 };
 
+struct coclass_details
+{
+  ifref_list_t *ifaces;
+};
+
 struct _type_t {
   const char *name;
   unsigned char type;
@@ -309,8 +314,8 @@ struct _type_t {
     struct iface_details *iface;
     struct module_details *module;
     struct array_details array;
+    struct coclass_details coclass;
   } details;
-  ifref_list_t *ifaces;           /* coclasses */
   type_t *orig;                   /* dup'd types */
   unsigned int typestring_offset;
   unsigned int ptrdesc;           /* used for complex structs */




More information about the wine-cvs mailing list