142 lines
2.1 KiB
HTML
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"> </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"> </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"> </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"> </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><<A HREF="file:///usr/include/ffitarget.h">ffitarget.h</A>></B>
|
|
|
|
|
|
<A NAME="lbAF"> </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"> </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>
|