diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-22 02:04:34 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-22 02:04:34 +0530 |
| commit | ba568a09658d86a45fda2194c020cd6008676186 (patch) | |
| tree | 5d434e69a9bc0c8bdc856dc2b0a3347e391cec38 /src/libstd | |
| parent | 47e749e5be33e62058f6209aa33460c51ab54f92 (diff) | |
| parent | 46b2c9ac7ffb9e69d72225f287503ee78565e89d (diff) | |
| download | rust-ba568a09658d86a45fda2194c020cd6008676186.tar.gz rust-ba568a09658d86a45fda2194c020cd6008676186.zip | |
Rollup merge of #22583 - vhbit:ios-cstr, r=alexcrichton
"body": null,
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/os.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/os.rs b/src/libstd/os.rs index ebbfb8d42be..86f5c2c356e 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -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()); } } |
