11 void* userdata __UNUSED__)
13 *(
ffi_arg*)resp = *(
signed short *)args[0];
14 printf(
"%d: %d\n",*(
signed short *)args[0],
23 ffi_closure *pcl = ffi_closure_alloc(
sizeof(ffi_closure), &code);
24 ffi_type * cl_arg_types[2];
27 cl_arg_types[0] = &ffi_type_sshort;
28 cl_arg_types[1] =
NULL;
32 &ffi_type_sshort, cl_arg_types) == FFI_OK);
38 printf(
"res: %d\n",res);
signed short(* cls_ret_sshort)(signed 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_sshort_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)