forked from mirrors/gstreamer-rs
Structure is Sync, and StructureRef is Send+Sync
This commit is contained in:
parent
255243c16a
commit
857ed8609c
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