mirror of
https://github.com/partic2/libffi
synced 2026-11-10 18:17:19 +00:00
Various MSVC-related changes.
This commit is contained in:
committed by
Anthony Green
parent
e1539266e6
commit
0a1ab12a8d
@@ -13,7 +13,7 @@ typedef struct
|
||||
double d2;
|
||||
} test_structure_2;
|
||||
|
||||
static test_structure_2 __attribute__ ((fastcall)) struct2(test_structure_2 ts)
|
||||
static test_structure_2 __FASTCALL__ struct2(test_structure_2 ts)
|
||||
{
|
||||
ts.d1--;
|
||||
ts.d2--;
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user