Fix invalid msg_send! (#702)

This commit is contained in:
Mads Marquart
2024-08-13 14:04:01 +02:00
committed by GitHub
parent 9d8c74ea34
commit 6541d9a789
4 changed files with 11 additions and 9 deletions
+4 -3
View File
@@ -240,7 +240,8 @@ impl NSProcessInfo for id {
}
unsafe fn isOperatingSystemAtLeastVersion(self, version: NSOperatingSystemVersion) -> bool {
msg_send![self, isOperatingSystemAtLeastVersion: version]
let res: BOOL = msg_send![self, isOperatingSystemAtLeastVersion: version];
res != NO
}
}
@@ -657,9 +658,9 @@ impl NSString for id {
unsafe fn init_str(self, string: &str) -> id {
msg_send![self,
initWithBytes:string.as_ptr()
initWithBytes:string.as_ptr() as *const c_void
length:string.len()
encoding:UTF8_ENCODING as id]
encoding:UTF8_ENCODING]
}
unsafe fn len(self) -> usize {