提交 25e8b6ed 编写于 作者: B bors

auto merge of #15404 : vhbit/rust/ios-ptr-fixes, r=pcwalton

......@@ -261,7 +261,7 @@ pub fn write(w: &mut Writer) -> IoResult<()> {
use slice::{MutableVector};
extern {
fn backtrace(buf: *mut *const libc::c_void,
fn backtrace(buf: *mut *mut libc::c_void,
sz: libc::c_int) -> libc::c_int;
}
......@@ -274,7 +274,7 @@ fn backtrace(buf: *mut *const libc::c_void,
try!(writeln!(w, "stack backtrace:"));
// 100 lines should be enough
static SIZE: libc::c_int = 100;
let mut buf: [*const libc::c_void, ..SIZE] = unsafe {mem::zeroed()};
let mut buf: [*mut libc::c_void, ..SIZE] = unsafe {mem::zeroed()};
let cnt = unsafe { backtrace(buf.as_mut_ptr(), SIZE) as uint};
// skipping the first one as it is write itself
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册