diff --git a/ChangeLog b/ChangeLog index de261df65..f1a0f4348 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ -2007-09-21 Mike Kestner +2007-10-01 Mike Kestner + + * gtk/TreePath.custom: use Marshal.Copy to copy indices array. + +2007-10-01 Mike Kestner * glib/Object.cs: add ctor (), which invokes CreateNativeObject to allow direct subclasses that do all the registration automatically. diff --git a/gtk/TreePath.custom b/gtk/TreePath.custom index 3a4d74da5..6491748a9 100644 --- a/gtk/TreePath.custom +++ b/gtk/TreePath.custom @@ -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; } }