webrtc: Use #[repr(C)] to get a C-compatible layout for the Signaller struct

This is required by GObject for class/interface and instance structs and
the reason why implementing the `glib::ObjectInterface` trait is unsafe.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/issues/397

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1297>
This commit is contained in:
Sebastian Dröge 2023-08-09 10:32:44 +03:00
parent 045b524bc6
commit 5ee46a214c

View file

@ -5,6 +5,7 @@ use gst::prelude::*;
use gst::subclass::prelude::*;
#[derive(Copy, Clone)]
#[repr(C)]
pub struct Signallable {
_parent: glib::gobject_ffi::GTypeInterface,
pub start: fn(&super::Signallable),