From b89c7fd3dc505a958dd4b6acec0e0f8e57224fd8 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 21 Nov 2018 12:32:48 -0500 Subject: [PATCH] Allow defining HB_USE_ATEXIT to 0 That's better use of that value than requiring extra macro HB_NO_ATEXIT --- src/hb-common.cc | 10 +++++----- src/hb-ft.cc | 12 ++++++------ src/hb-glib.cc | 6 +++--- src/hb-icu.cc | 6 +++--- src/hb-ot-font.cc | 6 +++--- src/hb-shape.cc | 6 +++--- src/hb-shaper.cc | 6 +++--- src/hb-ucdn.cc | 6 +++--- src/hb-uniscribe.cc | 4 ++-- src/hb.hh | 5 ++++- 10 files changed, 35 insertions(+), 32 deletions(-) diff --git a/src/hb-common.cc b/src/hb-common.cc index 37be8a34e..28b0c2b82 100644 --- a/src/hb-common.cc +++ b/src/hb-common.cc @@ -276,7 +276,7 @@ struct hb_language_item_t { static hb_atomic_ptr_t langs; -#ifdef HB_USE_ATEXIT +#if HB_USE_ATEXIT static void free_langs (void) { @@ -323,7 +323,7 @@ retry: goto retry; } -#ifdef HB_USE_ATEXIT +#if HB_USE_ATEXIT if (!first_lang) atexit (free_langs); /* First person registers atexit() callback. */ #endif @@ -780,7 +780,7 @@ parse_uint32 (const char **pp, const char *end, uint32_t *pv) #ifdef USE_XLOCALE -#ifdef HB_USE_ATEXIT +#if HB_USE_ATEXIT static void free_static_C_locale (void); #endif @@ -791,7 +791,7 @@ static struct hb_C_locale_lazy_loader_t : hb_lazy_loader_tinit (); -#ifdef HB_USE_ATEXIT +#if HB_USE_ATEXIT atexit (free_static_uniscribe_shaper_funcs); #endif @@ -261,7 +261,7 @@ static struct hb_uniscribe_shaper_funcs_lazy_loader_t : hb_lazy_loader_t