From d2b14a7d18e6c3dcfae10b08f4360d8b77855e38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Tue, 6 Jun 2023 09:06:15 +0000 Subject: [PATCH] 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 --- components/style/gecko/arc_types.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/style/gecko/arc_types.rs b/components/style/gecko/arc_types.rs index 4a9512b44472a..24bf22d69a721 100644 --- a/components/style/gecko/arc_types.rs +++ b/components/style/gecko/arc_types.rs @@ -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); } };