Alexandre Julliard : widl: Don' t output stubs for interfaces included in a typelib.

Alexandre Julliard julliard at winehq.org
Tue Sep 6 11:35:53 CDT 2011


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Sep  6 15:42:16 2011 +0200

widl: Don't output stubs for interfaces included in a typelib.

---

 tools/widl/client.c  |    2 --
 tools/widl/header.c  |    2 --
 tools/widl/proxy.c   |   15 +++------------
 tools/widl/server.c  |    4 +---
 tools/widl/typegen.c |   16 ++--------------
 5 files changed, 6 insertions(+), 33 deletions(-)

diff --git a/tools/widl/client.c b/tools/widl/client.c
index be42b1b..5c83588 100644
--- a/tools/widl/client.c
+++ b/tools/widl/client.c
@@ -472,8 +472,6 @@ static void write_client_ifaces(const statement_list_t *stmts, int expr_eval_rou
                 write_stubdescriptor(iface, expr_eval_routines);
             }
         }
-        else if (stmt->type == STMT_LIBRARY)
-            write_client_ifaces(stmt->u.lib->stmts, expr_eval_routines, proc_offset);
     }
 }
 
diff --git a/tools/widl/header.c b/tools/widl/header.c
index 9d20a3e..579ef5c 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -987,8 +987,6 @@ static void write_local_stubs_stmts(FILE *local_stubs, const statement_list_t *s
   {
     if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE)
       write_locals(local_stubs, stmt->u.type, TRUE);
-    else if (stmt->type == STMT_LIBRARY)
-      write_local_stubs_stmts(local_stubs, stmt->u.lib->stmts);
   }
 }
 
diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c
index 699e073..33ffbd3 100644
--- a/tools/widl/proxy.c
+++ b/tools/widl/proxy.c
@@ -754,12 +754,7 @@ static int does_any_iface(const statement_list_t *stmts, type_pred_t pred)
   if (stmts)
     LIST_FOR_EACH_ENTRY(stmt, stmts, const statement_t, entry)
     {
-      if (stmt->type == STMT_LIBRARY)
-      {
-          if (does_any_iface(stmt->u.lib->stmts, pred))
-              return TRUE;
-      }
-      else if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE)
+      if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE)
       {
         if (pred(stmt->u.type))
           return TRUE;
@@ -834,9 +829,7 @@ static void write_proxy_stmts(const statement_list_t *stmts, unsigned int *proc_
   const statement_t *stmt;
   if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry )
   {
-    if (stmt->type == STMT_LIBRARY)
-      write_proxy_stmts(stmt->u.lib->stmts, proc_offset);
-    else if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE)
+    if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE)
     {
       if (need_proxy(stmt->u.type))
         write_proxy(stmt->u.type, proc_offset);
@@ -860,9 +853,7 @@ static void build_iface_list( const statement_list_t *stmts, type_t **ifaces[],
     if (!stmts) return;
     LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry )
     {
-        if (stmt->type == STMT_LIBRARY)
-            build_iface_list(stmt->u.lib->stmts, ifaces, count);
-        else if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE)
+        if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE)
         {
             type_t *iface = stmt->u.type;
             if (type_iface_get_inherit(iface) && need_proxy(iface))
diff --git a/tools/widl/server.c b/tools/widl/server.c
index 3a8810e..7f817b0 100644
--- a/tools/widl/server.c
+++ b/tools/widl/server.c
@@ -463,9 +463,7 @@ static void write_server_stmts(const statement_list_t *stmts, int expr_eval_rout
     const statement_t *stmt;
     if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, const statement_t, entry )
     {
-        if (stmt->type == STMT_LIBRARY)
-            write_server_stmts(stmt->u.lib->stmts, expr_eval_routines, proc_offset);
-        else if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE)
+        if (stmt->type == STMT_TYPE && type_get_type(stmt->u.type) == TYPE_INTERFACE)
         {
             type_t *iface = stmt->u.type;
             if (!need_stub(iface))
diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index dfc5a50..5a22525 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -1488,8 +1488,6 @@ static void write_procformatstring_stmts(FILE *file, int indent, const statement
                 write_procformatstring_func( file, indent, iface, func, offset, count++ );
             }
         }
-        else if (stmt->type == STMT_LIBRARY)
-            write_procformatstring_stmts(file, indent, stmt->u.lib->stmts, pred, offset);
     }
 }
 
@@ -3624,12 +3622,7 @@ static unsigned int process_tfs_stmts(FILE *file, const statement_list_t *stmts,
         const type_t *iface;
         const statement_t *stmt_func;
 
-        if (stmt->type == STMT_LIBRARY)
-        {
-            process_tfs_stmts(file, stmt->u.lib->stmts, pred, typeformat_offset);
-            continue;
-        }
-        else if (stmt->type != STMT_TYPE || type_get_type(stmt->u.type) != TYPE_INTERFACE)
+        if (stmt->type != STMT_TYPE || type_get_type(stmt->u.type) != TYPE_INTERFACE)
             continue;
 
         iface = stmt->u.type;
@@ -4510,12 +4503,7 @@ unsigned int get_size_procformatstring(const statement_list_t *stmts, type_pred_
         const type_t *iface;
         const statement_t *stmt_func;
 
-        if (stmt->type == STMT_LIBRARY)
-        {
-            size += get_size_procformatstring(stmt->u.lib->stmts, pred) - 1;
-            continue;
-        }
-        else if (stmt->type != STMT_TYPE || type_get_type(stmt->u.type) != TYPE_INTERFACE)
+        if (stmt->type != STMT_TYPE || type_get_type(stmt->u.type) != TYPE_INTERFACE)
             continue;
 
         iface = stmt->u.type;




More information about the wine-cvs mailing list