fix ptr cast

This commit is contained in:
klensy 2023-06-02 11:26:34 +03:00
parent f212ba6d6d
commit 2f459f7f14

View File

@ -242,13 +242,15 @@ mod imp {
let mut res = Vec::new();
unsafe {
let process_info_sel = sel_registerName(c"processInfo".as_ptr());
let arguments_sel = sel_registerName(c"arguments".as_ptr());
let utf8_sel = sel_registerName(c"UTF8String".as_ptr());
let count_sel = sel_registerName(c"count".as_ptr());
let object_at_sel = sel_registerName(c"objectAtIndex:".as_ptr());
let process_info_sel =
sel_registerName(c"processInfo".as_ptr() as *const libc::c_uchar);
let arguments_sel = sel_registerName(c"arguments".as_ptr() as *const libc::c_uchar);
let utf8_sel = sel_registerName(c"UTF8String".as_ptr() as *const libc::c_uchar);
let count_sel = sel_registerName(c"count".as_ptr() as *const libc::c_uchar);
let object_at_sel =
sel_registerName(c"objectAtIndex:".as_ptr() as *const libc::c_uchar);
let klass = objc_getClass(c"NSProcessInfo".as_ptr());
let klass = objc_getClass(c"NSProcessInfo".as_ptr() as *const libc::c_uchar);
let info = objc_msgSend(klass, process_info_sel);
let args = objc_msgSend(info, arguments_sel);