Skip to content

Commit

Permalink
libcore: unsafe mod renamed to cast
Browse files Browse the repository at this point in the history
  • Loading branch information
erickt committed Sep 19, 2012
1 parent 53abb5e commit da568ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/libcore/os.rs
Expand Up @@ -597,7 +597,7 @@ fn make_dir(p: &Path, mode: c_int) -> bool {
use win32::*;
// FIXME: turn mode into something useful? #2623
do as_utf16_p(p.to_str()) |buf| {
CreateDirectoryW(buf, unsafe { unsafe::reinterpret_cast(&0) })
CreateDirectoryW(buf, unsafe { cast::reinterpret_cast(&0) })
!= (0 as BOOL)
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/libcore/run.rs
Expand Up @@ -133,12 +133,12 @@ fn with_envp<T>(env: &Option<~[(~str,~str)]>,
for vec::each(es) |e| {
let (k,v) = e;
let t = fmt!("%s=%s", k, v);
let mut v : ~[u8] = ::unsafe::reinterpret_cast(&t);
let mut v : ~[u8] = ::cast::reinterpret_cast(&t);
blk += v;
::unsafe::forget(v);
::cast::forget(v);
}
blk += ~[0_u8];
vec::as_imm_buf(blk, |p, _len| cb(::unsafe::reinterpret_cast(&p)))
vec::as_imm_buf(blk, |p, _len| cb(::cast::reinterpret_cast(&p)))
}
_ => cb(ptr::null())
}
Expand Down

0 comments on commit da568ba

Please sign in to comment.