mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-29 21:11:14 +00:00
Structure is Sync, and StructureRef is Send+Sync
This commit is contained in:
parent
c21f98d2c3
commit
d317e15c2e
1 changed files with 4 additions and 0 deletions
|
@ -29,6 +29,7 @@ use gobject_ffi;
|
|||
|
||||
pub struct Structure(ptr::NonNull<StructureRef>, PhantomData<StructureRef>);
|
||||
unsafe impl Send for Structure {}
|
||||
unsafe impl Sync for Structure {}
|
||||
|
||||
impl Structure {
|
||||
pub fn builder(name: &str) -> Builder {
|
||||
|
@ -295,6 +296,9 @@ impl GlibPtrDefault for Structure {
|
|||
#[repr(C)]
|
||||
pub struct StructureRef(ffi::GstStructure);
|
||||
|
||||
unsafe impl Send for StructureRef {}
|
||||
unsafe impl Sync for StructureRef {}
|
||||
|
||||
impl StructureRef {
|
||||
pub unsafe fn from_glib_borrow<'a>(ptr: *const ffi::GstStructure) -> &'a StructureRef {
|
||||
assert!(!ptr.is_null());
|
||||
|
|
Loading…
Reference in a new issue