From 22add1100a016f521e92fa31beba5bcf951fc53e Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Wed, 7 May 2008 02:13:16 +0000 Subject: [PATCH] 2008-05-06 Mike Kestner * glib/Object.cs: revert the connection optimization from r102349. It breaks under the current CellRenderer implementation which probably can't be reworked compatibly to take advantage of this code. * glib/SignalClosure.cs: use IntPtr.ToInt64 instead of (long) since the cast apparently has issues on bleeding edge mono. svn path=/trunk/gtk-sharp/; revision=102693 --- ChangeLog | 8 ++++++++ glib/Object.cs | 12 ------------ glib/SignalClosure.cs | 2 +- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index cb85df4c2..186f5bf60 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-05-06 Mike Kestner + + * glib/Object.cs: revert the connection optimization from r102349. + It breaks under the current CellRenderer implementation which probably + can't be reworked compatibly to take advantage of this code. + * glib/SignalClosure.cs: use IntPtr.ToInt64 instead of (long) since + the cast apparently has issues on bleeding edge mono. + 2008-05-06 Mike Kestner * gtk/Gtk.metadata: mark Rc.DefaultFiles accessors as null_term_array. diff --git a/glib/Object.cs b/glib/Object.cs index fa2eb0263..e22453376 100644 --- a/glib/Object.cs +++ b/glib/Object.cs @@ -139,18 +139,6 @@ namespace GLib { if (baseinfo == minfo) continue; - bool ignore = false; - for (Type parent = t.BaseType; parent != baseinfo.DeclaringType; parent = parent.BaseType) { - MethodInfo pinfo = parent.GetMethod (minfo.Name, BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.DeclaredOnly); - if (pinfo != null) { - ignore = true; - break; - } - } - - if (ignore) - continue; - foreach (object attr in baseinfo.GetCustomAttributes (typeof (DefaultSignalHandlerAttribute), false)) { DefaultSignalHandlerAttribute sigattr = attr as DefaultSignalHandlerAttribute; MethodInfo connector = sigattr.Type.GetMethod (sigattr.ConnectionMethod, BindingFlags.Static | BindingFlags.NonPublic); diff --git a/glib/SignalClosure.cs b/glib/SignalClosure.cs index 138e6c0be..c5738f271 100644 --- a/glib/SignalClosure.cs +++ b/glib/SignalClosure.cs @@ -135,7 +135,7 @@ namespace GLib { SignalArgs args = Activator.CreateInstance (closure.args_type, new object [0]) as SignalArgs; args.Args = new object [n_param_vals - 1]; for (int i = 1; i < n_param_vals; i++) { - IntPtr ptr = new IntPtr ((long)param_values + i * Marshal.SizeOf (typeof (Value))); + IntPtr ptr = new IntPtr (param_values.ToInt64 () + i * Marshal.SizeOf (typeof (Value))); Value val = (Value) Marshal.PtrToStructure (ptr, typeof (Value)); args.Args [i - 1] = val.Val; }