For consistency.
inline hb_language_item_t & operator = (const char *s) {
/* If a custom allocated is used calling strdup() pairs
- badly with a call to the custom free() in finish() below.
+ badly with a call to the custom free() in fini() below.
Therefore don't call strdup(), implement its behavior.
*/
size_t len = strlen(s) + 1;
return *this;
}
- void finish (void) { free ((void *) lang); }
+ void fini (void) { free ((void *) lang); }
};
while (first_lang) {
hb_language_item_t *next = first_lang->next;
- first_lang->finish ();
+ first_lang->fini ();
free (first_lang);
first_lang = next;
}
}
if (!hb_atomic_ptr_cmpexch (&langs, first_lang, lang)) {
- lang->finish ();
+ lang->fini ();
free (lang);
goto retry;
}
inline void init (void) { hb_mutex_impl_init (&m); }
inline void lock (void) { hb_mutex_impl_lock (&m); }
inline void unlock (void) { hb_mutex_impl_unlock (&m); }
- inline void finish (void) { hb_mutex_impl_finish (&m); }
+ inline void fini (void) { hb_mutex_impl_finish (&m); }
};
inline int get_unsafe (void) const { return ref_count.get_unsafe (); }
inline int inc (void) { return ref_count.inc (); }
inline int dec (void) { return ref_count.dec (); }
- inline void finish (void) { ref_count.set_unsafe (HB_REFERENCE_COUNT_POISON_VALUE); }
+ inline void fini (void) { ref_count.set_unsafe (HB_REFERENCE_COUNT_POISON_VALUE); }
inline bool is_inert (void) const { return ref_count.get_unsafe () == HB_REFERENCE_COUNT_INERT_VALUE; }
inline bool is_valid (void) const { return ref_count.get_unsafe () > 0; }
inline bool operator == (hb_user_data_key_t *other_key) const { return key == other_key; }
inline bool operator == (hb_user_data_item_t &other) const { return key == other.key; }
- void finish (void) { if (destroy) destroy (data); }
+ void fini (void) { if (destroy) destroy (data); }
};
hb_mutex_t lock;
HB_INTERNAL void *get (hb_user_data_key_t *key);
- inline void finish (void) { items.finish (lock); lock.finish (); }
+ inline void fini (void) { items.fini (lock); lock.fini (); }
};
template <typename Type>
static inline void hb_object_fini (Type *obj)
{
- obj->header.ref_count.finish (); /* Do this before user_data */
- obj->header.user_data.finish ();
+ obj->header.ref_count.fini (); /* Do this before user_data */
+ obj->header.user_data.fini ();
}
template <typename Type>
static inline bool hb_object_set_user_data (Type *obj,
hb_ot_layout_position_start (hb_font_t *font,
hb_buffer_t *buffer);
-/* Should be called after all the position_lookup's are done, to finish advances. */
+/* Should be called after all the position_lookup's are done, to fini advances. */
HB_INTERNAL void
hb_ot_layout_position_finish_advances (hb_font_t *font,
hb_buffer_t *buffer);
-/* Should be called after hb_ot_layout_position_finish_advances, to finish offsets. */
+/* Should be called after hb_ot_layout_position_finish_advances, to fini offsets. */
HB_INTERNAL void
hb_ot_layout_position_finish_offsets (hb_font_t *font,
hb_buffer_t *buffer);
HB_INTERNAL void substitute (const struct hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer) const;
HB_INTERNAL void position (const struct hb_ot_shape_plan_t *plan, hb_font_t *font, hb_buffer_t *buffer) const;
- inline void finish (void) {
- features.finish ();
+ inline void fini (void) {
+ features.fini ();
for (unsigned int table_index = 0; table_index < 2; table_index++)
{
- lookups[table_index].finish ();
- stages[table_index].finish ();
+ lookups[table_index].fini ();
+ stages[table_index].fini ();
}
}
const int *coords,
unsigned int num_coords);
- inline void finish (void) {
- feature_infos.finish ();
+ inline void fini (void) {
+ feature_infos.fini ();
for (unsigned int table_index = 0; table_index < 2; table_index++)
{
- stages[table_index].finish ();
+ stages[table_index].fini ();
}
}
}
inline void fini (void)
{
- index_to_offset.finish ();
+ index_to_offset.fini ();
free (gids_sorted_by_name);
}
inline void substitute (hb_font_t *font, hb_buffer_t *buffer) const { map.substitute (this, font, buffer); }
inline void position (hb_font_t *font, hb_buffer_t *buffer) const { map.position (this, font, buffer); }
- void finish (void) { map.finish (); }
+ void fini (void) { map.fini (); }
};
struct hb_ot_shape_planner_t
props (master_plan->props),
shaper (nullptr),
map (face, &props) {}
- ~hb_ot_shape_planner_t (void) { map.finish (); }
+ ~hb_ot_shape_planner_t (void) { map.fini (); }
inline void compile (hb_ot_shape_plan_t &plan,
const int *coords,
if (plan->shaper->data_destroy)
plan->shaper->data_destroy (const_cast<void *> (plan->data));
- plan->finish ();
+ plan->fini ();
free (plan);
}
return false;
}
- inline void finish (void)
+ inline void fini (void)
{
if (array != static_array)
free (array);
struct hb_auto_array_t : hb_prealloced_array_t <Type>
{
hb_auto_array_t (void) { hb_prealloced_array_t<Type>::init (); }
- ~hb_auto_array_t (void) { hb_prealloced_array_t<Type>::finish (); }
+ ~hb_auto_array_t (void) { hb_prealloced_array_t<Type>::fini (); }
};
item_t old = *item;
*item = v;
l.unlock ();
- old.finish ();
+ old.fini ();
}
else {
item = nullptr;
*item = items[items.len - 1];
items.pop ();
l.unlock ();
- old.finish ();
+ old.fini ();
} else {
l.unlock ();
}
return item;
}
- inline void finish (lock_t &l)
+ inline void fini (lock_t &l)
{
if (!items.len) {
/* No need for locking. */
- items.finish ();
+ items.fini ();
return;
}
l.lock ();
item_t old = items[items.len - 1];
items.pop ();
l.unlock ();
- old.finish ();
+ old.fini ();
l.lock ();
}
- items.finish ();
+ items.fini ();
l.unlock ();
}
page_map.init ();
pages.init ();
}
- inline void finish (void)
+ inline void fini (void)
{
- page_map.finish ();
- pages.finish ();
+ page_map.fini ();
+ pages.fini ();
}
inline bool resize (unsigned int count)
{
if (!hb_object_destroy (set)) return;
- set->finish ();
+ set->fini ();
free (set);
}
&glyf_prime_size,
&loca_prime_size,
&instruction_ranges))) {
- instruction_ranges.finish();
+ instruction_ranges.fini();
return false;
}
loca_prime_size, loca_prime_data))) {
free (glyf_prime_data);
free (loca_prime_data);
- instruction_ranges.finish();
+ instruction_ranges.fini();
return false;
}
- instruction_ranges.finish();
+ instruction_ranges.fini();
*glyf_prime = hb_blob_create (glyf_prime_data,
glyf_prime_size,
{
if (!hb_object_destroy (plan)) return;
- plan->codepoints.finish ();
- plan->gids_to_retain.finish ();
- plan->gids_to_retain_sorted.finish ();
+ plan->codepoints.fini ();
+ plan->gids_to_retain.fini ();
+ plan->gids_to_retain_sorted.fini ();
hb_face_destroy (plan->source);
hb_face_destroy (plan->dest);
for (unsigned int i = 0; i < data->tables.len; i++)
hb_blob_destroy (data->tables[i].blob);
- data->tables.finish ();
+ data->tables.fini ();
free (data);
}