2009-05-13 Sebastian Dröge <sebastian.droege@collabora.co.uk>

* glib/ValueArray.cs: use type specific PtrToStructure marshaling to
	avoid ArgumentExceptions.  [Fixes #503467]

svn path=/trunk/gtk-sharp/; revision=134074
This commit is contained in:
Mike Kestner 2009-05-13 19:04:40 +00:00
parent a979e2211b
commit 95c418fe40
2 changed files with 7 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2009-05-13 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* glib/ValueArray.cs: use type specific PtrToStructure marshaling to
avoid ArgumentExceptions. [Fixes #503467]
2009-05-13 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* glib/Value.cs: Add support for ValueArrays inside GLib.Values.

View file

@ -157,9 +157,8 @@ namespace GLib {
public object this [int index] {
get {
GLib.Value val = Value.Empty;
Marshal.PtrToStructure (g_value_array_get_nth (Handle, (uint) index), val);
return val;
IntPtr raw_val = g_value_array_get_nth (Handle, (uint) index);
return Marshal.PtrToStructure (raw_val, typeof (GLib.Value));
}
}