Test fixes and merge conflicts

This commit is contained in:
Alex Crichton
2013-10-17 21:08:48 -07:00
parent 279c351820
commit 620ab3853a
19 changed files with 151 additions and 141 deletions

View File

@@ -189,6 +189,8 @@ pub fn env() -> ~[(~str,~str)] {
#[cfg(windows)]
unsafe fn get_env_pairs() -> ~[~str] {
#[fixed_stack_segment]; #[inline(never)];
use c_str;
use str::StrSlice;
use libc::funcs::extra::kernel32::{
GetEnvironmentStringsA,
@@ -201,7 +203,7 @@ pub fn env() -> ~[(~str,~str)] {
}
let mut result = ~[];
do c_str::from_c_multistring(ch as *libc::c_char, None) |cstr| {
result.push(cstr.as_str().to_owned());
result.push(cstr.as_str().unwrap().to_owned());
};
FreeEnvironmentStringsA(ch);
result