Browse Source

rename module load function to Init_modulename(), like ruby

v0.7.4-release
Ryan 16 years ago
parent
commit
dbbd25ae65
  1. 7
      node.cc
  2. 2
      node_http.cc
  3. 2
      node_http.h
  4. 2
      node_tcp.cc
  5. 2
      node_tcp.h
  6. 2
      node_timer.cc
  7. 2
      node_timer.h

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

2
node_http.cc

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

2
node_http.h

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

2
node_tcp.cc

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

2
node_tcp.h

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

2
node_timer.cc

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

2
node_timer.h

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

Loading…
Cancel
Save