core: Don't use printf in rtdebug!
The bots were showing a segfault that I can't reproduce. Assuming it's varargs related so let's not use printf
This commit is contained in:
parent
d30c758974
commit
723d2247c1
1 changed files with 4 additions and 10 deletions
|
|
@ -15,16 +15,10 @@ macro_rules! rtdebug_ (
|
|||
dumb_println(fmt!( $($arg),+ ));
|
||||
|
||||
fn dumb_println(s: &str) {
|
||||
use str::as_c_str;
|
||||
use libc::c_char;
|
||||
|
||||
extern {
|
||||
fn printf(s: *c_char);
|
||||
}
|
||||
|
||||
do as_c_str(s.to_str() + "\n") |s| {
|
||||
unsafe { printf(s); }
|
||||
}
|
||||
use io::WriterUtil;
|
||||
let dbg = ::libc::STDERR_FILENO as ::io::fd_t;
|
||||
dbg.write_str(s);
|
||||
dbg.write_str("\n");
|
||||
}
|
||||
|
||||
} )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue