[coretext] Another round

This commit is contained in:
Behdad Esfahbod 2018-11-16 08:43:25 -05:00
parent 0809b76a9a
commit 0aab861f9c
1 changed files with 4 additions and 4 deletions

View File

@ -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;
}