From 52b498494534784c77bfa4a93706be40620ebd9a Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 4 Apr 2020 01:47:30 +0200 Subject: Lots of changes --- src/c/stdio.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/c/stdio.rs') 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 { -- cgit v1.2.3