Test that Servo_* functions have the right signatures

Fixes #12992
This commit is contained in:
Manish Goregaokar 2016-10-06 21:28:39 +05:30
parent 6bd898626f
commit af57a98694
9 changed files with 148 additions and 37 deletions

View file

@ -1933,7 +1933,7 @@ clip-path
<%def name="define_ffi_struct_accessor(style_struct)">
#[no_mangle]
#[allow(non_snake_case, unused_variables)]
pub extern "C" fn Servo_GetStyle${style_struct.gecko_name}(computed_values:
pub unsafe extern "C" fn Servo_GetStyle${style_struct.gecko_name}(computed_values:
ServoComputedValuesBorrowedOrNull) -> *const ${style_struct.gecko_ffi_name} {
ComputedValues::arc_from_borrowed(&computed_values).unwrap().get_${style_struct.name_lower}().get_gecko()
as *const ${style_struct.gecko_ffi_name}