{
    "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-06-16T00:39:04Z",
    "synopsis": "#include <ffi.h>\nffistatus\nffiprepcifvar(fficif *cif, ffiabi abi, unsigned int nfixedargs, unsigned int ntotalargs,\nffitype *rtype, ffitype atypes);",
    "sections": {
        "NAME": {
            "content": "ffiprepcifvar -- Prepare a fficif structure for use with fficall for variadic functions.\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "#include <ffi.h>\n\nffistatus\nffiprepcifvar(fficif *cif, ffiabi abi, unsigned int nfixedargs, unsigned int ntotalargs,\nffitype *rtype, ffitype atypes);\n",
            "subsections": []
        },
        "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 each\nargument.  rtype points to an ffitype that describes the data type, size and alignment of the\nreturn value.  nfixedargs must contain the number of fixed (non-variadic) arguments.  Note that\nto call a non-variadic function ffiprepcif must be used.\n",
            "subsections": []
        },
        "RETURN VALUES": {
            "content": "Upon successful completion, ffiprepcifvar returns FFIOK.  It will return FFIBADTYPEDEF if\ncif is NULL or atypes or rtype is malformed. If abi does not refer to a valid ABI, FFIBADABI\nwill be returned. Available ABIs are defined in <ffitarget.h>\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "ffi(3), fficall(3), ffiprepcif(3)\n\nJanuary 25, 2011",
            "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"
        }
    ]
}