Alexandre Julliard : winebuild: Signal an error when a thiscall function doesn' t take a pointer as first argument.

Alexandre Julliard julliard at winehq.org
Wed Aug 25 12:35:03 CDT 2010


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Aug 24 19:29:51 2010 +0200

winebuild: Signal an error when a thiscall function doesn't take a pointer as first argument.

---

 tools/winebuild/parser.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c
index 459bf97..ce17a3f 100644
--- a/tools/winebuild/parser.c
+++ b/tools/winebuild/parser.c
@@ -308,6 +308,11 @@ static int parse_spec_export( ORDDEF *odp, DLLSPEC *spec )
     odp->u.func.arg_types[i] = '\0';
     if (odp->type == TYPE_VARARGS)
         odp->flags |= FLAG_NORELAY;  /* no relay debug possible for varags entry point */
+    if (odp->type == TYPE_THISCALL && odp->u.func.arg_types[0] != 'p')
+    {
+        error( "First argument of a thiscall function must be a pointer\n" );
+        return 0;
+    }
 
     if (!(token = GetToken(1)))
     {




More information about the wine-cvs mailing list