11 typedef unsigned int T;
14 void* userdata __UNUSED__)
18 printf(
"%d: %d %d\n", (
int)*(
ffi_arg *)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_uint;
32 cl_arg_types[1] = &ffi_type_uint;
33 cl_arg_types[2] =
NULL;
37 &ffi_type_uint, cl_arg_types) == FFI_OK);
42 printf(
"res: %d\n", res);
ffi_status ffi_prep_cif_var(ffi_cif *cif, ffi_abi abi, unsigned int nfixedargs, unsigned int ntotalargs, ffi_type *rtype, ffi_type **atypes)
static void cls_ret_T_fn(ffi_cif *cif __UNUSED__, void *resp, void **args, void *userdata __UNUSED__)
ffi_status ffi_prep_closure_loc(ffi_closure *closure, ffi_cif *cif, void(*fun)(ffi_cif *, void *, void **, void *), void *user_data, void *codeloc)