From f978c8f7053becd5f8798b51727a977f520214fb Mon Sep 17 00:00:00 2001 From: Stephan Sundermann Date: Fri, 11 Oct 2013 11:13:08 +0200 Subject: [PATCH] GLib.Object: Fixed FindClassProperty g_object_class_find_property takes a GObjectClass which can be retrieved by reading an IntPtr from the GObject's Handle --- glib/Object.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/glib/Object.cs b/glib/Object.cs index 9c17ca309..c1ed9642c 100644 --- a/glib/Object.cs +++ b/glib/Object.cs @@ -449,11 +449,11 @@ namespace GLib { [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr g_object_class_find_property (IntPtr klass, IntPtr name); - static IntPtr FindClassProperty (GType type, string name) + static IntPtr FindClassProperty (GLib.Object o, string name) { - IntPtr g_class = type.GetClassPtr (); + IntPtr gobjectclass = Marshal.ReadIntPtr (o.Handle); IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); - return g_object_class_find_property (g_class, native_name); + return g_object_class_find_property (gobjectclass, native_name); } [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]