[vala/0.50] gee: Replace Memory.dup() with GLib.malloc() and Memory.copy()
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.50] gee: Replace Memory.dup() with GLib.malloc() and Memory.copy()
- Date: Sun, 28 Feb 2021 08:58:22 +0000 (UTC)
commit ec577ffc25876140a2bed29f07d013df4ec69bf2
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Fri Feb 5 16:14:45 2021 +0100
gee: Replace Memory.dup() with GLib.malloc() and Memory.copy()
gee/timsort.vala | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]