mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 07:22:42 +00:00
fix ptr cast
This commit is contained in:
parent
f212ba6d6d
commit
2f459f7f14
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user