diff --git a/src/hb-common.cc b/src/hb-common.cc index d308f3621c8289f9d85bbb90e1713276dd3df93c..8837cefbf7d118b31d8503473153c57c1eb0f554 100644 --- a/src/hb-common.cc +++ b/src/hb-common.cc @@ -235,7 +235,7 @@ struct hb_language_item_t { static hb_language_item_t *langs; #ifdef HB_USE_ATEXIT -static inline +static void free_langs (void) { while (langs) { diff --git a/src/hb-ft.cc b/src/hb-ft.cc index 883f26f743fa75c68ffca451d7a44a35dc0b61f9..7e75ba98d40c05d382de2a71c18452714d765ace 100644 --- a/src/hb-ft.cc +++ b/src/hb-ft.cc @@ -467,11 +467,13 @@ hb_ft_font_create_referenced (FT_Face ft_face) static FT_Library ft_library; -static inline +#ifdef HB_USE_ATEXIT +static void free_ft_library (void) { FT_Done_FreeType (ft_library); } +#endif static FT_Library get_ft_library (void) diff --git a/src/hb-shape.cc b/src/hb-shape.cc index 74747f88b89f7cf719c3a391eb895684156035d5..100fb3cd76ea8ffa30d471bb158f3cca8b74797a 100644 --- a/src/hb-shape.cc +++ b/src/hb-shape.cc @@ -279,11 +279,13 @@ hb_feature_to_string (hb_feature_t *feature, static const char **static_shaper_list; -static inline +#ifdef HB_USE_ATEXIT +static void free_static_shaper_list (void) { free (static_shaper_list); } +#endif /** * hb_shape_list_shapers: diff --git a/src/hb-shaper.cc b/src/hb-shaper.cc index 6ae260138211abc80f86a0118f804caa410128cf..580b95c84b4d0d30d9da923a6349d6a34a3ebeb6 100644 --- a/src/hb-shaper.cc +++ b/src/hb-shaper.cc @@ -40,12 +40,14 @@ static const hb_shaper_pair_t all_shapers[] = { static const hb_shaper_pair_t *static_shapers; -static inline +#ifdef HB_USE_ATEXIT +static void free_static_shapers (void) { if (unlikely (static_shapers != all_shapers)) free ((void *) static_shapers); } +#endif const hb_shaper_pair_t * _hb_shapers_get (void)