From e5bb8abc9d3084b8d0ffaaaf06cbfc4ea5138431 Mon Sep 17 00:00:00 2001 From: Paul Querna Date: Tue, 13 Jul 2010 23:38:49 -0700 Subject: [PATCH] Move stdio to extension model. --- src/node.cc | 6 ------ src/node_extensions.h | 3 ++- src/node_stdio.cc | 2 ++ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/node.cc b/src/node.cc index f68b885c01..35b1199529 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1586,12 +1586,6 @@ static Handle Binding(const Arguments& args) { exports = Object::New(); modp->register_func(exports); binding_cache->Set(module, exports); - } - else if (!strcmp(*module_v, "stdio")) { - exports = Object::New(); - Stdio::Initialize(exports); - binding_cache->Set(module, exports); - } else if (!strcmp(*module_v, "cares")) { exports = Object::New(); Cares::Initialize(exports); diff --git a/src/node_extensions.h b/src/node_extensions.h index f463a8cb7e..294dc3a4af 100644 --- a/src/node_extensions.h +++ b/src/node_extensions.h @@ -1,8 +1,9 @@ NODE_EXT_LIST_START -NODE_EXT_LIST_ITEM(node_net) #ifdef HAVE_OPENSSL NODE_EXT_LIST_ITEM(node_crypto) #endif +NODE_EXT_LIST_ITEM(node_net) +NODE_EXT_LIST_ITEM(node_stdio) NODE_EXT_LIST_END diff --git a/src/node_stdio.cc b/src/node_stdio.cc index cf51556ff5..6697f8a2c4 100644 --- a/src/node_stdio.cc +++ b/src/node_stdio.cc @@ -216,3 +216,5 @@ void Stdio::Initialize(v8::Handle target) { } // namespace node + +NODE_MODULE(node_stdio, node::Stdio::Initialize);