mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-13 20:14:12 +02:00
Cocoa: Move slightly towards modern Objective-C
Inspired by 9a9568212c.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user