summaryrefslogtreecommitdiffstats
path: root/src/c/stdio.rs
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2020-04-04 01:47:30 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2020-04-04 01:47:30 +0200
commit52b498494534784c77bfa4a93706be40620ebd9a (patch)
treed8499f6bec9a452231c4fcfc4d05d6b450cebf1b /src/c/stdio.rs
parent9aae18d76454b01f07b177efafcc9867dfa7dff1 (diff)
downloadneco-52b498494534784c77bfa4a93706be40620ebd9a.tar
neco-52b498494534784c77bfa4a93706be40620ebd9a.zip
Lots of changes
Diffstat (limited to 'src/c/stdio.rs')
-rw-r--r--src/c/stdio.rs8
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 {