Also implement copy() returning the wrapper miniobject on the reference type

This way CapsRef::copy() will return a Caps, and not a GstRc<CapsRef>.
This commit is contained in:
Sebastian Dröge 2018-10-05 16:36:15 +03:00
parent 9265cc8232
commit c56e9ddfea

View file

@ -517,7 +517,13 @@ macro_rules! gst_define_mini_object_wrapper(
}
pub fn copy(&self) -> Self {
$name(self.0.copy())
self.0.copy()
}
}
impl $ref_name {
fn copy(&self) -> $name {
$name(<$ref_name as $crate::MiniObject>::copy(self))
}
}