diff options
Diffstat (limited to 'thirdparty/harfbuzz/src/hb-shape-plan.cc')
-rw-r--r-- | thirdparty/harfbuzz/src/hb-shape-plan.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/thirdparty/harfbuzz/src/hb-shape-plan.cc b/thirdparty/harfbuzz/src/hb-shape-plan.cc index 0d9eaddaa6..66332165c3 100644 --- a/thirdparty/harfbuzz/src/hb-shape-plan.cc +++ b/thirdparty/harfbuzz/src/hb-shape-plan.cc @@ -66,7 +66,7 @@ hb_shape_plan_key_t::init (bool copy, const char * const *shaper_list) { hb_feature_t *features = nullptr; - if (copy && num_user_features && !(features = (hb_feature_t *) calloc (num_user_features, sizeof (hb_feature_t)))) + if (copy && num_user_features && !(features = (hb_feature_t *) hb_calloc (num_user_features, sizeof (hb_feature_t)))) goto bail; this->props = *props; @@ -130,7 +130,7 @@ hb_shape_plan_key_t::init (bool copy, #undef HB_SHAPER_PLAN bail: - ::free (features); + ::hb_free (features); return false; } @@ -264,9 +264,9 @@ hb_shape_plan_create2 (hb_face_t *face, #ifndef HB_NO_OT_SHAPE bail3: #endif - shape_plan->key.free (); + shape_plan->key.fini (); bail2: - free (shape_plan); + hb_free (shape_plan); bail: return hb_shape_plan_get_empty (); } @@ -320,8 +320,8 @@ hb_shape_plan_destroy (hb_shape_plan_t *shape_plan) #ifndef HB_NO_OT_SHAPE shape_plan->ot.fini (); #endif - shape_plan->key.free (); - free (shape_plan); + shape_plan->key.fini (); + hb_free (shape_plan); } /** @@ -404,7 +404,7 @@ _hb_shape_plan_execute_internal (hb_shape_plan_t *shape_plan, buffer->assert_unicode (); - if (unlikely (hb_object_is_inert (shape_plan))) + if (unlikely (!hb_object_is_valid (shape_plan))) return false; assert (shape_plan->face_unsafe == font->face); @@ -529,7 +529,7 @@ hb_shape_plan_create_cached2 (hb_face_t *face, retry: hb_face_t::plan_node_t *cached_plan_nodes = face->shape_plans; - bool dont_cache = hb_object_is_inert (face); + bool dont_cache = !hb_object_is_valid (face); if (likely (!dont_cache)) { @@ -560,7 +560,7 @@ retry: if (unlikely (dont_cache)) return shape_plan; - hb_face_t::plan_node_t *node = (hb_face_t::plan_node_t *) calloc (1, sizeof (hb_face_t::plan_node_t)); + hb_face_t::plan_node_t *node = (hb_face_t::plan_node_t *) hb_calloc (1, sizeof (hb_face_t::plan_node_t)); if (unlikely (!node)) return shape_plan; @@ -570,7 +570,7 @@ retry: if (unlikely (!face->shape_plans.cmpexch (cached_plan_nodes, node))) { hb_shape_plan_destroy (shape_plan); - free (node); + hb_free (node); goto retry; } DEBUG_MSG_FUNC (SHAPE_PLAN, shape_plan, "inserted into cache"); |