2004-05-10 Mike Kestner <mkestner@ximian.com>

* glib/Value.cs : fix GBoxed GLib.Value setting.
	[fixes #58229]

svn path=/trunk/gtk-sharp/; revision=27045
This commit is contained in:
Mike Kestner 2004-05-10 18:54:14 +00:00
parent 7f46d29ab4
commit 27a3f69caf
2 changed files with 7 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2004-05-10 Mike Kestner <mkestner@ximian.com>
* glib/Value.cs : fix GBoxed GLib.Value setting.
[fixes #58229]
2004-05-10 Mike Kestner <mkestner@ximian.com>
* gtk/Gtk.metadata : change return-type on Global.EventsPending

View File

@ -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");
}