Author: mkestner
Date: 2007-10-01 23:06:40 -0400 (Mon, 01 Oct 2007)
New Revision: 86731

Modified:
   trunk/gtk-sharp/ChangeLog
   trunk/gtk-sharp/gtk/TreePath.custom
Log:

2007-10-01  Mike Kestner  <[EMAIL PROTECTED]>

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


Modified: trunk/gtk-sharp/ChangeLog
===================================================================
--- trunk/gtk-sharp/ChangeLog   2007-10-02 03:02:43 UTC (rev 86730)
+++ trunk/gtk-sharp/ChangeLog   2007-10-02 03:06:40 UTC (rev 86731)
@@ -1,5 +1,9 @@
-2007-09-21  Mike Kestner  <[EMAIL PROTECTED]>
+2007-10-01  Mike Kestner  <[EMAIL PROTECTED]>
 
+       * gtk/TreePath.custom: use Marshal.Copy to copy indices array.
+
+2007-10-01  Mike Kestner  <[EMAIL PROTECTED]>
+
        * glib/Object.cs: add ctor (), which invokes CreateNativeObject
        to allow direct subclasses that do all the registration automatically.
 

Modified: trunk/gtk-sharp/gtk/TreePath.custom
===================================================================
--- trunk/gtk-sharp/gtk/TreePath.custom 2007-10-02 03:02:43 UTC (rev 86730)
+++ trunk/gtk-sharp/gtk/TreePath.custom 2007-10-02 03:06:40 UTC (rev 86731)
@@ -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;
                        }
                }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to