diff options
Diffstat (limited to 'src/c/stdio.rs')
-rw-r--r-- | src/c/stdio.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/c/stdio.rs b/src/c/stdio.rs index aa824ed..c878f19 100644 --- a/src/c/stdio.rs +++ b/src/c/stdio.rs @@ -7,8 +7,12 @@ pub struct OStream { file: *mut libc::FILE } -pub fn stdout() -> OStream { - OStream { file: unsafe { posix::stdout } } +pub unsafe fn stdout() -> OStream { + OStream { file: posix::stdout } +} + +pub unsafe fn stderr() -> OStream { + OStream { file: posix::stderr } } impl OStream { |