From 208290b524ced660e12f3b6794842ae1a460971b Mon Sep 17 00:00:00 2001 From: Paul Querna Date: Tue, 13 Jul 2010 23:42:23 -0700 Subject: [PATCH] Move cares to extension model --- src/node.cc | 5 ----- src/node_cares.cc | 2 ++ src/node_extensions.h | 1 + 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/node.cc b/src/node.cc index 35b1199529..b73292c42c 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1586,11 +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, "cares")) { - exports = Object::New(); - Cares::Initialize(exports); - binding_cache->Set(module, exports); - } else if (!strcmp(*module_v, "fs")) { exports = Object::New(); diff --git a/src/node_cares.cc b/src/node_cares.cc index 34aeb8b639..b110a454b4 100644 --- a/src/node_cares.cc +++ b/src/node_cares.cc @@ -761,3 +761,5 @@ void Channel::SockStateCb(void *data, int sock, int read, int write) { } // namespace node + +NODE_MODULE(node_cares, node::Cares::Initialize); diff --git a/src/node_extensions.h b/src/node_extensions.h index 294dc3a4af..504657961b 100644 --- a/src/node_extensions.h +++ b/src/node_extensions.h @@ -1,5 +1,6 @@ NODE_EXT_LIST_START +NODE_EXT_LIST_ITEM(node_cares) #ifdef HAVE_OPENSSL NODE_EXT_LIST_ITEM(node_crypto) #endif