fix casts on 32-bit
This commit is contained in:
parent
14846613bb
commit
e6c04dea03
@ -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
|
||||
}
|
||||
|
||||
|
@ -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)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user