mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 15:32:06 +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();
|
let mut res = Vec::new();
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
let process_info_sel = sel_registerName(c"processInfo".as_ptr());
|
let process_info_sel =
|
||||||
let arguments_sel = sel_registerName(c"arguments".as_ptr());
|
sel_registerName(c"processInfo".as_ptr() as *const libc::c_uchar);
|
||||||
let utf8_sel = sel_registerName(c"UTF8String".as_ptr());
|
let arguments_sel = sel_registerName(c"arguments".as_ptr() as *const libc::c_uchar);
|
||||||
let count_sel = sel_registerName(c"count".as_ptr());
|
let utf8_sel = sel_registerName(c"UTF8String".as_ptr() as *const libc::c_uchar);
|
||||||
let object_at_sel = sel_registerName(c"objectAtIndex:".as_ptr());
|
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 info = objc_msgSend(klass, process_info_sel);
|
||||||
let args = objc_msgSend(info, arguments_sel);
|
let args = objc_msgSend(info, arguments_sel);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user