[mono/gtk-sharp] [2 commits] 7d75adf6: glib: fix FindClassProperty()'s copy-paste error
| Newsgroups | gmane.comp.gnome.mono.patches |
|---|---|
| Message-ID | <00000141a4255299-b39c1562-2d18-4620-a1df-a691eb27b233-000000@email.amazonses.com> |
Branch: refs/heads/master
Home: https://github.com/mono/gtk-sharp
Compare: https://github.com/mono/gtk-sharp/compare/5f8e0953cf92...46cd80aea09b
Commit: 7d75adf68ccf1ca61db0edb63b20a146ce4aac79
Author: Andrés G. Aragoneses <[email protected]> (knocte)
Date: 2013-10-10 18:25:23 GMT
URL: https://github.com/mono/gtk-sharp/commit/7d75adf68ccf1ca61db0edb63b20a146ce4aac79
glib: fix FindClassProperty()'s copy-paste error
The implementation of FindClassProperty() was the same as the
implementation of FindInterfaceProperty(), both receiving an iface
instead of a GObjectClass* [1].
The reason of this oversight can well be explained by the fact that
FindClassProperty() is private and not used, actually. However, we
may need it soonish as a good bind to g_object_class_find_property.
[1] https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-class-find-property
Changed paths:
M glib/Object.cs
Modified: glib/Object.cs
===================================================================
@@ -451,9 +451,9 @@ public static void OverrideProperty (IntPtr declaring_class, string name)
static IntPtr FindClassProperty (GType type, string name)
{
- IntPtr g_iface = type.GetDefaultInterfacePtr ();
+ IntPtr g_class = type.GetClassPtr ();
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
- return g_object_class_find_property (g_iface, native_name);
+ return g_object_class_find_property (g_class, native_name);
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
Commit: 46cd80aea09b670ad0b0dd5f03bd2f1b739f2fe9
Author: Bertrand Lorentz <[email protected]> (bl8)
Date: 2013-10-10 20:51:10 GMT
URL: https://github.com/mono/gtk-sharp/commit/46cd80aea09b670ad0b0dd5f03bd2f1b739f2fe9
Merge pull request #72 from knocte/bindinator
glib: fix FindClassProperty()'s copy-paste error
Changed paths:
M glib/Object.cs
Modified: glib/Object.cs
===================================================================
@@ -451,9 +451,9 @@ public static void OverrideProperty (IntPtr declaring_class, string name)
static IntPtr FindClassProperty (GType type, string name)
{
- IntPtr g_iface = type.GetDefaultInterfacePtr ();
+ IntPtr g_class = type.GetClassPtr ();
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
- return g_object_class_find_property (g_iface, native_name);
+ return g_object_class_find_property (g_class, native_name);
}
[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches