LWG 3035. std::allocator's constructors should be constexpr
[official-gcc.git] / libffi / man / ffi_prep_cif.3
blobab2be8adc17a19af2507c495887fce1c31c7a4e7
1 .Dd February 15, 2008
2 .Dt ffi_prep_cif 3
3 .Sh NAME
4 .Nm ffi_prep_cif
5 .Nd Prepare a
6 .Nm ffi_cif
7 structure for use with
8 .Nm ffi_call 
10 .Sh SYNOPSIS
11 .In ffi.h
12 .Ft ffi_status
13 .Fo ffi_prep_cif
14 .Fa "ffi_cif *cif"
15 .Fa "ffi_abi abi"
16 .Fa "unsigned int nargs"
17 .Fa "ffi_type *rtype"
18 .Fa "ffi_type **atypes"
19 .Fc
20 .Sh DESCRIPTION
21 The
22 .Nm ffi_prep_cif
23 function prepares a
24 .Nm ffi_cif
25 structure for use with 
26 .Nm ffi_call
28 .Fa abi
29 specifies a set of calling conventions to use.
30 .Fa atypes
31 is an array of
32 .Fa nargs
33 pointers to
34 .Nm ffi_type
35 structs that describe the data type, size and alignment of each argument.
36 .Fa rtype
37 points to an
38 .Nm ffi_type
39 that describes the data type, size and alignment of the
40 return value. Note that to call a variadic function
41 .Nm ffi_prep_cif_var
42 must be used instead.
43 .Sh RETURN VALUES
44 Upon successful completion,
45 .Nm ffi_prep_cif
46 returns
47 .Nm FFI_OK .
48 It will return
49 .Nm FFI_BAD_TYPEDEF
51 .Fa cif
53 .Nm NULL
55 .Fa atypes
57 .Fa rtype
58 is malformed. If
59 .Fa abi
60 does not refer to a valid ABI,
61 .Nm FFI_BAD_ABI
62 will be returned. Available ABIs are
63 defined in
64 .Nm <ffitarget.h> .
65 .Sh SEE ALSO
66 .Xr ffi 3 ,
67 .Xr ffi_call 3 ,
68 .Xr ffi_prep_cif_var 3