Skip to content

Commit

Permalink
iOS: CStr fallout
Browse files Browse the repository at this point in the history
  • Loading branch information
vhbit committed Feb 20, 2015
1 parent 522d09d commit 46b2c9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libstd/os.rs
Expand Up @@ -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;

Expand Down Expand Up @@ -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());
}
}

Expand Down

0 comments on commit 46b2c9a

Please sign in to comment.