[Gtk-sharp-list] small warning fix in glib-sharp
John Luke
john.luke@gmail.com
Fri, 18 Feb 2005 12:44:56 -0500
--=-nlKjhj9qqrR2XGmbp0Vq
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hey,
A small warning fix I ran across looking at something else in glib. Ok
to commit?
--=-nlKjhj9qqrR2XGmbp0Vq
Content-Disposition: attachment; filename=warning_fix.patch
Content-Type: text/x-patch; name=warning_fix.patch; charset=UTF-8
Content-Transfer-Encoding: 7bit
Index: glib/Object.cs
===================================================================
--- glib/Object.cs (revision 40837)
+++ glib/Object.cs (working copy)
@@ -139,7 +139,7 @@
object[] parms = {gtype, t};
BindingFlags flags = BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy;
foreach (MethodInfo minfo in t.GetMethods(flags))
- foreach (object attr in minfo.GetCustomAttributes (typeof (ClassInitializerAttribute), true))
+ if (minfo.IsDefined (typeof (ClassInitializerAttribute), true))
minfo.Invoke (null, parms);
}
Index: ChangeLog
===================================================================
--- ChangeLog (revision 40837)
+++ ChangeLog (working copy)
@@ -1,3 +1,8 @@
+2005-02-17 John Luke <john.luke@gmail.com>
+
+ * glib/Object.cs: use IsDefined to check for ClassInitializer
+ attribute, fixes a warning and is supposedly better for performance
+
2005-02-17 Mike Kestner <mkestner@novell.com>
* */Makefile.am : define SYMBOLS if it isn't already to fix breakage
--=-nlKjhj9qqrR2XGmbp0Vq--