[HarfBuzz] harfbuzz: Branch 'master' - 3 commits
Behdad Esfahbod
behdad at kemper.freedesktop.org
Thu Aug 23 18:30:28 UTC 2018
src/hb-aat-layout.cc | 17 -----
src/hb-common.cc | 3 -
src/hb-ft.cc | 5 +
src/hb-glib.cc | 3 -
src/hb-icu.cc | 3 -
src/hb-ot-color.cc | 6 --
src/hb-ot-font.cc | 3 -
src/hb-ot-layout-gpos-table.hh | 6 --
src/hb-ot-layout-gsub-table.hh | 8 +-
src/hb-ot-layout-gsubgpos-private.hh | 2
src/hb-ot-layout-private.hh | 12 ++--
src/hb-ot-layout.cc | 100 +++++++++++++++++------------------
src/hb-ot-math.cc | 2
src/hb-ot-shape.cc | 5 -
src/hb-ot-var.cc | 4 -
src/hb-shape.cc | 4 +
src/hb-shaper.cc | 3 -
17 files changed, 88 insertions(+), 98 deletions(-)
New commits:
commit 1c6b3693245d38103cab224d75262d45dc88c71c
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Wed Aug 15 20:12:25 2018 -0700
[ot] Rename hb_ot_layout_t to hb_ot_face_data_t
diff --git a/src/hb-aat-layout.cc b/src/hb-aat-layout.cc
index 36d4037a..fc706d6b 100644
--- a/src/hb-aat-layout.cc
+++ b/src/hb-aat-layout.cc
@@ -51,25 +51,12 @@ _get_morx (hb_face_t *face, hb_blob_t **blob = nullptr)
*blob = hb_blob_get_empty ();
return Null(AAT::morx);
}
- hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
- const AAT::morx& morx = *(layout->table.morx.get ());
+ const AAT::morx& morx = *(hb_ot_face_data (face)->table.morx.get ());
if (blob)
- *blob = layout->table.morx.get_blob ();
+ *blob = hb_ot_face_data (face)->table.morx.get_blob ();
return morx;
}
-// static inline void
-// _hb_aat_layout_create (hb_face_t *face)
-// {
-// hb_blob_t *morx_blob = hb_sanitize_context_t ().reference_table<AAT::morx> (face);
-// morx_blob->as<AAT::morx> ();
-
-// if (0)
-// {
-// morx_blob->as<AAT::Lookup<OT::GlyphID> > ()->get_value (1, face->get_num_glyphs ());
-// }
-// }
-
void
hb_aat_layout_substitute (hb_font_t *font, hb_buffer_t *buffer)
{
diff --git a/src/hb-ot-color.cc b/src/hb-ot-color.cc
index 86171c63..44550d78 100644
--- a/src/hb-ot-color.cc
+++ b/src/hb-ot-color.cc
@@ -45,16 +45,14 @@ static inline const OT::COLR&
_get_colr (hb_face_t *face)
{
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::COLR);
- hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
- return *(layout->colr.get ());
+ return *(hb_ot_face_data (face)->colr.get ());
}
static inline const OT::CPAL&
_get_cpal (hb_face_t *face)
{
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::CPAL);
- hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
- return *(layout->cpal.get ());
+ return *(hb_ot_face_data (face)->cpal.get ());
}
diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh
index fe34a328..95bc588b 100644
--- a/src/hb-ot-layout-gpos-table.hh
+++ b/src/hb-ot-layout-gpos-table.hh
@@ -1628,15 +1628,13 @@ GPOS::position_finish_offsets (hb_font_t *font HB_UNUSED, hb_buffer_t *buffer)
template <typename context_t>
/*static*/ inline typename context_t::return_t PosLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index)
{
- const GPOS &gpos = *(hb_ot_layout_from_face (c->face)->table.GPOS);
- const PosLookup &l = gpos.get_lookup (lookup_index);
+ const PosLookup &l = hb_ot_face_data (c->face)->table.GPOS->get_lookup (lookup_index);
return l.dispatch (c);
}
/*static*/ inline bool PosLookup::apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index)
{
- const GPOS &gpos = *(hb_ot_layout_from_face (c->face)->table.GPOS);
- const PosLookup &l = gpos.get_lookup (lookup_index);
+ const PosLookup &l = hb_ot_face_data (c->face)->table.GPOS->get_lookup (lookup_index);
unsigned int saved_lookup_props = c->lookup_props;
unsigned int saved_lookup_index = c->lookup_index;
c->set_lookup_index (lookup_index);
diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh
index 1d5a02a0..a2f78b8f 100644
--- a/src/hb-ot-layout-gsub-table.hh
+++ b/src/hb-ot-layout-gsub-table.hh
@@ -1335,7 +1335,7 @@ GSUB::substitute_start (hb_font_t *font, hb_buffer_t *buffer)
{
_hb_buffer_assert_gsubgpos_vars (buffer);
- const GDEF &gdef = *hb_ot_layout_from_face (font->face)->table.GDEF;
+ const GDEF &gdef = *hb_ot_face_data (font->face)->table.GDEF;
unsigned int count = buffer->len;
for (unsigned int i = 0; i < count; i++)
{
@@ -1359,15 +1359,13 @@ GSUB::substitute_start (hb_font_t *font, hb_buffer_t *buffer)
template <typename context_t>
/*static*/ inline typename context_t::return_t SubstLookup::dispatch_recurse_func (context_t *c, unsigned int lookup_index)
{
- const GSUB &gsub = *(hb_ot_layout_from_face (c->face)->table.GSUB);
- const SubstLookup &l = gsub.get_lookup (lookup_index);
+ const SubstLookup &l = hb_ot_face_data (c->face)->table.GSUB->get_lookup (lookup_index);
return l.dispatch (c);
}
/*static*/ inline bool SubstLookup::apply_recurse_func (hb_ot_apply_context_t *c, unsigned int lookup_index)
{
- const GSUB &gsub = *(hb_ot_layout_from_face (c->face)->table.GSUB);
- const SubstLookup &l = gsub.get_lookup (lookup_index);
+ const SubstLookup &l = hb_ot_face_data (c->face)->table.GSUB->get_lookup (lookup_index);
unsigned int saved_lookup_props = c->lookup_props;
unsigned int saved_lookup_index = c->lookup_index;
c->set_lookup_index (lookup_index);
diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh
index 40a2fc4c..9b1a19f0 100644
--- a/src/hb-ot-layout-gsubgpos-private.hh
+++ b/src/hb-ot-layout-gsubgpos-private.hh
@@ -480,7 +480,7 @@ struct hb_ot_apply_context_t :
iter_input (), iter_context (),
font (font_), face (font->face), buffer (buffer_),
recurse_func (nullptr),
- gdef (*hb_ot_layout_from_face (face)->table.GDEF),
+ gdef (*hb_ot_face_data (face)->table.GDEF),
var_store (gdef.get_var_store ()),
direction (buffer_->props.direction),
lookup_mask (1),
diff --git a/src/hb-ot-layout-private.hh b/src/hb-ot-layout-private.hh
index 612bc7fc..8f1e2c9c 100644
--- a/src/hb-ot-layout-private.hh
+++ b/src/hb-ot-layout-private.hh
@@ -118,7 +118,7 @@ hb_ot_layout_position_finish_offsets (hb_font_t *font,
/*
- * hb_ot_layout_t
+ * hb_ot_face_data_t
*/
struct hb_ot_layout_lookup_accelerator_t
@@ -178,7 +178,7 @@ struct hb_ot_layout_lookup_accelerator_t
HB_OT_LAYOUT_TABLES
#undef HB_OT_LAYOUT_TABLE
-struct hb_ot_layout_t
+struct hb_ot_face_data_t
{
unsigned int gsub_lookup_count;
unsigned int gpos_lookup_count;
@@ -212,14 +212,14 @@ struct hb_ot_layout_t
};
-HB_INTERNAL hb_ot_layout_t *
-_hb_ot_layout_create (hb_face_t *face);
+HB_INTERNAL hb_ot_face_data_t *
+_hb_ot_face_data_create (hb_face_t *face);
HB_INTERNAL void
-_hb_ot_layout_destroy (hb_ot_layout_t *layout);
+_hb_ot_face_data_destroy (hb_ot_face_data_t *data);
-#define hb_ot_layout_from_face(face) ((hb_ot_layout_t *) face->shaper_data.ot.get_relaxed ())
+#define hb_ot_face_data(face) ((hb_ot_face_data_t *) face->shaper_data.ot.get_relaxed ())
/*
diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc
index 09ff0e6c..09f03433 100644
--- a/src/hb-ot-layout.cc
+++ b/src/hb-ot-layout.cc
@@ -149,101 +149,101 @@ _hb_ot_blacklist_gdef (unsigned int gdef_len,
return false;
}
-void hb_ot_layout_t::tables_t::init0 (hb_face_t *face)
+void hb_ot_face_data_t::tables_t::init0 (hb_face_t *face)
{
this->face = face;
#define HB_OT_LAYOUT_TABLE(Namespace, Type) Type.init0 ();
HB_OT_LAYOUT_TABLES
#undef HB_OT_LAYOUT_TABLE
}
-void hb_ot_layout_t::tables_t::fini (void)
+void hb_ot_face_data_t::tables_t::fini (void)
{
#define HB_OT_LAYOUT_TABLE(Namespace, Type) Type.fini ();
HB_OT_LAYOUT_TABLES
#undef HB_OT_LAYOUT_TABLE
}
-hb_ot_layout_t *
-_hb_ot_layout_create (hb_face_t *face)
+hb_ot_face_data_t *
+_hb_ot_face_data_create (hb_face_t *face)
{
- hb_ot_layout_t *layout = (hb_ot_layout_t *) calloc (1, sizeof (hb_ot_layout_t));
- if (unlikely (!layout))
+ hb_ot_face_data_t *data = (hb_ot_face_data_t *) calloc (1, sizeof (hb_ot_face_data_t));
+ if (unlikely (!data))
return nullptr;
- layout->table.init0 (face);
+ data->table.init0 (face);
- const OT::GSUB &gsub = *layout->table.GSUB;
- const OT::GPOS &gpos = *layout->table.GPOS;
+ const OT::GSUB &gsub = *data->table.GSUB;
+ const OT::GPOS &gpos = *data->table.GPOS;
- if (unlikely (_hb_ot_blacklist_gdef (layout->table.GDEF.get_blob ()->length,
- layout->table.GSUB.get_blob ()->length,
- layout->table.GPOS.get_blob ()->length)))
- layout->table.GDEF.set_stored (hb_blob_get_empty ());
+ if (unlikely (_hb_ot_blacklist_gdef (data->table.GDEF.get_blob ()->length,
+ data->table.GSUB.get_blob ()->length,
+ data->table.GPOS.get_blob ()->length)))
+ data->table.GDEF.set_stored (hb_blob_get_empty ());
- unsigned int gsub_lookup_count = layout->gsub_lookup_count = gsub.get_lookup_count ();
- unsigned int gpos_lookup_count = layout->gpos_lookup_count = gpos.get_lookup_count ();
+ unsigned int gsub_lookup_count = data->gsub_lookup_count = gsub.get_lookup_count ();
+ unsigned int gpos_lookup_count = data->gpos_lookup_count = gpos.get_lookup_count ();
- layout->gsub_accels = (hb_ot_layout_lookup_accelerator_t *) calloc (gsub_lookup_count, sizeof (hb_ot_layout_lookup_accelerator_t));
- layout->gpos_accels = (hb_ot_layout_lookup_accelerator_t *) calloc (gpos_lookup_count, sizeof (hb_ot_layout_lookup_accelerator_t));
+ data->gsub_accels = (hb_ot_layout_lookup_accelerator_t *) calloc (gsub_lookup_count, sizeof (hb_ot_layout_lookup_accelerator_t));
+ data->gpos_accels = (hb_ot_layout_lookup_accelerator_t *) calloc (gpos_lookup_count, sizeof (hb_ot_layout_lookup_accelerator_t));
- if (unlikely ((gsub_lookup_count && !layout->gsub_accels) ||
- (gpos_lookup_count && !layout->gpos_accels)))
+ if (unlikely ((gsub_lookup_count && !data->gsub_accels) ||
+ (gpos_lookup_count && !data->gpos_accels)))
{
- _hb_ot_layout_destroy (layout);
+ _hb_ot_face_data_destroy (data);
return nullptr;
}
for (unsigned int i = 0; i < gsub_lookup_count; i++)
- layout->gsub_accels[i].init (gsub.get_lookup (i));
+ data->gsub_accels[i].init (gsub.get_lookup (i));
for (unsigned int i = 0; i < gpos_lookup_count; i++)
- layout->gpos_accels[i].init (gpos.get_lookup (i));
+ data->gpos_accels[i].init (gpos.get_lookup (i));
- return layout;
+ return data;
}
void
-_hb_ot_layout_destroy (hb_ot_layout_t *layout)
+_hb_ot_face_data_destroy (hb_ot_face_data_t *data)
{
- if (layout->gsub_accels)
- for (unsigned int i = 0; i < layout->gsub_lookup_count; i++)
- layout->gsub_accels[i].fini ();
- if (layout->gpos_accels)
- for (unsigned int i = 0; i < layout->gpos_lookup_count; i++)
- layout->gpos_accels[i].fini ();
+ if (data->gsub_accels)
+ for (unsigned int i = 0; i < data->gsub_lookup_count; i++)
+ data->gsub_accels[i].fini ();
+ if (data->gpos_accels)
+ for (unsigned int i = 0; i < data->gpos_lookup_count; i++)
+ data->gpos_accels[i].fini ();
- free (layout->gsub_accels);
- free (layout->gpos_accels);
+ free (data->gsub_accels);
+ free (data->gpos_accels);
- layout->table.fini ();
+ data->table.fini ();
- free (layout);
+ free (data);
}
// static inline const OT::BASE&
// _get_base (hb_face_t *face)
// {
// if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::BASE);
-// hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
-// return *(layout->base.get ());
+// hb_ot_face_data_t *data = hb_ot_face_data (face);
+// return *(data->base.get ());
// }
static inline const OT::GDEF&
_get_gdef (hb_face_t *face)
{
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::GDEF);
- return *hb_ot_layout_from_face (face)->table.GDEF;
+ return *hb_ot_face_data (face)->table.GDEF;
}
static inline const OT::GSUB&
_get_gsub (hb_face_t *face)
{
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::GSUB);
- return *hb_ot_layout_from_face (face)->table.GSUB;
+ return *hb_ot_face_data (face)->table.GSUB;
}
static inline const OT::GPOS&
_get_gpos (hb_face_t *face)
{
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::GPOS);
- return *hb_ot_layout_from_face (face)->table.GPOS;
+ return *hb_ot_face_data (face)->table.GPOS;
}
/*
@@ -633,11 +633,11 @@ hb_ot_layout_table_get_lookup_count (hb_face_t *face,
{
case HB_OT_TAG_GSUB:
{
- return hb_ot_layout_from_face (face)->gsub_lookup_count;
+ return hb_ot_face_data (face)->gsub_lookup_count;
}
case HB_OT_TAG_GPOS:
{
- return hb_ot_layout_from_face (face)->gpos_lookup_count;
+ return hb_ot_face_data (face)->gpos_lookup_count;
}
}
return 0;
@@ -851,13 +851,13 @@ hb_ot_layout_lookup_collect_glyphs (hb_face_t *face,
{
case HB_OT_TAG_GSUB:
{
- const OT::SubstLookup& l = hb_ot_layout_from_face (face)->table.GSUB->get_lookup (lookup_index);
+ const OT::SubstLookup& l = hb_ot_face_data (face)->table.GSUB->get_lookup (lookup_index);
l.collect_glyphs (&c);
return;
}
case HB_OT_TAG_GPOS:
{
- const OT::PosLookup& l = hb_ot_layout_from_face (face)->table.GPOS->get_lookup (lookup_index);
+ const OT::PosLookup& l = hb_ot_face_data (face)->table.GPOS->get_lookup (lookup_index);
l.collect_glyphs (&c);
return;
}
@@ -930,12 +930,12 @@ hb_ot_layout_lookup_would_substitute_fast (hb_face_t *face,
unsigned int glyphs_length,
hb_bool_t zero_context)
{
- if (unlikely (lookup_index >= hb_ot_layout_from_face (face)->gsub_lookup_count)) return false;
+ if (unlikely (lookup_index >= hb_ot_face_data (face)->gsub_lookup_count)) return false;
OT::hb_would_apply_context_t c (face, glyphs, glyphs_length, (bool) zero_context);
- const OT::SubstLookup& l = hb_ot_layout_from_face (face)->table.GSUB->get_lookup (lookup_index);
+ const OT::SubstLookup& l = hb_ot_face_data (face)->table.GSUB->get_lookup (lookup_index);
- return l.would_apply (&c, &hb_ot_layout_from_face (face)->gsub_accels[lookup_index]);
+ return l.would_apply (&c, &hb_ot_face_data (face)->gsub_accels[lookup_index]);
}
void
@@ -1091,8 +1091,8 @@ struct GSUBProxy
typedef OT::SubstLookup Lookup;
GSUBProxy (hb_face_t *face) :
- table (*hb_ot_layout_from_face (face)->table.GSUB),
- accels (hb_ot_layout_from_face (face)->gsub_accels) {}
+ table (*hb_ot_face_data (face)->table.GSUB),
+ accels (hb_ot_face_data (face)->gsub_accels) {}
const OT::GSUB &table;
const hb_ot_layout_lookup_accelerator_t *accels;
@@ -1105,8 +1105,8 @@ struct GPOSProxy
typedef OT::PosLookup Lookup;
GPOSProxy (hb_face_t *face) :
- table (*hb_ot_layout_from_face (face)->table.GPOS),
- accels (hb_ot_layout_from_face (face)->gpos_accels) {}
+ table (*hb_ot_face_data (face)->table.GPOS),
+ accels (hb_ot_face_data (face)->gpos_accels) {}
const OT::GPOS &table;
const hb_ot_layout_lookup_accelerator_t *accels;
diff --git a/src/hb-ot-math.cc b/src/hb-ot-math.cc
index 66ce207a..ead6259d 100644
--- a/src/hb-ot-math.cc
+++ b/src/hb-ot-math.cc
@@ -33,7 +33,7 @@ static inline const OT::MATH&
_get_math (hb_face_t *face)
{
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::MATH);
- hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
+ hb_ot_face_data_t * layout = hb_ot_face_data (face);
return *(layout->table.MATH.get ());
}
diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc
index 71632b56..91ac28fd 100644
--- a/src/hb-ot-shape.cc
+++ b/src/hb-ot-shape.cc
@@ -27,7 +27,6 @@
*/
#define HB_SHAPER ot
-#define hb_ot_face_data_t hb_ot_layout_t
#define hb_ot_shape_plan_data_t hb_ot_shape_plan_t
#include "hb-shaper-impl-private.hh"
@@ -135,13 +134,13 @@ HB_SHAPER_DATA_ENSURE_DEFINE(ot, face)
hb_ot_face_data_t *
_hb_ot_shaper_face_data_create (hb_face_t *face)
{
- return _hb_ot_layout_create (face);
+ return _hb_ot_face_data_create (face);
}
void
_hb_ot_shaper_face_data_destroy (hb_ot_face_data_t *data)
{
- _hb_ot_layout_destroy (data);
+ _hb_ot_face_data_destroy (data);
}
diff --git a/src/hb-ot-var.cc b/src/hb-ot-var.cc
index 6081ddfc..5b890a3b 100644
--- a/src/hb-ot-var.cc
+++ b/src/hb-ot-var.cc
@@ -40,14 +40,14 @@ static inline const OT::fvar&
_get_fvar (hb_face_t *face)
{
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::fvar);
- hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
+ hb_ot_face_data_t *layout = hb_ot_face_data (face);
return *(layout->table.fvar.get ());
}
static inline const OT::avar&
_get_avar (hb_face_t *face)
{
if (unlikely (!hb_ot_shaper_face_data_ensure (face))) return Null(OT::avar);
- hb_ot_layout_t * layout = hb_ot_layout_from_face (face);
+ hb_ot_face_data_t *layout = hb_ot_face_data (face);
return *(layout->table.avar.get ());
}
commit 22defe0965adddaa09eebc13df7fa6c64e2abba3
Author: Emil A Eklund <eae at chromium.org>
Date: Tue Aug 14 14:47:20 2018 -0700
Add guard around free_static_C_locale
Add HB_USE_ATEXIT guard around free_static_C_locale missed by previous
commit.
diff --git a/src/hb-common.cc b/src/hb-common.cc
index 22dd52f4..614b71b7 100644
--- a/src/hb-common.cc
+++ b/src/hb-common.cc
@@ -731,8 +731,9 @@ parse_uint32 (const char **pp, const char *end, uint32_t *pv)
#ifdef USE_XLOCALE
-
+#ifdef HB_USE_ATEXIT
static void free_static_C_locale (void);
+#endif
static struct hb_C_locale_lazy_loader_t : hb_lazy_loader_t<hb_remove_ptr_t<HB_LOCALE_T>::value,
hb_C_locale_lazy_loader_t>
commit 7112c6413ca7a1773847fe258145cc5162420953
Author: Emil A Eklund <eae at chromium.org>
Date: Tue Aug 14 13:50:24 2018 -0700
Guard free_static function definitions with macro
Add HB_USE_ATEXIT macros around free_static function definitions to
avoid unused function compiler warnings/errors.
diff --git a/src/hb-ft.cc b/src/hb-ft.cc
index 01341b60..c8740d15 100644
--- a/src/hb-ft.cc
+++ b/src/hb-ft.cc
@@ -417,7 +417,9 @@ hb_ft_get_font_h_extents (hb_font_t *font HB_UNUSED,
return true;
}
+#ifdef HB_USE_ATEXIT
static void free_static_ft_funcs (void);
+#endif
static struct hb_ft_font_funcs_lazy_loader_t : hb_font_funcs_lazy_loader_t<hb_ft_font_funcs_lazy_loader_t>
{
@@ -682,8 +684,9 @@ hb_ft_font_create_referenced (FT_Face ft_face)
return hb_ft_font_create (ft_face, _hb_ft_face_destroy);
}
-
+#ifdef HB_USE_ATEXIT
static void free_static_ft_library (void);
+#endif
static struct hb_ft_library_lazy_loader_t : hb_lazy_loader_t<hb_remove_ptr_t<FT_Library>::value,
hb_ft_library_lazy_loader_t>
diff --git a/src/hb-glib.cc b/src/hb-glib.cc
index 809b22f6..81ec612d 100644
--- a/src/hb-glib.cc
+++ b/src/hb-glib.cc
@@ -366,8 +366,9 @@ hb_glib_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs HB_UNUSED,
}
-
+#ifdef HB_USE_ATEXIT
static void free_static_glib_funcs (void);
+#endif
static struct hb_glib_unicode_funcs_lazy_loader_t : hb_unicode_funcs_lazy_loader_t<hb_glib_unicode_funcs_lazy_loader_t>
{
diff --git a/src/hb-icu.cc b/src/hb-icu.cc
index 2e3ad367..bffae071 100644
--- a/src/hb-icu.cc
+++ b/src/hb-icu.cc
@@ -343,8 +343,9 @@ hb_icu_unicode_decompose_compatibility (hb_unicode_funcs_t *ufuncs HB_UNUSED,
return utf32_len;
}
-
+#ifdef HB_USE_ATEXIT
static void free_static_icu_funcs (void);
+#endif
static struct hb_icu_unicode_funcs_lazy_loader_t : hb_unicode_funcs_lazy_loader_t<hb_icu_unicode_funcs_lazy_loader_t>
{
diff --git a/src/hb-ot-font.cc b/src/hb-ot-font.cc
index 9da8fc7d..c559d875 100644
--- a/src/hb-ot-font.cc
+++ b/src/hb-ot-font.cc
@@ -226,8 +226,9 @@ hb_ot_get_font_v_extents (hb_font_t *font,
return ot_font->v_metrics.has_font_extents;
}
-
+#ifdef HB_USE_ATEXIT
static void free_static_ot_funcs (void);
+#endif
static struct hb_ot_font_funcs_lazy_loader_t : hb_font_funcs_lazy_loader_t<hb_ot_font_funcs_lazy_loader_t>
{
diff --git a/src/hb-shape.cc b/src/hb-shape.cc
index 3c2e6c4a..d3e2692f 100644
--- a/src/hb-shape.cc
+++ b/src/hb-shape.cc
@@ -46,8 +46,10 @@
* contains the output glyphs and their positions.
**/
-
+#ifdef HB_USE_ATEXIT
static void free_static_shaper_list (void);
+#endif
+
static const char *nil_shaper_list[] = {nullptr};
static struct hb_shaper_list_lazy_loader_t : hb_lazy_loader_t<const char *,
diff --git a/src/hb-shaper.cc b/src/hb-shaper.cc
index e423f255..660dfb2b 100644
--- a/src/hb-shaper.cc
+++ b/src/hb-shaper.cc
@@ -35,8 +35,9 @@ static const hb_shaper_pair_t all_shapers[] = {
#undef HB_SHAPER_IMPLEMENT
};
-
+#ifdef HB_USE_ATEXIT
static void free_static_shapers (void);
+#endif
static struct hb_shapers_lazy_loader_t : hb_lazy_loader_t<const hb_shaper_pair_t,
hb_shapers_lazy_loader_t>
More information about the HarfBuzz
mailing list