diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-02-18 18:02:58 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-02-19 07:03:18 -0800 |
| commit | 0cd54b85ef1fdad3bc4c1c4e1a989b9f6540a0fa (patch) | |
| tree | b2973ab6fdb99ec1d3ff8fd930f29cf78da183f4 /src/libstd/os.rs | |
| parent | cb29c468f38ba93f624277c2c3a8e46a4d85e619 (diff) | |
| download | rust-0cd54b85ef1fdad3bc4c1c4e1a989b9f6540a0fa.tar.gz rust-0cd54b85ef1fdad3bc4c1c4e1a989b9f6540a0fa.zip | |
Round 5 test fixes and rebase conflicts
Diffstat (limited to 'src/libstd/os.rs')
| -rw-r--r-- | src/libstd/os.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstd/os.rs b/src/libstd/os.rs index a4213e7373b..f181fc5df57 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -561,10 +561,11 @@ pub fn get_exit_status() -> int { #[cfg(target_os = "macos")] unsafe fn load_argc_and_argv(argc: int, argv: *const *const c_char) -> Vec<Vec<u8>> { + use ffi::CStr; use iter::range; - (0..argc as uint).map(|i| { - ffi::c_str_to_bytes(&*argv.offset(i as int)).to_vec() + (0..argc).map(|i| { + CStr::from_ptr(*argv.offset(i)).to_bytes().to_vec() }).collect() } |
