Skip to content

Commit 3c3dcc3

Browse files
Deploying to gh-pages from @ 9452ba1 🚀
1 parent 4e2e767 commit 3c3dcc3

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

print.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,6 +1408,10 @@ <h2><a class="header" href="#bitfield-strategy-overview" id="bitfield-strategy-o
14081408
<li>For each contiguous block of bitfields, Bindgen emits an opaque physical field that contains one or more logical bitfields</li>
14091409
<li>A static constructor <code>new_bitfield_{1, 2, ...}</code> with a parameter for each bitfield contained within the opaque physical field.</li>
14101410
</ul>
1411+
<p>To keep bindgen from generating the bitfield unit struct, it can be blocklisted like any
1412+
other type, i.e. <code>--blocklist-type &quot;__BindgenBitfieldUnit&quot;</code>. This may be useful if
1413+
you want to define a custom implementation, or your generated bindings import a
1414+
pre-existing definition for the bitfield unit type.</p>
14111415
<h2><a class="header" href="#bitfield-examples" id="bitfield-examples">Bitfield examples</a></h2>
14121416
<p>For this discussion, we will use the following C type definitions and functions.</p>
14131417
<pre><code class="language-c">typedef struct {

searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

searchindex.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

using-bitfields.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ <h2><a class="header" href="#bitfield-strategy-overview" id="bitfield-strategy-o
176176
<li>For each contiguous block of bitfields, Bindgen emits an opaque physical field that contains one or more logical bitfields</li>
177177
<li>A static constructor <code>new_bitfield_{1, 2, ...}</code> with a parameter for each bitfield contained within the opaque physical field.</li>
178178
</ul>
179+
<p>To keep bindgen from generating the bitfield unit struct, it can be blocklisted like any
180+
other type, i.e. <code>--blocklist-type &quot;__BindgenBitfieldUnit&quot;</code>. This may be useful if
181+
you want to define a custom implementation, or your generated bindings import a
182+
pre-existing definition for the bitfield unit type.</p>
179183
<h2><a class="header" href="#bitfield-examples" id="bitfield-examples">Bitfield examples</a></h2>
180184
<p>For this discussion, we will use the following C type definitions and functions.</p>
181185
<pre><code class="language-c">typedef struct {

0 commit comments

Comments
 (0)