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
parent 1fbb6a3a1c
commit 03087ddfb0

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>,
} }