new snapshot

This commit is contained in:
Daniel Micay
2013-07-22 00:06:29 -04:00
parent fc05819181
commit ed67cdb73c
33 changed files with 22 additions and 811 deletions

View File

@@ -1006,19 +1006,6 @@ pub mod raw {
/// Sets the length of the string and adds the null terminator
#[inline]
#[cfg(stage0)]
pub unsafe fn set_len(v: &mut ~str, new_len: uint) {
let v: **mut vec::raw::VecRepr = cast::transmute(v);
let repr: *mut vec::raw::VecRepr = *v;
(*repr).unboxed.fill = new_len + 1u;
let null = ptr::mut_offset(cast::transmute(&((*repr).unboxed.data)),
new_len);
*null = 0u8;
}
/// Sets the length of the string and adds the null terminator
#[inline]
#[cfg(not(stage0))]
pub unsafe fn set_len(v: &mut ~str, new_len: uint) {
let v: **mut vec::UnboxedVecRepr = cast::transmute(v);
let repr: *mut vec::UnboxedVecRepr = *v;