Move over to calling ptr::addr_of
Everything should now call ptr::addr_of instead of ptr::p2::addr_of. Only the pipes macro code when compiled by stage0 will call ptr::p2::addr_of. Needs a snapshot to get rid of that.
This commit is contained in:
parent
72ae42627b
commit
b18320446e
54 changed files with 169 additions and 172 deletions
|
@ -1780,7 +1780,7 @@ pub pure fn as_c_str<T>(s: &str, f: fn(*libc::c_char) -> T) -> T {
|
|||
#[inline(always)]
|
||||
pub pure fn as_buf<T>(s: &str, f: fn(*u8, uint) -> T) -> T {
|
||||
unsafe {
|
||||
let v : *(*u8,uint) = ::cast::reinterpret_cast(&ptr::p2::addr_of(&s));
|
||||
let v : *(*u8,uint) = ::cast::reinterpret_cast(&ptr::addr_of(&s));
|
||||
let (buf,len) = *v;
|
||||
f(buf, len)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue