10static void cls_ret_sint_fn(ffi_cif* cif
__UNUSED__,
void* resp,
void** args,
13 *(
ffi_arg*)resp = *(
signed int *)args[0];
14 printf(
"%d: %d\n",*(
signed int *)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_sint;
28 cl_arg_types[1] =
NULL;
32 &ffi_type_sint, 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)
signed int(* cls_ret_sint)(signed int)
ffi_status ffi_prep_cif(ffi_cif *cif, ffi_abi abi, unsigned int nargs, ffi_type *rtype, ffi_type **atypes)