stdlib: Make reinterpret_cast and leak unsafe

This commit is contained in:
Brian Anderson 2011-10-28 14:19:17 -07:00
parent ad66d72e6c
commit f96ad30dfc
7 changed files with 23 additions and 17 deletions

View file

@ -92,7 +92,8 @@ type program = obj {
fn arg_vec(prog: str, args: [@str]) -> [sbuf] {
let argptrs = str::as_buf(prog, {|buf| [buf] });
for arg in args { argptrs += str::as_buf(*arg, {|buf| [buf] }); }
argptrs += [unsafe::reinterpret_cast(0)];
// FIXME: ptr::null instead of cast
argptrs += [unsafe {unsafe::reinterpret_cast(0)}];
ret argptrs;
}