1ffi_prep_cif(3)          BSD Library Functions Manual          ffi_prep_cif(3)
2

NAME

4     ffi_prep_cif — Prepare a ffi_cif structure for use with ffi_call
5

SYNOPSIS

7     #include <ffi.h>
8
9     ffi_status
10     ffi_prep_cif(ffi_cif *cif, ffi_abi abi, unsigned int nargs,
11         ffi_type *rtype, ffi_type **atypes);
12

DESCRIPTION

14     The ffi_prep_cif function prepares a ffi_cif structure for use with
15     ffi_call abi specifies a set of calling conventions to use.  atypes is an
16     array of nargs pointers to ffi_type structs that describe the data type,
17     size and alignment of each argument.  rtype points to an ffi_type that
18     describes the data type, size and alignment of the return value. Note
19     that to call a variadic function ffi_prep_cif_var must be used instead.
20

RETURN VALUES

22     Upon successful completion, ffi_prep_cif returns FFI_OK.  It will return
23     FFI_BAD_TYPEDEF if cif is NULL or atypes or rtype is malformed. If abi
24     does not refer to a valid ABI, FFI_BAD_ABI will be returned. Available
25     ABIs are defined in <ffitarget.h>.
26

SEE ALSO

28     ffi(3), ffi_call(3), ffi_prep_cif_var(3)
29
30                               February 15, 2008
Impressum