mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-12-23 16:40:35 +00:00
miniobject: implement ptr_eq() on ref type
This commit is contained in:
parent
c0fd8a8aad
commit
c5d19e7c80
2 changed files with 5 additions and 7 deletions
|
@ -758,13 +758,6 @@ impl BufferRef {
|
||||||
) -> Result<BufferRefCursor<&mut BufferRef>, glib::BoolError> {
|
) -> Result<BufferRefCursor<&mut BufferRef>, glib::BoolError> {
|
||||||
BufferRefCursor::new_writable(self)
|
BufferRefCursor::new_writable(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
// rustdoc-stripper-ignore-next
|
|
||||||
/// Returns `true` if the two [`BufferRef`] point to the same buffer.
|
|
||||||
pub fn ptr_eq(this: &BufferRef, other: &BufferRef) -> bool {
|
|
||||||
skip_assert_initialized!();
|
|
||||||
this.as_ptr() == other.as_ptr()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
macro_rules! define_meta_iter(
|
macro_rules! define_meta_iter(
|
||||||
|
|
|
@ -431,6 +431,11 @@ macro_rules! mini_object_wrapper (
|
||||||
&mut *(self.as_mut_ptr() as *mut $crate::miniobject::MiniObjectRef)
|
&mut *(self.as_mut_ptr() as *mut $crate::miniobject::MiniObjectRef)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn ptr_eq(this: &$ref_name, other: &$ref_name) -> bool {
|
||||||
|
skip_assert_initialized!();
|
||||||
|
this.as_ptr() == other.as_ptr()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl $crate::glib::translate::GlibPtrDefault for $ref_name {
|
impl $crate::glib::translate::GlibPtrDefault for $ref_name {
|
||||||
|
|
Loading…
Reference in a new issue