11typedef unsigned long T;
13static void cls_ret_T_fn(ffi_cif* cif
__UNUSED__,
void* resp,
void** args,
16 *(
T *)resp = *(
T *)args[0];
18 printf(
"%ld: %ld %ld\n", *(
T *)resp, *(
T *)args[0], *(
T *)args[1]);
27 ffi_closure *pcl = ffi_closure_alloc(
sizeof(ffi_closure), &code);
28 ffi_type * cl_arg_types[3];
31 cl_arg_types[0] = &ffi_type_ulong;
32 cl_arg_types[1] = &ffi_type_ulong;
33 cl_arg_types[2] =
NULL;
37 &ffi_type_ulong, cl_arg_types) == FFI_OK);
ffi_status ffi_prep_closure_loc(ffi_closure *closure, ffi_cif *cif, void(*fun)(ffi_cif *, void *, void **, void *), void *user_data, void *codeloc)
ffi_status ffi_prep_cif_var(ffi_cif *cif, ffi_abi abi, unsigned int nfixedargs, unsigned int ntotalargs, ffi_type *rtype, ffi_type **atypes)