{
    "mode": "man",
    "parameter": "ffi_prep_cif_var",
    "section": "3",
    "url": "https://www.chedong.com/phpMan.php/man/ffi_prep_cif_var/3/json",
    "generated": "2026-10-04T15:36:36Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "ffiprepcifvar — Prepare a fficif structure for use with fficall for variadic functions.\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "#include <ffi.h>",
                    "content": "ffistatus\nffiprepcifvar(fficif *cif, ffiabi abi, unsigned int nfixedargs, unsigned int ntotalargs,\nffitype *rtype, ffitype atypes);\n"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "The ffiprepcifvar function prepares a fficif structure for use with fficall for variadic\nfunctions.   abi  specifies  a  set  of  calling  conventions  to use.  atypes is an array of\nntotalargs pointers to ffitype structs that describe the data type, size  and  alignment  of\neach  argument.  rtype points to an ffitype that describes the data type, size and alignment\nof the return value.  nfixedargs must contain the number of fixed  (non-variadic)  arguments.\nNote that to call a non-variadic function ffiprepcif must be used.\n",
            "subsections": []
        },
        "RETURN VALUES": {
            "content": "Upon  successful completion, ffiprepcifvar returns FFIOK.  It will return FFIBADTYPEDEF\nif cif is NULL or atypes or rtype is malformed. If  abi  does  not  refer  to  a  valid  ABI,\nFFIBADABI will be returned. Available ABIs are defined in <ffitarget.h>\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "ffi(3), fficall(3), ffiprepcif(3)\n\nJanuary 25, 2011                       ffiprepcifvar(3)",
            "subsections": []
        }
    },
    "summary": "ffiprepcifvar — Prepare a fficif structure for use with fficall for variadic functions.",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "ffi",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/ffi/3/json"
        },
        {
            "name": "fficall",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/fficall/3/json"
        },
        {
            "name": "ffiprepcif",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/ffiprepcif/3/json"
        }
    ]
}