diff options
author | Fedor Indutny <fedor.indutny@gmail.com> | 2013-06-11 12:52:27 +0200 |
---|---|---|
committer | Fedor Indutny <fedor.indutny@gmail.com> | 2013-06-15 21:44:50 +0200 |
commit | 6978e998ee7c08b3dd10e4cecd2a167696b74317 (patch) | |
tree | 62b4b089a9f3977f18bfde10d570cec0f5200cb4 /src/tty_wrap.cc | |
parent | 0495b7031c9a33821e3a518e93911d2832f59d19 (diff) | |
download | android-node-v8-6978e998ee7c08b3dd10e4cecd2a167696b74317.tar.gz android-node-v8-6978e998ee7c08b3dd10e4cecd2a167696b74317.tar.bz2 android-node-v8-6978e998ee7c08b3dd10e4cecd2a167696b74317.zip |
process: abstract out HandleToStream
Originally contributed by @tjfontaine, but modified to be faster and
more generic.
Diffstat (limited to 'src/tty_wrap.cc')
-rw-r--r-- | src/tty_wrap.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tty_wrap.cc b/src/tty_wrap.cc index 1e70a4ff2a..f96ab0cdc3 100644 --- a/src/tty_wrap.cc +++ b/src/tty_wrap.cc @@ -25,6 +25,7 @@ #include "handle_wrap.h" #include "stream_wrap.h" #include "tty_wrap.h" +#include "node_wrap.h" namespace node { @@ -81,6 +82,8 @@ void TTYWrap::Initialize(Handle<Object> target) { NODE_SET_METHOD(target, "isTTY", IsTTY); NODE_SET_METHOD(target, "guessHandleType", GuessHandleType); + ttyConstructorTmpl = Persistent<FunctionTemplate>::New(node_isolate, t); + target->Set(String::NewSymbol("TTY"), t->GetFunction()); } |