>From 1f86de840ce0c808f2ee4bf6ce3703c54f8009da Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sun, 10 Dec 2017 10:16:25 +0000 Subject: [PATCH] Remove ObjC blocks (Bug#23753) --- src/macfont.m | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/src/macfont.m b/src/macfont.m index 97879506ba..936e17052b 100644 --- a/src/macfont.m +++ b/src/macfont.m @@ -1479,10 +1479,7 @@ static CGGlyph macfont_get_glyph_for_cid (struct font *font, return glyph; } - queue = - dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - group = dispatch_group_create (); - dispatch_group_async (group, queue, ^{ + { int nkeys; uintptr_t key; nkeys = nkeys_or_perm; @@ -1495,7 +1492,7 @@ static CGGlyph macfont_get_glyph_for_cid (struct font *font, if (--nkeys == 0) break; } - }); + } } len = 0; @@ -1535,12 +1532,6 @@ static CGGlyph macfont_get_glyph_for_cid (struct font *font, sizeof (CGGlyph *) * nrows); cache->glyph.matrix[nrows - 1] = glyphs; cache->glyph.nrows = nrows; - - if (group) - { - dispatch_group_wait (group, DISPATCH_TIME_FOREVER); - dispatch_release (group); - } } return cache->glyph.matrix[nkeys_or_perm - ROW_PERM_OFFSET][c % 256]; @@ -3267,9 +3258,6 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no struct variation_selector_record *records = uvs->variation_selector_records; CFIndex i; UInt32 ir, nrecords; - dispatch_queue_t queue = - dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - dispatch_group_t group = dispatch_group_create (); nrecords = BUINT32_VALUE (uvs->num_var_selector_records); i = 0; @@ -3293,7 +3281,7 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no default_uvs_offset = BUINT32_VALUE (records[ir].default_uvs_offset); non_default_uvs_offset = BUINT32_VALUE (records[ir].non_default_uvs_offset); - dispatch_group_async (group, queue, ^{ + { glyphs[i] = kCGFontIndexInvalid; if (default_uvs_offset) @@ -3345,14 +3333,12 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor (no BUINT24_VALUE (mappings[hi - 1].unicode_value) == c) glyphs[i] = BUINT16_VALUE (mappings[hi - 1].glyph_id); } - }); + } i++; ir++; } while (i < count) glyphs[i++] = kCGFontIndexInvalid; - dispatch_group_wait (group, DISPATCH_TIME_FOREVER); - dispatch_release (group); } static int -- 2.14.3