mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-22 17:41:05 +00:00
gstreamer: Mark miniobject wrapper types as #[repr(transparent)]
That way they're treated everywhere exactly like a raw pointer.
This commit is contained in:
parent
8fa1076dfa
commit
8f5e373882
1 changed files with 1 additions and 0 deletions
|
@ -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>,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue