From 165ef55e57194bb443b69830d3ddcbefa5d04e95 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 10 Jun 2022 06:20:10 -0600 Subject: [PATCH] [indic-generator] Move INDIC_COMBINE_CATEGORIES here --- src/gen-indic-table.py | 3 +++ src/hb-ot-shaper-indic-table.cc | 3 +++ src/hb-ot-shaper-indic.hh | 2 -- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gen-indic-table.py b/src/gen-indic-table.py index 0a422939b..e699277a0 100755 --- a/src/gen-indic-table.py +++ b/src/gen-indic-table.py @@ -553,6 +553,8 @@ for s in what_short: print () print ('#pragma GCC diagnostic pop') print () +print ("#define INDIC_COMBINE_CATEGORIES(S,M) ((S) | ((M) << 8))") +print () print ("#define _(S,M) INDIC_COMBINE_CATEGORIES (%s_##S, %s_##M)" % tuple(what_short)) print () print () @@ -648,6 +650,7 @@ print (" return _(X,X);") print ("}") print () print ("#undef _") +print ("#undef INDIC_COMBINE_CATEGORIES") for i in range (2): print () vv = sorted (values[i].keys ()) diff --git a/src/hb-ot-shaper-indic-table.cc b/src/hb-ot-shaper-indic-table.cc index 0374b44d7..c30c06669 100644 --- a/src/hb-ot-shaper-indic-table.cc +++ b/src/hb-ot-shaper-indic-table.cc @@ -74,6 +74,8 @@ #pragma GCC diagnostic pop +#define INDIC_COMBINE_CATEGORIES(S,M) ((S) | ((M) << 8)) + #define _(S,M) INDIC_COMBINE_CATEGORIES (_OT_##S, _POS_##M) @@ -482,6 +484,7 @@ hb_indic_get_categories (hb_codepoint_t u) } #undef _ +#undef INDIC_COMBINE_CATEGORIES #undef _OT_A #undef _OT_As diff --git a/src/hb-ot-shaper-indic.hh b/src/hb-ot-shaper-indic.hh index bdbfa7ee0..91c64badc 100644 --- a/src/hb-ot-shaper-indic.hh +++ b/src/hb-ot-shaper-indic.hh @@ -133,8 +133,6 @@ enum ot_position_t { }; -#define INDIC_COMBINE_CATEGORIES(S,M) ((S) | ((M) << 8)) - HB_INTERNAL uint16_t hb_indic_get_categories (hb_codepoint_t u);