Make ptr::addr_of return an immutable vec, add mut_addr_of

This commit is contained in:
Marijn Haverbeke
2011-11-02 11:42:51 +01:00
parent eaf9e05611
commit 0a20eed2db
8 changed files with 22 additions and 11 deletions

View File

@@ -64,7 +64,7 @@ fn dylib_filename(base: str) -> str { ret "lib" + base + ".so"; }
fn pipe() -> {in: int, out: int} {
let fds = {mutable in: 0, mutable out: 0};
assert (os::libc::pipe(ptr::addr_of(fds.in)) == 0);
assert (os::libc::pipe(ptr::mut_addr_of(fds.in)) == 0);
ret {in: fds.in, out: fds.out};
}