Skip to content

bpo-35948: add win32 support to libffi for windows #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/x86/ffi.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,12 @@ ffi_prep_cif_machdep(ffi_cif *cif)
bytes = FFI_ALIGN (bytes, t->alignment);
bytes += FFI_ALIGN (t->size, FFI_SIZEOF_ARG);
}
#if defined(_MSC_VER) && defined(_M_IX86)
// stack is not 16-bit aligned on Windows
cif->bytes = bytes;
#else
cif->bytes = FFI_ALIGN (bytes, 16);
#endif

return FFI_OK;
}
Expand Down
Loading