Libffi provides a number of built-in type descriptors that can
be used to describe argument and return types:
ffi_type_voidvoid. This cannot be used for argument types, only
for return values.
ffi_type_uint8ffi_type_sint8ffi_type_uint16ffi_type_sint16ffi_type_uint32ffi_type_sint32ffi_type_uint64ffi_type_sint64ffi_type_floatfloat type.
ffi_type_doubledouble type.
ffi_type_ucharunsigned char type.
ffi_type_scharsigned char type. (Note that there is not an exact
equivalent to the C char type in libffi; ordinarily you
should either use ffi_type_schar or ffi_type_uchar
depending on whether char is signed.)
ffi_type_ushortunsigned short type.
ffi_type_sshortshort type.
ffi_type_uintunsigned int type.
ffi_type_sintint type.
ffi_type_ulongunsigned long type.
ffi_type_slonglong type.
ffi_type_longdoublelong double type, this is defined.
On other platforms, it is not.
ffi_type_pointervoid * pointer. You should use this for all
pointers, regardless of their real type.
Each of these is of type ffi_type, so you must take the address
when passing to ffi_prep_cif.