10typedef unsigned short T;
12static void cls_ret_T_fn(ffi_cif* cif
__UNUSED__,
void* resp,
void** args,
17 printf(
"%d: %d %d\n", (
int)(*(
ffi_arg *)resp), *(
T *)args[0], *(
T *)args[1]);
26 ffi_closure *pcl = ffi_closure_alloc(
sizeof(ffi_closure), &code);
27 ffi_type * cl_arg_types[3];
30 cl_arg_types[0] = &ffi_type_ushort;
31 cl_arg_types[1] = &ffi_type_ushort;
32 cl_arg_types[2] =
NULL;
36 &ffi_type_ushort, 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)