Expose STDERR to rust.

This commit is contained in:
Erick Tryzelaar 2011-08-24 21:19:56 -07:00
parent 614a930c51
commit b199e9da92
3 changed files with 4 additions and 0 deletions

View file

@ -4,6 +4,7 @@ import os::libc;
native "rust" mod rustrt {
fn rust_get_stdin() -> os::libc::FILE;
fn rust_get_stdout() -> os::libc::FILE;
fn rust_get_stderr() -> os::libc::FILE;
}
@ -374,6 +375,7 @@ fn buffered_file_buf_writer(path: &istr) -> buf_writer {
// FIXME it would be great if this could be a const
fn stdout() -> writer { ret new_writer(fd_buf_writer(1, option::none)); }
fn stderr() -> writer { ret new_writer(fd_buf_writer(2, option::none)); }
type str_writer =
obj {