From cdb4a5b84bcc146c0c86e4a380a578b10deaa3ac Mon Sep 17 00:00:00 2001 From: Erlend Graff Date: Mon, 18 Sep 2017 15:28:29 +0200 Subject: [PATCH] DynamicSignal: use NativeType property instead of doing unsafe pointer trickery (which doesn't work with MS csc) https://bugzilla.gnome.org/show_bug.cgi?id=788132 --- sources/custom/DynamicSignal.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sources/custom/DynamicSignal.cs b/sources/custom/DynamicSignal.cs index 1ba5b7305f..47998f64ab 100644 --- a/sources/custom/DynamicSignal.cs +++ b/sources/custom/DynamicSignal.cs @@ -329,12 +329,8 @@ namespace Gst public static object Emit (GLib.Object o, string name, params object[] parameters) { SignalQuery query; - IntPtr type; - unsafe { - // GType is the first field of GTypeInstance->g_class - type = (*(IntPtr*) ((GLib.Object.GTypeInstance*) o.Handle)->g_class); - } - GType gtype = new GType (type); + GType gtype = o.NativeType; + IntPtr type = gtype.Val; string signal_name, signal_detail; uint signal_detail_quark = 0; int colon; @@ -451,4 +447,4 @@ namespace Gst [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void g_signal_query (uint signal_id, ref GSignalQuery query); } -} \ No newline at end of file +}