Alexandre Julliard : winebuild: Output relay thunks for stub functions when the arguments are known.

Alexandre Julliard julliard at winehq.org
Tue May 3 13:30:55 CDT 2011


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue May  3 13:09:09 2011 +0200

winebuild: Output relay thunks for stub functions when the arguments are known.

---

 tools/winebuild/spec32.c |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/tools/winebuild/spec32.c b/tools/winebuild/spec32.c
index 8999b88..a5b4118 100644
--- a/tools/winebuild/spec32.c
+++ b/tools/winebuild/spec32.c
@@ -53,7 +53,18 @@ static inline int needs_relay( const ORDDEF *odp )
     /* skip nonexistent entry points */
     if (!odp) return 0;
     /* skip non-functions */
-    if (odp->type != TYPE_STDCALL && odp->type != TYPE_CDECL && odp->type != TYPE_THISCALL) return 0;
+    switch (odp->type)
+    {
+    case TYPE_STDCALL:
+    case TYPE_CDECL:
+    case TYPE_THISCALL:
+        break;
+    case TYPE_STUB:
+        if (odp->u.func.nb_args != -1) break;
+        /* fall through */
+    default:
+        return 0;
+    }
     /* skip norelay and forward entry points */
     if (odp->flags & (FLAG_NORELAY|FLAG_FORWARD)) return 0;
     /* skip register entry points on x86_64 */




More information about the wine-cvs mailing list