Skip to content

Commit

Permalink
auto merge of #20633 : vhbit/rust/ios-cstring, r=brson
Browse files Browse the repository at this point in the history
  • Loading branch information
bors committed Jan 6, 2015
2 parents 6539cb4 + 72e0800 commit ea6f65c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libstd/os.rs
Expand Up @@ -646,6 +646,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 iter::range;
use mem;

Expand Down Expand Up @@ -680,8 +681,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));
let s = CString::new(utf_c_str, false);
res.push(s.as_bytes_no_nul().to_vec())
res.push(c_str_to_bytes(&utf_c_str).to_vec());
}
}

Expand Down

0 comments on commit ea6f65c

Please sign in to comment.