s/finish/fini For consistency.
diff --git a/src/hb-common.cc b/src/hb-common.cc index bc54db6..f38ebb0 100644 --- a/src/hb-common.cc +++ b/src/hb-common.cc
@@ -225,7 +225,7 @@ 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; @@ -240,7 +240,7 @@ return *this; } - void finish (void) { free ((void *) lang); } + void fini (void) { free ((void *) lang); } }; @@ -259,7 +259,7 @@ while (first_lang) { hb_language_item_t *next = first_lang->next; - first_lang->finish (); + first_lang->fini (); free (first_lang); first_lang = next; } @@ -289,7 +289,7 @@ } if (!hb_atomic_ptr_cmpexch (&langs, first_lang, lang)) { - lang->finish (); + lang->fini (); free (lang); goto retry; }
diff --git a/src/hb-mutex-private.hh b/src/hb-mutex-private.hh index 49ed10e..14bde31 100644 --- a/src/hb-mutex-private.hh +++ b/src/hb-mutex-private.hh
@@ -134,7 +134,7 @@ 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); } };
diff --git a/src/hb-object-private.hh b/src/hb-object-private.hh index f23f90a..75a72f4 100644 --- a/src/hb-object-private.hh +++ b/src/hb-object-private.hh
@@ -53,7 +53,7 @@ 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; } @@ -73,7 +73,7 @@ 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; @@ -88,7 +88,7 @@ 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 (); } }; @@ -171,8 +171,8 @@ 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,
diff --git a/src/hb-ot-layout-private.hh b/src/hb-ot-layout-private.hh index 9bcbf1c..2454920 100644 --- a/src/hb-ot-layout-private.hh +++ b/src/hb-ot-layout-private.hh
@@ -105,12 +105,12 @@ 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);
diff --git a/src/hb-ot-map-private.hh b/src/hb-ot-map-private.hh index e6bd8ea..9cfe366 100644 --- a/src/hb-ot-map-private.hh +++ b/src/hb-ot-map-private.hh
@@ -130,12 +130,12 @@ 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 (); } } @@ -187,11 +187,11 @@ 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 (); } }
diff --git a/src/hb-ot-post-table.hh b/src/hb-ot-post-table.hh index 1441e2c..f360524 100644 --- a/src/hb-ot-post-table.hh +++ b/src/hb-ot-post-table.hh
@@ -134,7 +134,7 @@ } inline void fini (void) { - index_to_offset.finish (); + index_to_offset.fini (); free (gids_sorted_by_name); }
diff --git a/src/hb-ot-shape-private.hh b/src/hb-ot-shape-private.hh index fe5d2b7..fddb757 100644 --- a/src/hb-ot-shape-private.hh +++ b/src/hb-ot-shape-private.hh
@@ -59,7 +59,7 @@ 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 @@ -75,7 +75,7 @@ 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,
diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index 263d65c..dd10e34 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc
@@ -204,7 +204,7 @@ if (plan->shaper->data_destroy) plan->shaper->data_destroy (const_cast<void *> (plan->data)); - plan->finish (); + plan->fini (); free (plan); }
diff --git a/src/hb-private.hh b/src/hb-private.hh index 7e6d8e5..d27d580 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh
@@ -691,7 +691,7 @@ return false; } - inline void finish (void) + inline void fini (void) { if (array != static_array) free (array); @@ -704,7 +704,7 @@ 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 (); } }; @@ -726,7 +726,7 @@ item_t old = *item; *item = v; l.unlock (); - old.finish (); + old.fini (); } else { item = nullptr; @@ -751,7 +751,7 @@ *item = items[items.len - 1]; items.pop (); l.unlock (); - old.finish (); + old.fini (); } else { l.unlock (); } @@ -782,11 +782,11 @@ 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 (); @@ -794,10 +794,10 @@ item_t old = items[items.len - 1]; items.pop (); l.unlock (); - old.finish (); + old.fini (); l.lock (); } - items.finish (); + items.fini (); l.unlock (); }
diff --git a/src/hb-set-private.hh b/src/hb-set-private.hh index 5ccefc8..df3326b 100644 --- a/src/hb-set-private.hh +++ b/src/hb-set-private.hh
@@ -200,10 +200,10 @@ 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)
diff --git a/src/hb-set.cc b/src/hb-set.cc index deb8d29..d5163c7 100644 --- a/src/hb-set.cc +++ b/src/hb-set.cc
@@ -96,7 +96,7 @@ { if (!hb_object_destroy (set)) return; - set->finish (); + set->fini (); free (set); }
diff --git a/src/hb-subset-glyf.cc b/src/hb-subset-glyf.cc index b9e6355..372832f 100644 --- a/src/hb-subset-glyf.cc +++ b/src/hb-subset-glyf.cc
@@ -248,7 +248,7 @@ &glyf_prime_size, &loca_prime_size, &instruction_ranges))) { - instruction_ranges.finish(); + instruction_ranges.fini(); return false; } @@ -261,10 +261,10 @@ 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,
diff --git a/src/hb-subset-plan.cc b/src/hb-subset-plan.cc index f8a09ef..1784aef 100644 --- a/src/hb-subset-plan.cc +++ b/src/hb-subset-plan.cc
@@ -216,9 +216,9 @@ { 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);
diff --git a/src/hb-subset.cc b/src/hb-subset.cc index 5da46c7..41f4453 100644 --- a/src/hb-subset.cc +++ b/src/hb-subset.cc
@@ -144,7 +144,7 @@ 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); }