mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-07-10 09:07:26 +00:00
Merge pull request #73 from xDarkice/master
GLib.Object: Fix FindClassProperty method
This commit is contained in:
commit
c83c196150
|
@ -449,11 +449,11 @@ namespace GLib {
|
||||||
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
static extern IntPtr g_object_class_find_property (IntPtr klass, IntPtr name);
|
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);
|
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)]
|
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||||
|
|
Loading…
Reference in a new issue