]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gee: Replace Memory.dup() with GLib.malloc() and Memory.copy()
authorRico Tzschichholz <ricotz@ubuntu.com>
Fri, 5 Feb 2021 15:14:45 +0000 (16:14 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 27 Feb 2021 19:14:18 +0000 (20:14 +0100)
gee/timsort.vala

index 2db14fd3edeaeb73e6bdd2e7dafb8252c258b29f..3cf49c5fbe549c7a4ff469a4b0e6ec5ecf0a2d1f 100644 (file)
@@ -655,7 +655,9 @@ internal class Vala.TimSort<G> {
                }
 
                public void copy () {
-                       new_list = Memory.dup (&list[index], (uint) sizeof (G) * length);
+                       size_t size = sizeof (G) * length;
+                       new_list = malloc (size);
+                       Memory.copy (new_list, &list[index], size);
                        list = new_list;
                        index = 0;
                }