stdlib: Fix a pointer mistake in arenas

This commit is contained in:
Patrick Walton 2012-03-28 20:26:28 -07:00
parent 0d5d2e5e14
commit 6f0cbf4cd4

View File

@ -37,9 +37,11 @@ impl arena for arena {
end = n_bytes;
}
let p = ptr::offset(ptr::addr_of(head.fill), start);
head.fill = end;
unsafe { ret unsafe::reinterpret_cast(p); }
unsafe {
let p = ptr::offset(vec::unsafe::to_ptr(head.data), start);
head.fill = end;
ret unsafe::reinterpret_cast(p);
}
}
}