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:
parent
7f46d29ab4
commit
27a3f69caf
2 changed files with 7 additions and 4 deletions
|
@ -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>
|
2004-05-10 Mike Kestner <mkestner@ximian.com>
|
||||||
|
|
||||||
* gtk/Gtk.metadata : change return-type on Global.EventsPending
|
* gtk/Gtk.metadata : change return-type on Global.EventsPending
|
||||||
|
|
|
@ -291,9 +291,6 @@ namespace GLib {
|
||||||
[DllImport("libgobject-2.0-0.dll")]
|
[DllImport("libgobject-2.0-0.dll")]
|
||||||
static extern bool g_type_is_a (IntPtr type, IntPtr is_a_type);
|
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
|
public object Val
|
||||||
{
|
{
|
||||||
get {
|
get {
|
||||||
|
@ -357,7 +354,8 @@ namespace GLib {
|
||||||
}
|
}
|
||||||
buf = Marshal.AllocHGlobal (Marshal.SizeOf (value.GetType()));
|
buf = Marshal.AllocHGlobal (Marshal.SizeOf (value.GetType()));
|
||||||
Marshal.StructureToPtr (value, buf, false);
|
Marshal.StructureToPtr (value, buf, false);
|
||||||
g_value_take_boxed (ref this, buf);
|
g_value_set_boxed (ref this, buf);
|
||||||
|
Marshal.FreeHGlobal (buf);
|
||||||
} else
|
} else
|
||||||
throw new Exception ("Unknown type");
|
throw new Exception ("Unknown type");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue