Skip to content

Commit cab7729

Browse files
committed
Bug 1836928 - Change some references to raw pointers in some FFI functions. r=glandium
Even tho rust-lang/rust#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
1 parent a13b4ea commit cab7729

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

servo/components/style/gecko/arc_types.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ use servo_arc::Arc;
2323
macro_rules! impl_simple_arc_ffi {
2424
($ty:ty, $addref:ident, $release:ident) => {
2525
#[no_mangle]
26-
pub unsafe extern "C" fn $addref(obj: &$ty) {
26+
pub unsafe extern "C" fn $addref(obj: *const $ty) {
2727
std::mem::forget(Arc::from_raw_addrefed(obj));
2828
}
2929

3030
#[no_mangle]
31-
pub unsafe extern "C" fn $release(obj: &$ty) {
31+
pub unsafe extern "C" fn $release(obj: *const $ty) {
3232
let _ = Arc::from_raw(obj);
3333
}
3434
};

0 commit comments

Comments
 (0)