gstreamer: Mark miniobject wrapper types as #[repr(transparent)]

That way they're treated everywhere exactly like a raw pointer.
This commit is contained in:
Sebastian Dröge 2022-01-17 19:54:37 +02:00 committed by Sebastian Dröge
parent 8fa1076dfa
commit 8f5e373882

View file

@ -12,6 +12,7 @@ pub trait IsMiniObject:
#[macro_export] #[macro_export]
macro_rules! mini_object_wrapper ( macro_rules! mini_object_wrapper (
($name:ident, $ref_name:ident, $ffi_name:path) => { ($name:ident, $ref_name:ident, $ffi_name:path) => {
#[repr(transparent)]
pub struct $name { pub struct $name {
obj: std::ptr::NonNull<$ffi_name>, obj: std::ptr::NonNull<$ffi_name>,
} }