Cocoa: Move slightly towards modern Objective-C
Inspired by https://github.com/glfw/glfw/commit/9a9568212c2dfd17fe46845eaa68ec0731de6173.
This commit is contained in:
+1
-1
@@ -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