summaryrefslogtreecommitdiff
path: root/gee
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2021-02-05 16:14:45 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2021-02-05 16:25:31 +0100
commit40a6753cd7a248b9893b46a758bb72e9ec68d64f (patch)
tree0b4e163dc594870b3c8e3b1f320991bc73d02447 /gee
parentfd58cadec2ea3d8334170fb346a525c27c310e6a (diff)
downloadvala-40a6753cd7a248b9893b46a758bb72e9ec68d64f.tar.gz
gee: Replace Memory.dup() with GLib.malloc() and Memory.copy()
Diffstat (limited to 'gee')
-rw-r--r--gee/timsort.vala4
1 files changed, 3 insertions, 1 deletions
diff --git a/gee/timsort.vala b/gee/timsort.vala
index 2db14fd3e..3cf49c5fb 100644
--- a/gee/timsort.vala
+++ b/gee/timsort.vala
@@ -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;
}