diff --git a/ChangeLog b/ChangeLog index 15c051ffb..947ad3f0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-05-10 Mike Kestner + + * glib/Value.cs : fix GBoxed GLib.Value setting. + [fixes #58229] + 2004-05-10 Mike Kestner * gtk/Gtk.metadata : change return-type on Global.EventsPending diff --git a/glib/Value.cs b/glib/Value.cs index ef387bd70..0043f1bb4 100755 --- a/glib/Value.cs +++ b/glib/Value.cs @@ -291,9 +291,6 @@ namespace GLib { [DllImport("libgobject-2.0-0.dll")] static extern bool g_type_is_a (IntPtr type, IntPtr is_a_type); - [DllImport("libgobject-2.0-0.dll")] - static extern void g_value_take_boxed (ref Value val, IntPtr data); - public object Val { get { @@ -357,7 +354,8 @@ namespace GLib { } buf = Marshal.AllocHGlobal (Marshal.SizeOf (value.GetType())); Marshal.StructureToPtr (value, buf, false); - g_value_take_boxed (ref this, buf); + g_value_set_boxed (ref this, buf); + Marshal.FreeHGlobal (buf); } else throw new Exception ("Unknown type"); }