Commit 857ed860 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

Structure is Sync, and StructureRef is Send+Sync

parent 255243c1
......@@ -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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment