From 6aa15900accc0a648cdebf11ec11d11697ebfffd Mon Sep 17 00:00:00 2001 From: Vitaly Budovski Date: Thu, 5 Sep 2013 12:05:06 +1000 Subject: [PATCH] Don't use 16 byte aligned stack for WIN32 This fixes a crash when accessing __stdcall functions in Python ctypes. --- src/x86/ffi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/x86/ffi.c b/src/x86/ffi.c index 0600414d..307cd199 100644 --- a/src/x86/ffi.c +++ b/src/x86/ffi.c @@ -315,7 +315,9 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif) cif->bytes += 4 * sizeof(ffi_arg); #endif +#ifndef X86_WIN32 cif->bytes = (cif->bytes + 15) & ~0xF; +#endif return FFI_OK; }