libcore: unsafe mod renamed to cast
This commit is contained in:
parent
53abb5edbd
commit
da568baea9
@ -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)
|
||||
}
|
||||
}
|
||||
|
@ -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())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user