# ffi_prep_cif_var - Prepare a ffi_cif structure for use with ffi_call for ... - man(3) - [phpMan]


## NAME
       ffi_prep_cif_var — Prepare a ffi_cif structure for use with ffi_call for variadic functions.

## SYNOPSIS
### #include <ffi.h>

       _ffi_status_
       **ffi_prep_cif_var**(_ffi_cif_ _*cif_, _ffi_abi_ _abi_, _unsigned_ _int_ _nfixedargs_, _unsigned_ _int_ _ntotalargs_,
           _ffi_type_ _*rtype_, _ffi_type_ _**atypes_);

## DESCRIPTION
       The **ffi_prep_cif_var **function prepares a **ffi_cif **structure for use with **ffi_call **for variadic
       functions.   _abi_  specifies  a  set  of  calling  conventions  to use.  _atypes_ is an array of
       _ntotalargs_ pointers to **ffi_type **structs that describe the data type, size  and  alignment  of
       each  argument.  _rtype_ points to an **ffi_type **that describes the data type, size and alignment
       of the return value.  _nfixedargs_ must contain the number of fixed  (non-variadic)  arguments.
       Note that to call a non-variadic function **ffi_prep_cif **must be used.

## RETURN VALUES
       Upon  successful completion, **ffi_prep_cif_var **returns **FFI_OK**.  It will return **FFI_BAD_TYPEDEF**
       if _cif_ is **NULL **or _atypes_ or _rtype_ is malformed. If  _abi_  does  not  refer  to  a  valid  ABI,
       **FFI_BAD_ABI **will be returned. Available ABIs are defined in **<ffitarget.h>**

## SEE ALSO
       [_ffi_(3)](https://www.chedong.com/phpMan.php/man/ffi/3/markdown), [_ffi_call_(3)](https://www.chedong.com/phpMan.php/man/fficall/3/markdown), [_ffi_prep_cif_(3)](https://www.chedong.com/phpMan.php/man/ffiprepcif/3/markdown)

                                          January 25, 2011                       [_ffi_prep_cif_var_(3)](https://www.chedong.com/phpMan.php/man/ffiprepcifvar/3/markdown)
