/usr/share/doc/libffi5/html/Structures.html is in libffi-dev 3.0.10-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | <html lang="en">
<head>
<title>Structures - libffi</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="libffi">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Types.html#Types" title="Types">
<link rel="prev" href="Primitive-Types.html#Primitive-Types" title="Primitive Types">
<link rel="next" href="Type-Example.html#Type-Example" title="Type Example">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This manual is for Libffi, a portable foreign-function interface
library.
Copyright (C) 2008, 2010 Red Hat, Inc.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2, or
(at your option) any later version. A copy of the license is
included in the section entitled ``GNU General Public License''.
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="Structures"></a>
<p>
Next: <a rel="next" accesskey="n" href="Type-Example.html#Type-Example">Type Example</a>,
Previous: <a rel="previous" accesskey="p" href="Primitive-Types.html#Primitive-Types">Primitive Types</a>,
Up: <a rel="up" accesskey="u" href="Types.html#Types">Types</a>
<hr>
</div>
<h4 class="subsection">2.3.2 Structures</h4>
<p>Although ‘<samp><span class="samp">libffi</span></samp>’ has no special support for unions or
bit-fields, it is perfectly happy passing structures back and forth.
You must first describe the structure to ‘<samp><span class="samp">libffi</span></samp>’ by creating a
new <code>ffi_type</code> object for it.
<p><a name="index-ffi_005ftype-34"></a>
<div class="defun">
— ffi_type: <var><a name="index--35"></a></var><br>
<blockquote><p>The <code>ffi_type</code> has the following members:
<dl>
<dt><code>size_t size</code><dd>This is set by <code>libffi</code>; you should initialize it to zero.
<br><dt><code>unsigned short alignment</code><dd>This is set by <code>libffi</code>; you should initialize it to zero.
<br><dt><code>unsigned short type</code><dd>For a structure, this should be set to <code>FFI_TYPE_STRUCT</code>.
<br><dt><code>ffi_type **elements</code><dd>This is a ‘<samp><span class="samp">NULL</span></samp>’-terminated array of pointers to <code>ffi_type</code>
objects. There is one element per field of the struct.
</dl>
</p></blockquote></div>
</body></html>
|