mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Fix up Servo_StyleSet_MediumFeaturesChanged for Linux 32-bit ABI
Bindgen bitfield enums don't work as return values with the Linux 32-bit ABI at the moment because they wrap the value in a struct. This causes the Rust side to believe the caller will pass along space for the struct return value, while C++ believes it's just an integer value. MozReview-Commit-ID: LY6z7lEKgOp
This commit is contained in:
parent
22e794bbd8
commit
25d2b70252
1 changed files with 5 additions and 2 deletions
|
@ -900,7 +900,7 @@ pub extern "C" fn Servo_StyleSet_AppendStyleSheet(
|
|||
pub extern "C" fn Servo_StyleSet_MediumFeaturesChanged(
|
||||
raw_data: RawServoStyleSetBorrowed,
|
||||
viewport_units_used: *mut bool,
|
||||
) -> OriginFlags {
|
||||
) -> u8 {
|
||||
let global_style_data = &*GLOBAL_STYLE_DATA;
|
||||
let guard = global_style_data.shared_lock.read();
|
||||
|
||||
|
@ -926,7 +926,10 @@ pub extern "C" fn Servo_StyleSet_MediumFeaturesChanged(
|
|||
&guard,
|
||||
);
|
||||
|
||||
OriginFlags::from(origins_in_which_rules_changed)
|
||||
// We'd like to return `OriginFlags` here, but bindgen bitfield enums don't
|
||||
// work as return values with the Linux 32-bit ABI at the moment because
|
||||
// they wrap the value in a struct, so for now just unwrap it.
|
||||
OriginFlags::from(origins_in_which_rules_changed).0
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue