[pango] coverage: Fix the copy implementation
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango] coverage: Fix the copy implementation
- Date: Sat, 13 Jul 2019 02:20:42 +0000 (UTC)
commit c31107167192a18130c4b096ef14ccba90ebf01a
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jul 12 22:19:38 2019 -0400
coverage: Fix the copy implementation
This should do a deep copy.
pango/pango-coverage.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/pango/pango-coverage.c b/pango/pango-coverage.c
index 7f18b583..e982bd3b 100644
--- a/pango/pango-coverage.c
+++ b/pango/pango-coverage.c
@@ -88,7 +88,16 @@ pango_coverage_real_copy (PangoCoverage *coverage)
copy = g_object_new (PANGO_TYPE_COVERAGE, NULL);
if (coverage->chars)
- copy->chars = hb_set_reference (coverage->chars);
+ {
+ int i;
+
+ copy->chars = hb_set_create ();
+ for (i = hb_set_get_min (coverage->chars); i <= hb_set_get_max (coverage->chars); i++)
+ {
+ if (hb_set_has (coverage->chars, (hb_codepoint_t)i))
+ hb_set_add (copy->chars, (hb_codepoint_t)i);
+ }
+ }
return copy;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]