51 uc =
va_arg (ap,
unsigned);
54 us =
va_arg (ap,
unsigned);
57 ui =
va_arg (ap,
unsigned int);
58 si =
va_arg (ap,
signed int);
60 ul =
va_arg (ap,
unsigned long);
61 sl =
va_arg (ap,
signed long);
67 printf (
"%u %u %u %u %u %u %u %u %u uc=%u sc=%d %u %d %u %d %lu %ld %f %f\n",
68 s1.a, s1.b, l.a, l.b, l.c, l.d, l.e,
84 ffi_type* arg_types[15];
87 ffi_type *s_type_elements[3];
90 ffi_type *l_type_elements[6];
111 s_type.alignment = 0;
112 s_type.type = FFI_TYPE_STRUCT;
113 s_type.elements = s_type_elements;
117 s_type_elements[2] =
NULL;
120 l_type.alignment = 0;
121 l_type.type = FFI_TYPE_STRUCT;
122 l_type.elements = l_type_elements;
124 l_type_elements[0] = &ffi_type_uint;
125 l_type_elements[1] = &ffi_type_uint;
126 l_type_elements[2] = &ffi_type_uint;
127 l_type_elements[3] = &ffi_type_uint;
128 l_type_elements[4] = &ffi_type_uint;
129 l_type_elements[5] =
NULL;
131 arg_types[0] = &ffi_type_sint;
132 arg_types[1] = &s_type;
133 arg_types[2] = &l_type;
134 arg_types[3] = &s_type;
137 arg_types[6] = &ffi_type_ushort;
138 arg_types[7] = &ffi_type_sshort;
139 arg_types[8] = &ffi_type_uint;
140 arg_types[9] = &ffi_type_sint;
141 arg_types[10] = &ffi_type_ulong;
142 arg_types[11] = &ffi_type_slong;
143 arg_types[12] = &ffi_type_double;
144 arg_types[13] = &ffi_type_double;
145 arg_types[14] =
NULL;
190 ffi_call(&cif, FFI_FN(test_fn), &res, args);
192 printf(
"res: %d\n", (
int) res);