rename module load function to Init_modulename(), like ruby

This commit is contained in:
Ryan
2009-03-04 10:08:33 +01:00
parent e02b71ebe8
commit dbbd25ae65
7 changed files with 9 additions and 10 deletions

View File

@@ -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);

View File

@@ -540,7 +540,7 @@ server_constructor (const Arguments& args)
}
void
node_http_initialize (Handle<Object> target)
Init_http (Handle<Object> target)
{
HandleScope scope;

View File

@@ -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

View File

@@ -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);

View File

@@ -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

View File

@@ -165,7 +165,7 @@ static Handle<Value> setInterval
}
void
node_timer_initialize (Handle<Object> target)
Init_timer (Handle<Object> target)
{
HandleScope scope;

View File

@@ -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