From e65c27062f3003884cfc8316b65359e7da31c9ce Mon Sep 17 00:00:00 2001 From: Paul Querna Date: Tue, 13 Jul 2010 23:51:08 -0700 Subject: [PATCH] Move http parser to extension model. --- src/node.cc | 4 ---- src/node_extensions.h | 1 + src/node_http_parser.cc | 1 + 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/node.cc b/src/node.cc index 87a2bb4..f6dbc32 100644 --- a/src/node.cc +++ b/src/node.cc @@ -1597,10 +1597,6 @@ static Handle Binding(const Arguments& args) { StatWatcher::Initialize(exports); File::Initialize(exports); binding_cache->Set(module, exports); - } else if (!strcmp(*module_v, "http_parser")) { - exports = Object::New(); - InitHttpParser(exports); - binding_cache->Set(module, exports); } else if (!strcmp(*module_v, "child_process")) { exports = Object::New(); ChildProcess::Initialize(exports); diff --git a/src/node_extensions.h b/src/node_extensions.h index 8ec1d53..ed63a45 100644 --- a/src/node_extensions.h +++ b/src/node_extensions.h @@ -5,6 +5,7 @@ NODE_EXT_LIST_ITEM(node_cares) NODE_EXT_LIST_ITEM(node_crypto) #endif NODE_EXT_LIST_ITEM(node_net) +NODE_EXT_LIST_ITEM(node_http_parser) NODE_EXT_LIST_ITEM(node_signal_watcher) NODE_EXT_LIST_ITEM(node_stdio) NODE_EXT_LIST_END diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc index 61992e0..0ca04bd 100644 --- a/src/node_http_parser.cc +++ b/src/node_http_parser.cc @@ -473,3 +473,4 @@ void InitHttpParser(Handle target) { } // namespace node +NODE_MODULE(node_http_parser, node::InitHttpParser); -- 2.7.4