diff options
author | Gregory P. Smith <greg@krypto.org> | 2013-03-19 00:11:20 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2013-03-19 00:11:20 (GMT) |
commit | 029273fc903bcbdd689132f153d53004a8aee0b2 (patch) | |
tree | 0baf0eb95dba16ec403cf36ba48fa4b9ed77bafb /Modules/_ctypes/libffi/testsuite/libffi.call/struct2.c | |
parent | a846f5ace80977f922e8295441afc668910fc894 (diff) | |
download | cpython-029273fc903bcbdd689132f153d53004a8aee0b2.zip cpython-029273fc903bcbdd689132f153d53004a8aee0b2.tar.gz cpython-029273fc903bcbdd689132f153d53004a8aee0b2.tar.bz2 |
Fixes issue #17192: Update the ctypes module's libffi to v3.0.13. This
specifically addresses a stack misalignment issue on x86 and issues on
some more recent platforms.
Diffstat (limited to 'Modules/_ctypes/libffi/testsuite/libffi.call/struct2.c')
-rw-r--r-- | Modules/_ctypes/libffi/testsuite/libffi.call/struct2.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/_ctypes/libffi/testsuite/libffi.call/struct2.c b/Modules/_ctypes/libffi/testsuite/libffi.call/struct2.c index 14bc9fd..d85385e 100644 --- a/Modules/_ctypes/libffi/testsuite/libffi.call/struct2.c +++ b/Modules/_ctypes/libffi/testsuite/libffi.call/struct2.c @@ -29,6 +29,11 @@ int main (void) test_structure_2 ts2_arg; ffi_type ts2_type; ffi_type *ts2_type_elements[3]; + + /* This is a hack to get a properly aligned result buffer */ + test_structure_2 *ts2_result = + (test_structure_2 *) malloc (sizeof(test_structure_2)); + ts2_type.size = 0; ts2_type.alignment = 0; ts2_type.type = FFI_TYPE_STRUCT; @@ -37,11 +42,6 @@ int main (void) ts2_type_elements[1] = &ffi_type_double; ts2_type_elements[2] = NULL; - - /* This is a hack to get a properly aligned result buffer */ - test_structure_2 *ts2_result = - (test_structure_2 *) malloc (sizeof(test_structure_2)); - args[0] = &ts2_type; values[0] = &ts2_arg; |