11static int floating(
int a,
float b,
double c,
long double d)
15 i = (
int) ((
float)a/b + ((float)c/(
float)d));
32 args[0] = &ffi_type_sint;
34 args[1] = &ffi_type_float;
36 args[2] = &ffi_type_double;
38 args[3] = &ffi_type_longdouble;
43 &ffi_type_sint, args) == FFI_OK);
47 d = (
double)1.0/(
double)3.0;
50 floating (si1,
f, d, ld);
54 printf (
"%d vs %d\n", (
int)
rint, floating (si1,
f, d, ld));
void ffi_call(ffi_cif *cif, void(*fn)(void), void *rvalue, void **avalue)
ffi_status ffi_prep_cif(ffi_cif *cif, ffi_abi abi, unsigned int nargs, ffi_type *rtype, ffi_type **atypes)