mirror of
https://gitee.com/openharmony/third_party_rust_bindgen
synced 2025-03-03 04:07:29 +00:00
Mark all vtable functions as unsafe extern "C"
This commit is contained in:
parent
0587ff95a9
commit
be6d07ac2c
@ -1082,7 +1082,7 @@ impl<'a> CodeGenerator for Vtable<'a> {
|
||||
};
|
||||
|
||||
Some(quote! {
|
||||
pub #function_name : fn( #( #args ),* ) #ret
|
||||
pub #function_name : unsafe extern "C" fn( #( #args ),* ) #ret
|
||||
})
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
@ -15,7 +15,7 @@ pub enum _bindgen_ty_1 {
|
||||
}
|
||||
#[repr(C)]
|
||||
pub struct C__bindgen_vtable {
|
||||
pub C_match: fn(this: &mut C),
|
||||
pub C_match: unsafe extern "C" fn(this: &mut C),
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
|
@ -8,7 +8,7 @@
|
||||
#[repr(C)]
|
||||
pub struct nsISupports__bindgen_vtable {
|
||||
pub nsISupports_QueryInterface:
|
||||
fn(this: &mut nsISupports) -> *mut nsISupports,
|
||||
unsafe extern "C" fn(this: &mut nsISupports) -> *mut nsISupports,
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
|
@ -8,8 +8,10 @@
|
||||
pub const NSID_LENGTH: u32 = 10;
|
||||
#[repr(C)]
|
||||
pub struct nsID__bindgen_vtable {
|
||||
pub nsID_ToProvidedString:
|
||||
fn(this: &mut nsID, aDest: *mut [::std::os::raw::c_char; 10usize]),
|
||||
pub nsID_ToProvidedString: unsafe extern "C" fn(
|
||||
this: &mut nsID,
|
||||
aDest: *mut [::std::os::raw::c_char; 10usize],
|
||||
),
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
|
@ -7,9 +7,11 @@
|
||||
|
||||
#[repr(C)]
|
||||
pub struct PureVirtualIFace__bindgen_vtable {
|
||||
pub PureVirtualIFace_Foo: fn(this: &mut PureVirtualIFace),
|
||||
pub PureVirtualIFace_Bar:
|
||||
fn(this: &mut PureVirtualIFace, arg1: ::std::os::raw::c_uint),
|
||||
pub PureVirtualIFace_Foo: unsafe extern "C" fn(this: &mut PureVirtualIFace),
|
||||
pub PureVirtualIFace_Bar: unsafe extern "C" fn(
|
||||
this: &mut PureVirtualIFace,
|
||||
arg1: ::std::os::raw::c_uint,
|
||||
),
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
@ -40,7 +42,7 @@ impl Default for PureVirtualIFace {
|
||||
}
|
||||
#[repr(C)]
|
||||
pub struct AnotherInterface__bindgen_vtable {
|
||||
pub AnotherInterface_Baz: fn(this: &mut AnotherInterface),
|
||||
pub AnotherInterface_Baz: unsafe extern "C" fn(this: &mut AnotherInterface),
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
|
@ -7,8 +7,10 @@
|
||||
|
||||
#[repr(C)]
|
||||
pub struct C__bindgen_vtable {
|
||||
pub C_do_thing: fn(this: &mut C, arg1: ::std::os::raw::c_char),
|
||||
pub C_do_thing1: fn(this: &mut C, arg1: ::std::os::raw::c_int),
|
||||
pub C_do_thing:
|
||||
unsafe extern "C" fn(this: &mut C, arg1: ::std::os::raw::c_char),
|
||||
pub C_do_thing1:
|
||||
unsafe extern "C" fn(this: &mut C, arg1: ::std::os::raw::c_int),
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#[repr(C)]
|
||||
pub struct Base__bindgen_vtable {
|
||||
pub Base_AsDerived: fn(this: &mut Base) -> *mut Derived,
|
||||
pub Base_AsDerived: unsafe extern "C" fn(this: &mut Base) -> *mut Derived,
|
||||
}
|
||||
#[repr(C)]
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user