| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
2.3.1 Primitive Types
Libffi provides a number of built-in type descriptors that can
be used to describe argument and return types:
ffi_type_void-
The type
void. This cannot be used for argument types, only for return values. ffi_type_uint8-
An unsigned, 8-bit integer type.
ffi_type_sint8-
A signed, 8-bit integer type.
ffi_type_uint16-
An unsigned, 16-bit integer type.
ffi_type_sint16-
A signed, 16-bit integer type.
ffi_type_uint32-
An unsigned, 32-bit integer type.
ffi_type_sint32-
A signed, 32-bit integer type.
ffi_type_uint64-
An unsigned, 64-bit integer type.
ffi_type_sint64-
A signed, 64-bit integer type.
ffi_type_float-
The C
floattype. ffi_type_double-
The C
doubletype. ffi_type_uchar-
The C
unsigned chartype. ffi_type_schar-
The C
signed chartype. (Note that there is not an exact equivalent to the Cchartype inlibffi; ordinarily you should either useffi_type_scharorffi_type_uchardepending on whethercharis signed.) ffi_type_ushort-
The C
unsigned shorttype. ffi_type_sshort-
The C
shorttype. ffi_type_uint-
The C
unsigned inttype. ffi_type_sint-
The C
inttype. ffi_type_ulong-
The C
unsigned longtype. ffi_type_slong-
The C
longtype. ffi_type_longdouble-
On platforms that have a C
long doubletype, this is defined. On other platforms, it is not. ffi_type_pointer-
A generic
void *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.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on March 29, 2013 using texi2html 5.0.
