2 Purpose: Check return value unsigned char.
5 Originator: From the original ffitest.c */
10 static unsigned char return_uc(unsigned char uc
)
18 ffi_type
*args
[MAX_ARGS
];
19 void *values
[MAX_ARGS
];
24 args
[0] = &ffi_type_uchar
;
27 /* Initialize the cif */
28 CHECK(ffi_prep_cif(&cif
, FFI_DEFAULT_ABI
, 1,
29 &ffi_type_uchar
, args
) == FFI_OK
);
31 for (uc
= (unsigned char) '\x00';
32 uc
< (unsigned char) '\xff'; uc
++)
34 ffi_call(&cif
, FFI_FN(return_uc
), &rint
, values
);
35 CHECK((unsigned char)rint
== uc
);