mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Auto merge of #18014 - emilio:bitfields, r=SimonSapin
stylo: We've had bitfield accessors for a while now. This will allow my work in bug 1362338 to not break stylo. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18014) <!-- Reviewable:end -->
This commit is contained in:
commit
3c644ea616
1 changed files with 1 additions and 4 deletions
|
@ -156,11 +156,8 @@ impl WeakAtom {
|
||||||
/// Returns the length of the atom string.
|
/// Returns the length of the atom string.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn len(&self) -> u32 {
|
pub fn len(&self) -> u32 {
|
||||||
// FIXME(emilio): re-introduce bitfield accessors:
|
|
||||||
//
|
|
||||||
// https://github.com/servo/rust-bindgen/issues/519
|
|
||||||
unsafe {
|
unsafe {
|
||||||
(*self.as_ptr())._bitfield_1 & 0x7FFFFFFF
|
(*self.as_ptr()).mLength()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue