summaryrefslogtreecommitdiff
path: root/src/tty_wrap.cc
diff options
context:
space:
mode:
authorFedor Indutny <fedor.indutny@gmail.com>2013-06-11 12:52:27 +0200
committerFedor Indutny <fedor.indutny@gmail.com>2013-06-15 21:44:50 +0200
commit6978e998ee7c08b3dd10e4cecd2a167696b74317 (patch)
tree62b4b089a9f3977f18bfde10d570cec0f5200cb4 /src/tty_wrap.cc
parent0495b7031c9a33821e3a518e93911d2832f59d19 (diff)
downloadandroid-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.cc3
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());
}