Replaced many instances of reinterpret_cast with transmute

This commit is contained in:
Matthijs Hofstra
2013-04-20 16:27:16 +02:00
parent f2b0ef147a
commit 51a68eb9b1
21 changed files with 107 additions and 109 deletions

View File

@@ -10,7 +10,7 @@
#[doc(hidden)]; // FIXME #3538
use cast::reinterpret_cast;
use cast::transmute;
pub type Word = uint;
@@ -30,16 +30,16 @@ pub fn walk_stack(visit: &fn(Frame) -> bool) {
do frame_address |frame_pointer| {
let mut frame_address: *Word = unsafe {
reinterpret_cast(&frame_pointer)
transmute(frame_pointer)
};
loop {
let fr = Frame(frame_address);
debug!("frame: %x", unsafe { reinterpret_cast(&fr.fp) });
debug!("frame: %x", unsafe { transmute(fr.fp) });
visit(fr);
unsafe {
let next_fp: **Word = reinterpret_cast(&frame_address);
let next_fp: **Word = transmute(frame_address);
frame_address = *next_fp;
if *frame_address == 0u {
debug!("encountered task_start_wrapper. ending walk");