Cocoa: Move slightly towards modern Objective-C

Inspired by 9a9568212c.
This commit is contained in:
Luflosi
2019-07-25 16:14:56 -05:00
parent 4f5264277e
commit cdbe2f13ca
3 changed files with 8 additions and 8 deletions

View File

@@ -135,7 +135,7 @@ font_descriptor_from_python(PyObject *src) {
#define SET(x, attr) \
t = PyDict_GetItemString(src, #x); \
if (t) attrs[(id)attr] = [NSString stringWithUTF8String:PyUnicode_AsUTF8(t)];
if (t) attrs[(id)attr] = @(PyUnicode_AsUTF8(t));
SET(family, kCTFontFamilyNameAttribute);
SET(style, kCTFontStyleNameAttribute);