man-pages/man3/ffi_prep_cif.3.html
2021-03-31 01:06:50 +01:00

142 lines
2.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of ffi_prep_cif</TITLE>
</HEAD><BODY>
<H1>ffi_prep_cif</H1>
Section: C Library Functions (3)<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<BR>BSD mandoc<BR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
<B>ffi_prep_cif</B>
- Prepare a
<B>ffi_cif</B>
structure for use with
<B>ffi_call </B>
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
In ffi.h
Ft ffi_status
Fo ffi_prep_cif
Fa ffi_cif *cif
Fa ffi_abi abi
Fa unsigned int nargs
Fa ffi_type *rtype
Fa ffi_type **atypes
Fc <A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
The
<B>ffi_prep_cif</B>
function prepares a
<B>ffi_cif</B>
structure for use with
<B>ffi_call</B>
Fa abi
specifies a set of calling conventions to use.
Fa atypes
is an array of
Fa nargs
pointers to
<B>ffi_type</B>
structs that describe the data type, size and alignment of each argument.
Fa rtype
points to an
<B>ffi_type</B>
that describes the data type, size and alignment of the
return value. Note that to call a variadic function
<B>ffi_prep_cif_var</B>
must be used instead.
<A NAME="lbAE">&nbsp;</A>
<H2>RETURN VALUES</H2>
Upon successful completion,
<B>ffi_prep_cif</B>
returns
<B>FFI_OK</B>
It will return
<B>FFI_BAD_TYPEDEF</B>
if
Fa cif
is
<B>NULL</B>
or
Fa atypes
or
Fa rtype
is malformed. If
Fa abi
does not refer to a valid ABI,
<B>FFI_BAD_ABI</B>
will be returned. Available ABIs are
defined in
<B>&lt;<A HREF="file:///usr/include/ffitarget.h">ffitarget.h</A>&gt;</B>
<A NAME="lbAF">&nbsp;</A>
<H2>SEE ALSO</H2>
<A HREF="/cgi-bin/man/man2html?3+ffi">ffi</A>(3),
ffi_call3,
ffi_prep_cif_var3
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="4"><A HREF="#lbAE">RETURN VALUES</A><DD>
<DT id="5"><A HREF="#lbAF">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:42 GMT, March 31, 2021
</BODY>
</HTML>