mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Change some references to raw pointers in some FFI functions
Even tho https://github.com/rust-lang/rust/issues/112337 is IMO a rust bug, it's easy to work around in our code and it doesn't really affect expressiveness. Differential Revision: https://phabricator.services.mozilla.com/D180065
This commit is contained in:
parent
e792eba7c7
commit
52e2cc5ff0
1 changed files with 2 additions and 2 deletions
|
@ -23,12 +23,12 @@ use servo_arc::Arc;
|
|||
macro_rules! impl_simple_arc_ffi {
|
||||
($ty:ty, $addref:ident, $release:ident) => {
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn $addref(obj: &$ty) {
|
||||
pub unsafe extern "C" fn $addref(obj: *const $ty) {
|
||||
std::mem::forget(Arc::from_raw_addrefed(obj));
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn $release(obj: &$ty) {
|
||||
pub unsafe extern "C" fn $release(obj: *const $ty) {
|
||||
let _ = Arc::from_raw(obj);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue