From 64c47fd68baa1ad31c37660dbc3fc73c2776598f Mon Sep 17 00:00:00 2001 From: Christian Hoff Date: Thu, 24 Sep 2009 19:54:07 +0000 Subject: [PATCH] 2009-09-24 Christian Hoff * gtk/Widget.custom: Use Glib.Value's GType.Long support. svn path=/trunk/gtk-sharp/; revision=142602 --- ChangeLog | 4 ++++ gtk/Widget.custom | 5 +---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1314e9d5a..46e68e7a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-09-24 Christian Hoff + + * gtk/Widget.custom: Use Glib.Value's GType.Long support. + 2009-09-23 Mike Kestner * glib/Value.cs: support long and ulong gtypes. still can't construct diff --git a/gtk/Widget.custom b/gtk/Widget.custom index 4934abf60..b86ec5969 100644 --- a/gtk/Widget.custom +++ b/gtk/Widget.custom @@ -303,9 +303,6 @@ private class BindingInvoker { */ static ArrayList binding_invokers; -[DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] -static extern int g_value_get_long (ref GLib.Value val); - static void BindingMarshal_cb (IntPtr raw_closure, IntPtr return_val, uint n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) { try { @@ -315,7 +312,7 @@ static void BindingMarshal_cb (IntPtr raw_closure, IntPtr return_val, uint n_par inst_and_params [idx] = (GLib.Value) Marshal.PtrToStructure (new IntPtr (param_values.ToInt64 () + idx * gvalue_size), typeof (GLib.Value)); Widget w = inst_and_params [0].Val as Widget; - BindingInvoker invoker = binding_invokers [g_value_get_long (ref inst_and_params [1])] as BindingInvoker; + BindingInvoker invoker = binding_invokers [(int) (long) inst_and_params [1]] as BindingInvoker; invoker.Invoke (w); } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, false);