# phpman > man > ffi_prep_cif_var(3)

[ffi_prep_cif_var(3)](https://www.chedong.com/phpMan.php/man/ffiprepcifvar/3/markdown)      BSD Library Functions Manual      [ffi_prep_cif_var(3)](https://www.chedong.com/phpMan.php/man/ffiprepcifvar/3/markdown)

## 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
