From dbbd25ae65d982524474b4f68d2e4350eedbf729 Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 4 Mar 2009 10:08:33 +0100 Subject: [PATCH] rename module load function to Init_modulename(), like ruby --- node.cc | 7 +++---- node_http.cc | 2 +- node_http.h | 2 +- node_tcp.cc | 2 +- node_tcp.h | 2 +- node_timer.cc | 2 +- node_timer.h | 2 +- 7 files changed, 9 insertions(+), 10 deletions(-) diff --git a/node.cc b/node.cc index baf97f619..31c5d6e84 100644 --- a/node.cc +++ b/node.cc @@ -151,10 +151,9 @@ main (int argc, char *argv[]) Local 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); diff --git a/node_http.cc b/node_http.cc index 63f0bbf46..089317d5e 100644 --- a/node_http.cc +++ b/node_http.cc @@ -540,7 +540,7 @@ server_constructor (const Arguments& args) } void -node_http_initialize (Handle target) +Init_http (Handle target) { HandleScope scope; diff --git a/node_http.h b/node_http.h index 71bf8c9ec..68a9df743 100644 --- a/node_http.h +++ b/node_http.h @@ -3,6 +3,6 @@ #include -void node_http_initialize (v8::Handle target); +void Init_http (v8::Handle target); #endif diff --git a/node_tcp.cc b/node_tcp.cc index fa4c939d6..c4ae22980 100644 --- a/node_tcp.cc +++ b/node_tcp.cc @@ -166,7 +166,7 @@ static Handle Connect } void -node_tcp_initialize (Handle target) +Init_tcp (Handle target) { oi_async_init(&thread_pool); oi_async_attach(node_loop(), &thread_pool); diff --git a/node_tcp.h b/node_tcp.h index 611e14ca4..4193e160f 100644 --- a/node_tcp.h +++ b/node_tcp.h @@ -3,6 +3,6 @@ #include -void node_tcp_initialize (v8::Handle target); +void Init_tcp (v8::Handle target); #endif diff --git a/node_timer.cc b/node_timer.cc index 39e1e27ab..9091dc9bc 100644 --- a/node_timer.cc +++ b/node_timer.cc @@ -165,7 +165,7 @@ static Handle setInterval } void -node_timer_initialize (Handle target) +Init_timer (Handle target) { HandleScope scope; diff --git a/node_timer.h b/node_timer.h index 5e4dacd38..e1bc03278 100644 --- a/node_timer.h +++ b/node_timer.h @@ -3,6 +3,6 @@ #include -void node_timer_initialize (v8::Handle target); +void Init_timer (v8::Handle target); #endif // node_timer_h