Skip to content

Commit 2f459f7

Browse files
committed
fix ptr cast
1 parent f212ba6 commit 2f459f7

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

library/std/src/sys/unix/args.rs

+9-7
Original file line numberDiff line numberDiff line change
@@ -242,13 +242,15 @@ mod imp {
242242
let mut res = Vec::new();
243243

244244
unsafe {
245-
let process_info_sel = sel_registerName(c"processInfo".as_ptr());
246-
let arguments_sel = sel_registerName(c"arguments".as_ptr());
247-
let utf8_sel = sel_registerName(c"UTF8String".as_ptr());
248-
let count_sel = sel_registerName(c"count".as_ptr());
249-
let object_at_sel = sel_registerName(c"objectAtIndex:".as_ptr());
250-
251-
let klass = objc_getClass(c"NSProcessInfo".as_ptr());
245+
let process_info_sel =
246+
sel_registerName(c"processInfo".as_ptr() as *const libc::c_uchar);
247+
let arguments_sel = sel_registerName(c"arguments".as_ptr() as *const libc::c_uchar);
248+
let utf8_sel = sel_registerName(c"UTF8String".as_ptr() as *const libc::c_uchar);
249+
let count_sel = sel_registerName(c"count".as_ptr() as *const libc::c_uchar);
250+
let object_at_sel =
251+
sel_registerName(c"objectAtIndex:".as_ptr() as *const libc::c_uchar);
252+
253+
let klass = objc_getClass(c"NSProcessInfo".as_ptr() as *const libc::c_uchar);
252254
let info = objc_msgSend(klass, process_info_sel);
253255
let args = objc_msgSend(info, arguments_sel);
254256

0 commit comments

Comments
 (0)