[shaper] Rename

This commit is contained in:
Behdad Esfahbod 2018-11-14 21:08:54 -05:00
parent c221dc0ba7
commit 3bf1ce748f
4 changed files with 12 additions and 12 deletions

View File

@ -108,7 +108,7 @@ hb_shape_plan_key_t::init (bool copy,
}
else
{
const hb_shaper_pair_static_t *shapers = _hb_shapers_get ();
const hb_shaper_entry_t *shapers = _hb_shapers_get ();
for (unsigned int i = 0; i < HB_SHAPERS_COUNT; i++)
if (false)
;

View File

@ -63,7 +63,7 @@ static struct hb_shaper_list_lazy_loader_t : hb_lazy_loader_t<const char *,
if (unlikely (!shaper_list))
return nullptr;
const hb_shaper_pair_static_t *shapers = _hb_shapers_get ();
const hb_shaper_entry_t *shapers = _hb_shapers_get ();
unsigned int i;
for (i = 0; i < HB_SHAPERS_COUNT; i++)
shaper_list[i] = shapers[i].name;

View File

@ -29,7 +29,7 @@
#include "hb-machinery.hh"
static const hb_shaper_pair_static_t all_shapers[] = {
static const hb_shaper_entry_t all_shapers[] = {
#define HB_SHAPER_IMPLEMENT(name) {#name, _hb_##name##_shape},
#include "hb-shaper-list.hh"
#undef HB_SHAPER_IMPLEMENT
@ -39,16 +39,16 @@ static const hb_shaper_pair_static_t all_shapers[] = {
static void free_static_shapers (void);
#endif
static struct hb_shapers_lazy_loader_t : hb_lazy_loader_t<const hb_shaper_pair_static_t,
static struct hb_shapers_lazy_loader_t : hb_lazy_loader_t<const hb_shaper_entry_t,
hb_shapers_lazy_loader_t>
{
static inline hb_shaper_pair_static_t *create (void)
static inline hb_shaper_entry_t *create (void)
{
char *env = getenv ("HB_SHAPER_LIST");
if (!env || !*env)
return nullptr;
hb_shaper_pair_static_t *shapers = (hb_shaper_pair_static_t *) calloc (1, sizeof (all_shapers));
hb_shaper_entry_t *shapers = (hb_shaper_entry_t *) calloc (1, sizeof (all_shapers));
if (unlikely (!shapers))
return nullptr;
@ -68,7 +68,7 @@ static struct hb_shapers_lazy_loader_t : hb_lazy_loader_t<const hb_shaper_pair_s
0 == strncmp (shapers[j].name, p, end - p))
{
/* Reorder this shaper to position i */
struct hb_shaper_pair_static_t t = shapers[j];
struct hb_shaper_entry_t t = shapers[j];
memmove (&shapers[i + 1], &shapers[i], sizeof (shapers[i]) * (j - i));
shapers[i] = t;
i++;
@ -86,11 +86,11 @@ static struct hb_shapers_lazy_loader_t : hb_lazy_loader_t<const hb_shaper_pair_s
return shapers;
}
static inline void destroy (const hb_shaper_pair_static_t *p)
static inline void destroy (const hb_shaper_entry_t *p)
{
free ((void *) p);
}
static inline const hb_shaper_pair_static_t *get_null (void)
static inline const hb_shaper_entry_t *get_null (void)
{
return all_shapers;
}
@ -104,7 +104,7 @@ void free_static_shapers (void)
}
#endif
const hb_shaper_pair_static_t *
const hb_shaper_entry_t *
_hb_shapers_get (void)
{
return static_shapers.get_unconst ();

View File

@ -40,12 +40,12 @@ typedef hb_bool_t hb_shape_func_t (hb_shape_plan_t *shape_plan,
#include "hb-shaper-list.hh"
#undef HB_SHAPER_IMPLEMENT
struct hb_shaper_pair_static_t {
struct hb_shaper_entry_t {
char name[16];
hb_shape_func_t *func;
};
HB_INTERNAL const hb_shaper_pair_static_t *
HB_INTERNAL const hb_shaper_entry_t *
_hb_shapers_get (void);