[pypy-commit] cffi default: Fix for win64

arigo noreply at buildbot.pypy.org
Thu Aug 1 22:54:53 CEST 2013


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r1331:1e1f88442f65
Date: 2013-08-01 22:54 +0200
http://bitbucket.org/cffi/cffi/changeset/1e1f88442f65/

Log:	Fix for win64

diff --git a/c/libffi_msvc/ffi.c b/c/libffi_msvc/ffi.c
--- a/c/libffi_msvc/ffi.c
+++ b/c/libffi_msvc/ffi.c
@@ -379,7 +379,12 @@
 
 #ifdef _WIN64
       if (z > 8)
-          *p_argv = *((void**) argp);   /* indirect */
+        {
+          /* On Win64, if a single argument takes more than 8 bytes,
+             then it is always passed by reference. */
+          *p_argv = *((void**) argp);
+          z = 8;
+        }
       else
 #endif
       *p_argv = (void*) argp;


More information about the pypy-commit mailing list