Skip to content

Commit

Permalink
Add additional helpers to bitfield data structure
Browse files Browse the repository at this point in the history
This commit addresses the case where a struct containing a bitfield
is wrapped in a struct such as UnsafeCell which allows interior
mutability.

Previously, bitfield accessors only allowed a receiver. This becomes
problematic in the case of interior mutability as raw pointer access may
be required so as not to violate the aliasing rules in Rust.
  • Loading branch information
jbaublitz committed Sep 3, 2024
1 parent 9a8e5ca commit 170c5f9
Show file tree
Hide file tree
Showing 45 changed files with 9,610 additions and 474 deletions.
895 changes: 884 additions & 11 deletions bindgen-tests/tests/expectations/tests/bitfield-32bit-overflow.rs

Large diffs are not rendered by default.

155 changes: 144 additions & 11 deletions bindgen-tests/tests/expectations/tests/bitfield-large.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

130 changes: 119 additions & 11 deletions bindgen-tests/tests/expectations/tests/bitfield-linux-32.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 170c5f9

Please sign in to comment.