diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-02-05 16:25:11 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-02-05 17:34:20 +0100 |
commit | 63d2b88e2652606b0571ff94c620949a6969b1fb (patch) | |
tree | ebb23c983bf063a3e296aac9494fa1e47da4cd01 | |
parent | 8b76b8cd0d1dafcf0a48048e6742a34d2c5e15c2 (diff) | |
download | libgee-63d2b88e2652606b0571ff94c620949a6969b1fb.tar.gz |
Replace Memory.dup() with GLib.malloc() and Memory.copy()
-rw-r--r-- | gee/Makefile.am | 1 | ||||
-rw-r--r-- | gee/timsort.vala | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/gee/Makefile.am b/gee/Makefile.am index 42e0a89..5634bcb 100644 --- a/gee/Makefile.am +++ b/gee/Makefile.am @@ -121,6 +121,7 @@ libgee_0_8_la_VALAFLAGS = \ -h gee-internals.h \ --internal-vapi gee-internals-0.8.vapi \ --library gee-0.8 --gir Gee-0.8.gir \ + --vapi-comments \ --pkg gio-2.0 \ --vapidir $(top_srcdir)/utils --pkg geeutils \ $(COVERAGE_VALAFLAGS) \ diff --git a/gee/timsort.vala b/gee/timsort.vala index d3c5ae9..01710be 100644 --- a/gee/timsort.vala +++ b/gee/timsort.vala @@ -655,7 +655,9 @@ internal class Gee.TimSort<G> : Object { } 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; } |