summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2018-11-16 08:43:25 -0500
committerBehdad Esfahbod <behdad@behdad.org>2018-11-16 08:43:25 -0500
commit0aab861f9cda6fba5ce71562d9f087d924e8a161 (patch)
tree533f50e752b80de6137c00dfae2fefd3d13e5e7d
parent0809b76a9a1d7bd53818df7e83a9c81e664dfe0e (diff)
[coretext] Another round
-rw-r--r--src/hb-coretext.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hb-coretext.cc b/src/hb-coretext.cc
index eb1bf545..0831ecb9 100644
--- a/src/hb-coretext.cc
+++ b/src/hb-coretext.cc
@@ -357,8 +357,8 @@ retry:
/* Drop and recreate. */
/* If someone dropped it in the mean time, throw it away and don't touch it.
* Otherwise, destruct it. */
- if (likely (cmpexch (data, nullptr)))
- _hb_coretext_shaper_font_data_destroy (data);
+ if (likely (font->data.coretext.cmpexch (data, nullptr)))
+ _hb_coretext_shaper_font_data_destroy (const_cast<hb_coretext_font_data_t *> (data));
else
goto retry;
}
@@ -384,7 +384,7 @@ hb_coretext_font_create (CTFontRef ct_font)
hb_font_set_ptem (font, coretext_font_size_to_ptem (CTFontGetSize(ct_font)));
/* Let there be dragons here... */
- font->data.coretext.exchange (nullptr, (hb_coretext_font_data_t *) CFRetain (ct_font));
+ font->data.coretext.cmpexch (nullptr, (hb_coretext_font_data_t *) CFRetain (ct_font));
return font;
}
@@ -392,7 +392,7 @@ hb_coretext_font_create (CTFontRef ct_font)
CTFontRef
hb_coretext_font_get_ct_font (hb_font_t *font)
{
- const hb_coretext_font_data *data = hb_coretext_font_data_sync (font);
+ const hb_coretext_font_data_t *data = hb_coretext_font_data_sync (font);
return data ? (CTFontRef) data : nullptr;
}