fix casts on 32-bit

This commit is contained in:
Daniel Micay 2013-05-27 18:14:00 -04:00
parent 14846613bb
commit e6c04dea03
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ pub unsafe fn transmute_copy<T, U>(src: &T) -> U {
let mut dest: U = intrinsics::uninit();
let dest_ptr: *mut u8 = transmute(&mut dest);
let src_ptr: *u8 = transmute(src);
intrinsics::memcpy32(dest_ptr, src_ptr, sys::size_of::<U>() as u64);
intrinsics::memcpy32(dest_ptr, src_ptr, sys::size_of::<U>() as u32);
dest
}

View File

@ -109,7 +109,7 @@ pub unsafe fn copy_memory<T>(dst: *mut T, src: *const T, count: uint) {
#[cfg(target_word_size = "32", not(stage0))]
pub unsafe fn copy_memory<T>(dst: *mut T, src: *const T, count: uint) {
use unstable::intrinsics::memmove32;
memmove32(dst, src, count as u32);
memmove32(dst, src as *T, count as u32);
}
#[inline(always)]