diff --git a/src/node.cc b/src/node.cc index f68b885c0..35b119952 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 f463a8cb7..294dc3a4a 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 cf51556ff..6697f8a2c 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);