From a52bc039c33b3c01dbb96b815dc24df7f03bc4be Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Tue, 9 Oct 2018 00:56:33 -0400 Subject: [PATCH] Properly remove deprecated stuff --- src/hb-glib.cc | 15 ++++++--------- src/hb-icu.cc | 15 ++++++--------- src/hb-ucdn.cc | 15 ++++++--------- 3 files changed, 18 insertions(+), 27 deletions(-) diff --git a/src/hb-glib.cc b/src/hb-glib.cc index fab3cddb3..a34acbba1 100644 --- a/src/hb-glib.cc +++ b/src/hb-glib.cc @@ -30,7 +30,6 @@ #include "hb-glib.h" -#include "hb-unicode.hh" #include "hb-machinery.hh" @@ -202,8 +201,6 @@ hb_glib_unicode_combining_class (hb_unicode_funcs_t *ufuncs HB_UNUSED, return (hb_unicode_combining_class_t) g_unichar_combining_class (unicode); } -#define hb_glib_unicode_eastasian_width nullptr - static hb_unicode_general_category_t hb_glib_unicode_general_category (hb_unicode_funcs_t *ufuncs HB_UNUSED, hb_codepoint_t unicode, @@ -328,8 +325,6 @@ hb_glib_unicode_decompose (hb_unicode_funcs_t *ufuncs HB_UNUSED, return ret; } -#define hb_glib_unicode_decompose_compatibility nullptr - #ifdef HB_USE_ATEXIT static void free_static_glib_funcs (void); @@ -341,10 +336,12 @@ static struct hb_glib_unicode_funcs_lazy_loader_t : hb_unicode_funcs_lazy_loader { hb_unicode_funcs_t *funcs = hb_unicode_funcs_create (nullptr); -#define HB_UNICODE_FUNC_IMPLEMENT(name) \ - hb_unicode_funcs_set_##name##_func (funcs, hb_glib_unicode_##name, nullptr, nullptr); - HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS -#undef HB_UNICODE_FUNC_IMPLEMENT + hb_unicode_funcs_set_combining_class_func (funcs, hb_glib_unicode_combining_class, nullptr, nullptr); + hb_unicode_funcs_set_general_category_func (funcs, hb_glib_unicode_general_category, nullptr, nullptr); + hb_unicode_funcs_set_mirroring_func (funcs, hb_glib_unicode_mirroring, nullptr, nullptr); + hb_unicode_funcs_set_script_func (funcs, hb_glib_unicode_script, nullptr, nullptr); + hb_unicode_funcs_set_compose_func (funcs, hb_glib_unicode_compose, nullptr, nullptr); + hb_unicode_funcs_set_decompose_func (funcs, hb_glib_unicode_decompose, nullptr, nullptr); hb_unicode_funcs_make_immutable (funcs); diff --git a/src/hb-icu.cc b/src/hb-icu.cc index 8dbeaddd6..83a15e7f2 100644 --- a/src/hb-icu.cc +++ b/src/hb-icu.cc @@ -31,7 +31,6 @@ #include "hb-icu.h" -#include "hb-unicode.hh" #include "hb-machinery.hh" #include @@ -73,8 +72,6 @@ hb_icu_unicode_combining_class (hb_unicode_funcs_t *ufuncs HB_UNUSED, return (hb_unicode_combining_class_t) u_getCombiningClass (unicode); } -#define hb_icu_unicode_eastasian_width nullptr - static hb_unicode_general_category_t hb_icu_unicode_general_category (hb_unicode_funcs_t *ufuncs HB_UNUSED, hb_codepoint_t unicode, @@ -292,8 +289,6 @@ hb_icu_unicode_decompose (hb_unicode_funcs_t *ufuncs HB_UNUSED, return ret; } -#define hb_icu_unicode_decompose_compatibility nullptr - #ifdef HB_USE_ATEXIT static void free_static_icu_funcs (void); @@ -312,10 +307,12 @@ static struct hb_icu_unicode_funcs_lazy_loader_t : hb_unicode_funcs_lazy_loader_ hb_unicode_funcs_t *funcs = hb_unicode_funcs_create (nullptr); -#define HB_UNICODE_FUNC_IMPLEMENT(name) \ - hb_unicode_funcs_set_##name##_func (funcs, hb_icu_unicode_##name, user_data, nullptr); - HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS -#undef HB_UNICODE_FUNC_IMPLEMENT + hb_unicode_funcs_set_combining_class_func (funcs, hb_icu_unicode_combining_class, nullptr, nullptr); + hb_unicode_funcs_set_general_category_func (funcs, hb_icu_unicode_general_category, nullptr, nullptr); + hb_unicode_funcs_set_mirroring_func (funcs, hb_icu_unicode_mirroring, nullptr, nullptr); + hb_unicode_funcs_set_script_func (funcs, hb_icu_unicode_script, nullptr, nullptr); + hb_unicode_funcs_set_compose_func (funcs, hb_icu_unicode_compose, nullptr, nullptr); + hb_unicode_funcs_set_decompose_func (funcs, hb_icu_unicode_decompose, nullptr, nullptr); hb_unicode_funcs_make_immutable (funcs); diff --git a/src/hb-ucdn.cc b/src/hb-ucdn.cc index 3edd17eaa..3179683c2 100644 --- a/src/hb-ucdn.cc +++ b/src/hb-ucdn.cc @@ -16,7 +16,6 @@ #include "hb.hh" -#include "hb-unicode.hh" #include "hb-machinery.hh" #include "ucdn.h" @@ -182,8 +181,6 @@ hb_ucdn_combining_class(hb_unicode_funcs_t *ufuncs HB_UNUSED, return (hb_unicode_combining_class_t) ucdn_get_combining_class(unicode); } -#define hb_ucdn_eastasian_width nullptr - static hb_unicode_general_category_t hb_ucdn_general_category(hb_unicode_funcs_t *ufuncs HB_UNUSED, hb_codepoint_t unicode, @@ -224,8 +221,6 @@ hb_ucdn_decompose(hb_unicode_funcs_t *ufuncs HB_UNUSED, return ucdn_decompose(ab, a, b); } -#define hb_ucdn_decompose_compatibility nullptr - #ifdef HB_USE_ATEXIT static void free_static_ucdn_funcs (void); @@ -237,10 +232,12 @@ static struct hb_ucdn_unicode_funcs_lazy_loader_t : hb_unicode_funcs_lazy_loader { hb_unicode_funcs_t *funcs = hb_unicode_funcs_create (nullptr); -#define HB_UNICODE_FUNC_IMPLEMENT(name) \ - hb_unicode_funcs_set_##name##_func (funcs, hb_ucdn_##name, nullptr, nullptr); - HB_UNICODE_FUNCS_IMPLEMENT_CALLBACKS -#undef HB_UNICODE_FUNC_IMPLEMENT + hb_unicode_funcs_set_combining_class_func (funcs, hb_ucdn_combining_class, nullptr, nullptr); + hb_unicode_funcs_set_general_category_func (funcs, hb_ucdn_general_category, nullptr, nullptr); + hb_unicode_funcs_set_mirroring_func (funcs, hb_ucdn_mirroring, nullptr, nullptr); + hb_unicode_funcs_set_script_func (funcs, hb_ucdn_script, nullptr, nullptr); + hb_unicode_funcs_set_compose_func (funcs, hb_ucdn_compose, nullptr, nullptr); + hb_unicode_funcs_set_decompose_func (funcs, hb_ucdn_decompose, nullptr, nullptr); hb_unicode_funcs_make_immutable (funcs);