Try to avoid objc_msgSend

This commit is contained in:
twinaphex 2020-12-27 17:58:00 +01:00
parent c3ba223fe2
commit 0733fd41aa

View File

@ -319,7 +319,7 @@ static void frontend_darwin_get_os(char *s, size_t len, int *major, int *minor)
NSInteger minorVersion;
NSInteger patchVersion;
} NSMyOSVersion;
NSMyOSVersion version = ((NSMyOSVersion(*)(id, SEL))objc_msgSend_stret)([NSProcessInfo processInfo], @selector(operatingSystemVersion));
NSMyOSVersion version = (NSMyOSVersion)[[NSProcessInfo processInfo] operatingSystemVersion];
*major = (int)version.majorVersion;
*minor = (int)version.minorVersion;
}