mirror of
https://github.com/nodejs/node-v0.x-archive.git
synced 2026-04-28 03:01:10 -04:00
rename module load function to Init_modulename(), like ruby
This commit is contained in:
7
node.cc
7
node.cc
@@ -151,10 +151,9 @@ main (int argc, char *argv[])
|
||||
Local<Object> g = Context::GetCurrent()->Global();
|
||||
g->Set( String::New("log"), FunctionTemplate::New(LogCallback)->GetFunction());
|
||||
|
||||
node_tcp_initialize(g);
|
||||
node_http_initialize(g);
|
||||
node_timer_initialize(g);
|
||||
|
||||
Init_timer(g);
|
||||
Init_tcp(g);
|
||||
Init_http(g);
|
||||
|
||||
V8::SetFatalErrorHandler(OnFatalError);
|
||||
|
||||
|
||||
@@ -540,7 +540,7 @@ server_constructor (const Arguments& args)
|
||||
}
|
||||
|
||||
void
|
||||
node_http_initialize (Handle<Object> target)
|
||||
Init_http (Handle<Object> target)
|
||||
{
|
||||
HandleScope scope;
|
||||
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
#include <v8.h>
|
||||
|
||||
void node_http_initialize (v8::Handle<v8::Object> target);
|
||||
void Init_http (v8::Handle<v8::Object> target);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -166,7 +166,7 @@ static Handle<Value> Connect
|
||||
}
|
||||
|
||||
void
|
||||
node_tcp_initialize (Handle<Object> target)
|
||||
Init_tcp (Handle<Object> target)
|
||||
{
|
||||
oi_async_init(&thread_pool);
|
||||
oi_async_attach(node_loop(), &thread_pool);
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
#include <v8.h>
|
||||
|
||||
void node_tcp_initialize (v8::Handle<v8::Object> target);
|
||||
void Init_tcp (v8::Handle<v8::Object> target);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -165,7 +165,7 @@ static Handle<Value> setInterval
|
||||
}
|
||||
|
||||
void
|
||||
node_timer_initialize (Handle<Object> target)
|
||||
Init_timer (Handle<Object> target)
|
||||
{
|
||||
HandleScope scope;
|
||||
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
#include <v8.h>
|
||||
|
||||
void node_timer_initialize (v8::Handle<v8::Object> target);
|
||||
void Init_timer (v8::Handle<v8::Object> target);
|
||||
|
||||
#endif // node_timer_h
|
||||
|
||||
Reference in New Issue
Block a user