Move signal_watcher to extension model.
authorPaul Querna <pquerna@apache.org>
Wed, 14 Jul 2010 06:45:24 +0000 (23:45 -0700)
committerRyan Dahl <ry@tinyclouds.org>
Wed, 14 Jul 2010 17:31:45 +0000 (10:31 -0700)
src/node.cc
src/node_extensions.h
src/node_signal_watcher.cc

index b73292c..87a2bb4 100644 (file)
@@ -1597,10 +1597,6 @@ static Handle<Value> Binding(const Arguments& args) {
     StatWatcher::Initialize(exports);
     File::Initialize(exports);
     binding_cache->Set(module, exports);
-  } else if (!strcmp(*module_v, "signal_watcher")) {
-    exports = Object::New();
-    SignalWatcher::Initialize(exports);
-    binding_cache->Set(module, exports);
   } else if (!strcmp(*module_v, "http_parser")) {
     exports = Object::New();
     InitHttpParser(exports);
index 5046579..8ec1d53 100644 (file)
@@ -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_signal_watcher)
 NODE_EXT_LIST_ITEM(node_stdio)
 NODE_EXT_LIST_END
 
index 21f8664..305c06a 100644 (file)
@@ -96,3 +96,5 @@ void SignalWatcher::Stop () {
 }
 
 }  // namespace node
+
+NODE_MODULE(node_signal_watcher, node::SignalWatcher::Initialize);