new snapshot
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user