2007-10-01 Mike Kestner <mkestner@novell.com>

* gtk/TreePath.custom: use Marshal.Copy to copy indices array.

svn path=/trunk/gtk-sharp/; revision=86731
This commit is contained in:
Mike Kestner 2007-10-02 03:06:40 +00:00
parent 70bd5d56e9
commit 2b3aaeb652
2 changed files with 6 additions and 5 deletions

View file

@ -1,4 +1,8 @@
2007-09-21 Mike Kestner <mkestner@novell.com>
2007-10-01 Mike Kestner <mkestner@novell.com>
* gtk/TreePath.custom: use Marshal.Copy to copy indices array.
2007-10-01 Mike Kestner <mkestner@novell.com>
* glib/Object.cs: add ctor (), which invokes CreateNativeObject
to allow direct subclasses that do all the registration automatically.

View file

@ -21,10 +21,7 @@
get {
IntPtr ptr = gtk_tree_path_get_indices(Handle);
int [] arr = new int [Depth];
int isize = Marshal.SizeOf (typeof (int));
for (int i = 0; i < arr.Length; i++)
arr [i] = Marshal.ReadInt32 ( ptr, i * isize);
Marshal.Copy (ptr, arr, 0, Depth);
return arr;
}
}