commit
01f2c67c96
2 changed files with 3 additions and 3 deletions
|
@ -122,9 +122,9 @@ pub fn write(w: &mut Write) -> io::Result<()> {
|
||||||
|
|
||||||
try!(writeln!(w, "stack backtrace:"));
|
try!(writeln!(w, "stack backtrace:"));
|
||||||
// 100 lines should be enough
|
// 100 lines should be enough
|
||||||
const SIZE: uint = 100;
|
const SIZE: usize = 100;
|
||||||
let mut buf: [*mut 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 libc::c_int) as uint};
|
let cnt = unsafe { backtrace(buf.as_mut_ptr(), SIZE as libc::c_int) as usize};
|
||||||
|
|
||||||
// skipping the first one as it is write itself
|
// skipping the first one as it is write itself
|
||||||
let iter = (1..cnt).map(|i| {
|
let iter = (1..cnt).map(|i| {
|
||||||
|
|
|
@ -339,7 +339,7 @@ pub fn args() -> Args {
|
||||||
let info = objc_msgSend(klass, process_info_sel);
|
let info = objc_msgSend(klass, process_info_sel);
|
||||||
let args = objc_msgSend(info, arguments_sel);
|
let args = objc_msgSend(info, arguments_sel);
|
||||||
|
|
||||||
let cnt: int = mem::transmute(objc_msgSend(args, count_sel));
|
let cnt: usize = mem::transmute(objc_msgSend(args, count_sel));
|
||||||
for i in (0..cnt) {
|
for i in (0..cnt) {
|
||||||
let tmp = objc_msgSend(args, object_at_sel, i);
|
let tmp = objc_msgSend(args, object_at_sel, i);
|
||||||
let utf_c_str: *const libc::c_char =
|
let utf_c_str: *const libc::c_char =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue