提交 ba568a09 编写于 作者: M Manish Goregaokar

Rollup merge of #22583 - vhbit:ios-cstr, r=alexcrichton

   "body": null,
......@@ -595,7 +595,7 @@ fn real_args_as_bytes() -> Vec<Vec<u8>> {
// res
#[cfg(target_os = "ios")]
fn real_args_as_bytes() -> Vec<Vec<u8>> {
use ffi::c_str_to_bytes;
use ffi::CStr;
use iter::range;
use mem;
......@@ -630,7 +630,7 @@ fn real_args_as_bytes() -> Vec<Vec<u8>> {
let tmp = objc_msgSend(args, objectAtSel, i);
let utf_c_str: *const libc::c_char =
mem::transmute(objc_msgSend(tmp, utf8Sel));
res.push(c_str_to_bytes(&utf_c_str).to_vec());
res.push(CStr::from_ptr(utf_c_str).to_bytes().to_vec());
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册