aboutsummaryrefslogtreecommitdiff
path: root/ctr-std/src/panicking.rs
diff options
context:
space:
mode:
authorFenrir <[email protected]>2017-02-24 01:22:17 -0700
committerFenrir <[email protected]>2017-02-24 01:22:17 -0700
commit3f2366df139e8bc0323ab7ae287ffc9e25129c6c (patch)
treed205490a6357d22f824eb3ed92adeaf188f11085 /ctr-std/src/panicking.rs
parentMerge pull request #20 from panicbit/service_ssl (diff)
downloadarchived-ctru-rs-3f2366df139e8bc0323ab7ae287ffc9e25129c6c.tar.xz
archived-ctru-rs-3f2366df139e8bc0323ab7ae287ffc9e25129c6c.zip
implement buffered stdio
Diffstat (limited to 'ctr-std/src/panicking.rs')
-rw-r--r--ctr-std/src/panicking.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/ctr-std/src/panicking.rs b/ctr-std/src/panicking.rs
index d6b922d..e0f9477 100644
--- a/ctr-std/src/panicking.rs
+++ b/ctr-std/src/panicking.rs
@@ -11,10 +11,19 @@
//! Implementation of various bits and pieces of the `panic!` macro and
//! associated runtime pieces.
+use io::prelude::*;
+
use any::Any;
+use cell::RefCell;
use fmt;
use __core::fmt::Display;
+thread_local! {
+ pub static LOCAL_STDERR: RefCell<Option<Box<Write + Send>>> = {
+ RefCell::new(None)
+ }
+}
+
///The compiler wants this to be here. Otherwise it won't be happy. And we like happy compilers.
#[lang = "eh_personality"]
extern fn eh_personality() {}