Skip to content

Commit

Permalink
iOS: CString fallout
Browse files Browse the repository at this point in the history
  • Loading branch information
vhbit committed Jan 6, 2015
1 parent 340ac04 commit 72e0800
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

8 comments on commit 72e0800

@brson
Copy link
Contributor

@brson brson commented on 72e0800 Jan 6, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+

@bors
Copy link
Contributor

@bors bors commented on 72e0800 Jan 6, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from brson
at vhbit@72e0800

@bors
Copy link
Contributor

@bors bors commented on 72e0800 Jan 6, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging vhbit/rust/ios-cstring = 72e0800 into auto

@bors
Copy link
Contributor

@bors bors commented on 72e0800 Jan 6, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

status: {"merge_sha": "ea6f65c5f1a3f84e010d2cef02a0160804e9567a"}

@bors
Copy link
Contributor

@bors bors commented on 72e0800 Jan 6, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vhbit/rust/ios-cstring = 72e0800 merged ok, testing candidate = ea6f65c

@bors
Copy link
Contributor

@bors bors commented on 72e0800 Jan 6, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = ea6f65c

@bors
Copy link
Contributor

@bors bors commented on 72e0800 Jan 6, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = ea6f65c

Please sign in to comment.