[HarfBuzz] harfbuzz: Branch 'master' - 2 commits

Behdad Esfahbod behdad at kemper.freedesktop.org
Wed Feb 7 17:27:03 UTC 2018


 src/hb-aat-layout-common-private.hh |    6 +++++-
 src/hb-aat-layout-morx-table.hh     |    2 +-
 test/api/test-subset.c              |    4 ++++
 3 files changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 126ffdbe95020c04dc61413690febd8a56bf264f
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Wed Feb 7 12:26:41 2018 -0500

    [aat] Fix debug compile

diff --git a/src/hb-aat-layout-common-private.hh b/src/hb-aat-layout-common-private.hh
index fc04941a..a421a4cf 100644
--- a/src/hb-aat-layout-common-private.hh
+++ b/src/hb-aat-layout-common-private.hh
@@ -698,11 +698,15 @@ struct hb_aat_apply_context_t :
   hb_buffer_t *buffer;
   hb_sanitize_context_t sanitizer;
 
+  /* Unused. For debug tracing only. */
+  unsigned int lookup_index;
+  unsigned int debug_depth;
+
   inline hb_aat_apply_context_t (hb_font_t *font_,
 				 hb_buffer_t *buffer_,
 				 hb_blob_t *table) :
 		font (font_), face (font->face), buffer (buffer_),
-		sanitizer ()
+		sanitizer (), lookup_index (0), debug_depth (0)
   {
     sanitizer.init (table);
     sanitizer.num_glyphs = face->get_num_glyphs ();
diff --git a/src/hb-aat-layout-morx-table.hh b/src/hb-aat-layout-morx-table.hh
index 4e75dd3a..f16f6a4a 100644
--- a/src/hb-aat-layout-morx-table.hh
+++ b/src/hb-aat-layout-morx-table.hh
@@ -280,7 +280,7 @@ struct ContextualSubtable
   {
     TRACE_SANITIZE (this);
 
-    unsigned int num_entries;
+    unsigned int num_entries = 0;
     if (unlikely (!machine.sanitize (c, &num_entries))) return false;
 
     unsigned int num_lookups = 0;
commit 8cb8bfd5b5eff75247cd447f3766294fdff2d644
Author: Ebrahim Byagowi <ebrahim at gnu.org>
Date:   Tue Feb 6 20:40:42 2018 +0330

    [test] Fix test-subset on old distros (#758)
    
    https://developer.gnome.org/glib/stable/glib-Testing.html#g-assert-cmpmem

diff --git a/test/api/test-subset.c b/test/api/test-subset.c
index b6986ce2..33a1ef29 100644
--- a/test/api/test-subset.c
+++ b/test/api/test-subset.c
@@ -26,6 +26,10 @@
 
 #include "hb-test.h"
 
+#ifndef g_assert_cmpmem
+#define g_assert_cmpmem(m1, l1, m2, l2) g_assert_true (l1 == l2 && memcmp (m1, m2, l1) == 0)
+#endif
+
 /* Unit tests for hb-subset.h */
 
 static const char test_data[] = { 0, 0, 1, 0 };


More information about the HarfBuzz mailing list