11 void* userdata __UNUSED__)
13 *(
ffi_arg*)resp = *(
unsigned short *)args[0];
15 printf(
"%d: %d\n",*(
unsigned short *)args[0],
24 ffi_closure *pcl = ffi_closure_alloc(
sizeof(ffi_closure), &code);
25 ffi_type * cl_arg_types[2];
28 cl_arg_types[0] = &ffi_type_ushort;
29 cl_arg_types[1] =
NULL;
33 &ffi_type_ushort, cl_arg_types) == FFI_OK);
39 printf(
"res: %d\n",res);
unsigned short(* cls_ret_ushort)(unsigned short)
ffi_status ffi_prep_closure_loc(ffi_closure *closure, ffi_cif *cif, void(*fun)(ffi_cif *, void *, void **, void *), void *user_data, void *codeloc)
static void cls_ret_ushort_fn(ffi_cif *cif __UNUSED__, void *resp, void **args, void *userdata __UNUSED__)
ffi_status ffi_prep_cif(ffi_cif *cif, ffi_abi abi, unsigned int nargs, ffi_type *rtype, ffi_type **atypes)