{
    "mode": "man",
    "parameter": "ffi_prep_cif",
    "section": "3",
    "url": "https://www.chedong.com/phpMan.php/man/ffi_prep_cif/3/json",
    "generated": "2026-10-06T01:11:10Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "ffiprepcif — Prepare a fficif structure for use with fficall\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "#include <ffi.h>",
                    "content": "ffistatus\nffiprepcif(fficif *cif,       ffiabi abi,       unsigned int nargs,      ffitype *rtype,\nffitype atypes);\n"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "The ffiprepcif function prepares a fficif structure for use with fficall abi specifies  a\nset  of calling conventions to use.  atypes is an array of nargs pointers to ffitype structs\nthat describe the data type, size and  alignment  of  each  argument.   rtype  points  to  an\nffitype  that  describes the data type, size and alignment of the return value. Note that to\ncall a variadic function ffiprepcifvar must be used instead.\n",
            "subsections": []
        },
        "RETURN VALUES": {
            "content": "Upon successful completion, ffiprepcif 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,\nFFIBADABI will be returned. Available ABIs are defined in <ffitarget.h>.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "ffi(3), fficall(3), ffiprepcifvar(3)\n\nFebruary 15, 2008                          ffiprepcif(3)",
            "subsections": []
        }
    },
    "summary": "ffiprepcif — Prepare a fficif structure for use with fficall",
    "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": "ffiprepcifvar",
            "section": "3",
            "url": "https://www.chedong.com/phpMan.php/man/ffiprepcifvar/3/json"
        }
    ]
}