Alexandre Julliard : widl: Don' t require inline stubs for functions that are never generated.

Alexandre Julliard julliard at winehq.org
Wed Jun 8 11:26:59 CDT 2011


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Jun  8 14:05:53 2011 +0200

widl: Don't require inline stubs for functions that are never generated.

---

 tools/widl/proxy.c |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c
index 0a677b7..549bfaa 100644
--- a/tools/widl/proxy.c
+++ b/tools/widl/proxy.c
@@ -850,6 +850,23 @@ int need_inline_stubs(const type_t *iface)
     STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) )
     {
         const var_t *func = stmt->u.var;
+        if (is_local( func->attrs )) continue;
+        if (!is_interpreted_func( iface, func )) return 1;
+    }
+    return 0;
+}
+
+static int need_proxy_and_inline_stubs(const type_t *iface)
+{
+    const statement_t *stmt;
+
+    if (!need_proxy( iface )) return 0;
+    if (get_stub_mode() == MODE_Os) return 1;
+
+    STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) )
+    {
+        const var_t *func = stmt->u.var;
+        if (is_local( func->attrs )) continue;
         if (!is_interpreted_func( iface, func )) return 1;
     }
     return 0;
@@ -942,7 +959,7 @@ static void write_proxy_routines(const statement_list_t *stmts)
   print_proxy( "#include \"%s\"\n", header_name);
   print_proxy( "\n");
 
-  if (need_inline_stubs_file( stmts ))
+  if (does_any_iface(stmts, need_proxy_and_inline_stubs))
   {
       write_exceptions( proxy );
       print_proxy( "\n");




More information about the wine-cvs mailing list