[shaper] Rename

This commit is contained in:
Behdad Esfahbod 2018-11-12 16:05:09 -05:00
parent 5212cd8af2
commit 1db672a5e9
4 changed files with 12 additions and 12 deletions

View File

@ -58,7 +58,7 @@ hb_shape_plan_choose_shaper (hb_shape_plan_t *shape_plan,
num_coords,
shaper_list);
const hb_shaper_pair_t *shapers = _hb_shapers_get ();
const hb_shaper_pair_static_t *shapers = _hb_shapers_get ();
#define HB_SHAPER_PLAN(shaper) \
HB_STMT_START { \

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_t *shapers = _hb_shapers_get ();
const hb_shaper_pair_static_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_t all_shapers[] = {
static const hb_shaper_pair_static_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_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_t,
static struct hb_shapers_lazy_loader_t : hb_lazy_loader_t<const hb_shaper_pair_static_t,
hb_shapers_lazy_loader_t>
{
static inline hb_shaper_pair_t *create (void)
static inline hb_shaper_pair_static_t *create (void)
{
char *env = getenv ("HB_SHAPER_LIST");
if (!env || !*env)
return nullptr;
hb_shaper_pair_t *shapers = (hb_shaper_pair_t *) calloc (1, sizeof (all_shapers));
hb_shaper_pair_static_t *shapers = (hb_shaper_pair_static_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_t
0 == strncmp (shapers[j].name, p, end - p))
{
/* Reorder this shaper to position i */
struct hb_shaper_pair_t t = shapers[j];
struct hb_shaper_pair_static_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_t
return shapers;
}
static inline void destroy (const hb_shaper_pair_t *p)
static inline void destroy (const hb_shaper_pair_static_t *p)
{
free ((void *) p);
}
static inline const hb_shaper_pair_t *get_null (void)
static inline const hb_shaper_pair_static_t *get_null (void)
{
return all_shapers;
}
@ -104,7 +104,7 @@ void free_static_shapers (void)
}
#endif
const hb_shaper_pair_t *
const hb_shaper_pair_static_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_t {
struct hb_shaper_pair_static_t {
char name[16];
hb_shape_func_t *func;
};
HB_INTERNAL const hb_shaper_pair_t *
HB_INTERNAL const hb_shaper_pair_static_t *
_hb_shapers_get (void);