|
123 | 123 | int_tests (void)
|
124 | 124 | {
|
125 | 125 | int ir;
|
| 126 | + ffi_arg retvalue; |
126 | 127 | #if (!defined(DGTEST)) || DGTEST == 2
|
127 | 128 | ir = i_v();
|
128 | 129 | fprintf(out,"->%d\n",ir);
|
|
132 | 133 | ffi_cif cif;
|
133 | 134 | FFI_PREP_CIF_NOARGS(cif,ffi_type_sint);
|
134 | 135 | {
|
135 |
| - FFI_CALL(cif,i_v,NULL,&ir); |
| 136 | + FFI_CALL(cif,i_v,NULL,&retvalue); |
| 137 | + ir = retvalue; |
136 | 138 | }
|
137 | 139 | }
|
138 | 140 | fprintf(out,"->%d\n",ir);
|
|
150 | 152 | FFI_PREP_CIF(cif,argtypes,ffi_type_sint);
|
151 | 153 | {
|
152 | 154 | /*const*/ void* args[] = { &i1 };
|
153 |
| - FFI_CALL(cif,i_i,args,&ir); |
| 155 | + FFI_CALL(cif,i_i,args,&retvalue); |
| 156 | + ir = retvalue; |
154 | 157 | }
|
155 | 158 | }
|
156 | 159 | fprintf(out,"->%d\n",ir);
|
|
168 | 171 | FFI_PREP_CIF(cif,argtypes,ffi_type_sint);
|
169 | 172 | {
|
170 | 173 | /*const*/ void* args[] = { &i1, &i2 };
|
171 |
| - FFI_CALL(cif,i_i2,args,&ir); |
| 174 | + FFI_CALL(cif,i_i2,args,&retvalue); |
| 175 | + ir = retvalue; |
172 | 176 | }
|
173 | 177 | }
|
174 | 178 | fprintf(out,"->%d\n",ir);
|
|
186 | 190 | FFI_PREP_CIF(cif,argtypes,ffi_type_sint);
|
187 | 191 | {
|
188 | 192 | /*const*/ void* args[] = { &i1, &i2, &i3, &i4 };
|
189 |
| - FFI_CALL(cif,i_i4,args,&ir); |
| 193 | + FFI_CALL(cif,i_i4,args,&retvalue); |
| 194 | + ir = retvalue; |
190 | 195 | }
|
191 | 196 | }
|
192 | 197 | fprintf(out,"->%d\n",ir);
|
|
204 | 209 | FFI_PREP_CIF(cif,argtypes,ffi_type_sint);
|
205 | 210 | {
|
206 | 211 | /*const*/ void* args[] = { &i1, &i2, &i3, &i4, &i5, &i6, &i7, &i8 };
|
207 |
| - FFI_CALL(cif,i_i8,args,&ir); |
| 212 | + FFI_CALL(cif,i_i8,args,&retvalue); |
| 213 | + ir = retvalue; |
208 | 214 | }
|
209 | 215 | }
|
210 | 216 | fprintf(out,"->%d\n",ir);
|
|
222 | 228 | FFI_PREP_CIF(cif,argtypes,ffi_type_sint);
|
223 | 229 | {
|
224 | 230 | /*const*/ void* args[] = { &i1, &i2, &i3, &i4, &i5, &i6, &i7, &i8, &i9, &i10, &i11, &i12, &i13, &i14, &i15, &i16 };
|
225 |
| - FFI_CALL(cif,i_i16,args,&ir); |
| 231 | + FFI_CALL(cif,i_i16,args,&retvalue); |
| 232 | + ir = retvalue; |
226 | 233 | }
|
227 | 234 | }
|
228 | 235 | fprintf(out,"->%d\n",ir);
|
|
0 commit comments