diff --git a/src/http.cc b/src/http.cc index 0140c530ce..203c05f0f0 100644 --- a/src/http.cc +++ b/src/http.cc @@ -39,13 +39,13 @@ HTTPConnection::Initialize (Handle target) { HandleScope scope; - Local t = FunctionTemplate::New(v8NewClient); + Local t = FunctionTemplate::New(NewClient); client_constructor_template = Persistent::New(t); client_constructor_template->Inherit(Connection::constructor_template); client_constructor_template->InstanceTemplate()->SetInternalFieldCount(1); target->Set(String::NewSymbol("LowLevelClient"), client_constructor_template->GetFunction()); - t = FunctionTemplate::New(v8NewServer); + t = FunctionTemplate::New(NewServer); server_constructor_template = Persistent::New(t); server_constructor_template->Inherit(Connection::constructor_template); server_constructor_template->InstanceTemplate()->SetInternalFieldCount(1); @@ -54,7 +54,7 @@ HTTPConnection::Initialize (Handle target) } Handle -HTTPConnection::v8NewClient (const Arguments& args) +HTTPConnection::NewClient (const Arguments& args) { HandleScope scope; @@ -65,7 +65,7 @@ HTTPConnection::v8NewClient (const Arguments& args) } Handle -HTTPConnection::v8NewServer (const Arguments& args) +HTTPConnection::NewServer (const Arguments& args) { HandleScope scope; @@ -295,7 +295,7 @@ HTTPServer::Initialize (Handle target) { HandleScope scope; - Local t = FunctionTemplate::New(v8New); + Local t = FunctionTemplate::New(New); constructor_template = Persistent::New(t); constructor_template->Inherit(Acceptor::constructor_template); constructor_template->InstanceTemplate()->SetInternalFieldCount(1); @@ -303,7 +303,7 @@ HTTPServer::Initialize (Handle target) } Handle -HTTPServer::v8New (const Arguments& args) +HTTPServer::New (const Arguments& args) { HandleScope scope; diff --git a/src/http.h b/src/http.h index 62ee3c353f..cfebad3349 100644 --- a/src/http.h +++ b/src/http.h @@ -15,8 +15,8 @@ public: static v8::Persistent server_constructor_template; protected: - static v8::Handle v8NewClient (const v8::Arguments& args); - static v8::Handle v8NewServer (const v8::Arguments& args); + static v8::Handle NewClient (const v8::Arguments& args); + static v8::Handle NewServer (const v8::Arguments& args); HTTPConnection (v8::Handle handle, enum http_parser_type type); @@ -43,7 +43,7 @@ public: static v8::Persistent constructor_template; protected: - static v8::Handle v8New (const v8::Arguments& args); + static v8::Handle New (const v8::Arguments& args); HTTPServer (v8::Handle handle, diff --git a/src/net.cc b/src/net.cc index 694e4cf05d..2da99bb86e 100644 --- a/src/net.cc +++ b/src/net.cc @@ -49,17 +49,17 @@ Connection::Initialize (v8::Handle target) { HandleScope scope; - Local t = FunctionTemplate::New(v8New); + Local t = FunctionTemplate::New(New); constructor_template = Persistent::New(t); constructor_template->InstanceTemplate()->SetInternalFieldCount(1); - NODE_SET_PROTOTYPE_METHOD(constructor_template, "connect", v8Connect); - NODE_SET_PROTOTYPE_METHOD(constructor_template, "send", v8Send); - NODE_SET_PROTOTYPE_METHOD(constructor_template, "sendUtf8", v8SendUtf8); - NODE_SET_PROTOTYPE_METHOD(constructor_template, "close", v8Close); - NODE_SET_PROTOTYPE_METHOD(constructor_template, "fullClose", v8FullClose); - NODE_SET_PROTOTYPE_METHOD(constructor_template, "forceClose", v8ForceClose); + NODE_SET_PROTOTYPE_METHOD(constructor_template, "connect", Connect); + NODE_SET_PROTOTYPE_METHOD(constructor_template, "send", Send); + NODE_SET_PROTOTYPE_METHOD(constructor_template, "sendUtf8", SendUtf8); + NODE_SET_PROTOTYPE_METHOD(constructor_template, "close", Close); + NODE_SET_PROTOTYPE_METHOD(constructor_template, "fullClose", FullClose); + NODE_SET_PROTOTYPE_METHOD(constructor_template, "forceClose", ForceClose); constructor_template->PrototypeTemplate()->SetAccessor( String::NewSymbol("encoding"), @@ -143,7 +143,7 @@ Connection::SetAcceptor (Handle acceptor_handle) } Handle -Connection::v8New (const Arguments& args) +Connection::New (const Arguments& args) { HandleScope scope; @@ -154,7 +154,7 @@ Connection::v8New (const Arguments& args) } Handle -Connection::v8Connect (const Arguments& args) +Connection::Connect (const Arguments& args) { Connection *connection = NODE_UNWRAP(Connection, args.Holder()); if (!connection) return Handle(); @@ -237,7 +237,7 @@ Connection::AfterResolve (eio_req *req) } Handle -Connection::v8Close (const Arguments& args) +Connection::Close (const Arguments& args) { HandleScope scope; Connection *connection = NODE_UNWRAP(Connection, args.Holder()); @@ -248,7 +248,7 @@ Connection::v8Close (const Arguments& args) } Handle -Connection::v8FullClose (const Arguments& args) +Connection::FullClose (const Arguments& args) { HandleScope scope; Connection *connection = NODE_UNWRAP(Connection, args.Holder()); @@ -259,7 +259,7 @@ Connection::v8FullClose (const Arguments& args) } Handle -Connection::v8ForceClose (const Arguments& args) +Connection::ForceClose (const Arguments& args) { HandleScope scope; Connection *connection = NODE_UNWRAP(Connection, args.Holder()); @@ -295,7 +295,7 @@ new_buf (size_t size) } Handle -Connection::v8SendUtf8 (const Arguments& args) +Connection::SendUtf8 (const Arguments& args) { HandleScope scope; Connection *connection = NODE_UNWRAP(Connection, args.Holder()); @@ -315,7 +315,7 @@ Connection::v8SendUtf8 (const Arguments& args) } Handle -Connection::v8Send (const Arguments& args) +Connection::Send (const Arguments& args) { HandleScope scope; Connection *connection = NODE_UNWRAP(Connection, args.Holder()); @@ -418,13 +418,13 @@ Acceptor::Initialize (Handle target) { HandleScope scope; - Local t = FunctionTemplate::New(v8New); + Local t = FunctionTemplate::New(New); constructor_template = Persistent::New(t); constructor_template->InstanceTemplate()->SetInternalFieldCount(1); - NODE_SET_PROTOTYPE_METHOD(constructor_template, "listen", v8Listen); - NODE_SET_PROTOTYPE_METHOD(constructor_template, "close", v8Close); + NODE_SET_PROTOTYPE_METHOD(constructor_template, "listen", Listen); + NODE_SET_PROTOTYPE_METHOD(constructor_template, "close", Close); target->Set(String::NewSymbol("Server"), constructor_template->GetFunction()); } @@ -490,7 +490,7 @@ Acceptor::OnConnection (struct sockaddr *addr, socklen_t len) } Handle -Acceptor::v8New (const Arguments& args) +Acceptor::New (const Arguments& args) { HandleScope scope; @@ -513,7 +513,7 @@ Acceptor::v8New (const Arguments& args) } Handle -Acceptor::v8Listen (const Arguments& args) +Acceptor::Listen (const Arguments& args) { Acceptor *acceptor = NODE_UNWRAP(Acceptor, args.Holder()); if (!acceptor) return Handle(); @@ -546,7 +546,7 @@ Acceptor::v8Listen (const Arguments& args) } Handle -Acceptor::v8Close (const Arguments& args) +Acceptor::Close (const Arguments& args) { Acceptor *acceptor = NODE_UNWRAP(Acceptor, args.Holder()); if (!acceptor) return Handle(); diff --git a/src/net.h b/src/net.h index f6b5332ca5..a500ebc3e9 100644 --- a/src/net.h +++ b/src/net.h @@ -18,13 +18,13 @@ public: protected: /* v8 interface */ static v8::Persistent constructor_template; - static v8::Handle v8New (const v8::Arguments& args); - static v8::Handle v8Connect (const v8::Arguments& args); - static v8::Handle v8Send (const v8::Arguments& args); - static v8::Handle v8SendUtf8 (const v8::Arguments& args); - static v8::Handle v8Close (const v8::Arguments& args); - static v8::Handle v8FullClose (const v8::Arguments& args); - static v8::Handle v8ForceClose (const v8::Arguments& args); + static v8::Handle New (const v8::Arguments& args); + static v8::Handle Connect (const v8::Arguments& args); + static v8::Handle Send (const v8::Arguments& args); + static v8::Handle SendUtf8 (const v8::Arguments& args); + static v8::Handle Close (const v8::Arguments& args); + static v8::Handle FullClose (const v8::Arguments& args); + static v8::Handle ForceClose (const v8::Arguments& args); static v8::Handle EncodingGetter (v8::Local _, const v8::AccessorInfo& info); static void EncodingSetter (v8::Local _, v8::Local value, const v8::AccessorInfo& info); @@ -107,9 +107,9 @@ public: protected: static v8::Persistent constructor_template; - static v8::Handle v8New (const v8::Arguments& args); - static v8::Handle v8Listen (const v8::Arguments& args); - static v8::Handle v8Close (const v8::Arguments& args); + static v8::Handle New (const v8::Arguments& args); + static v8::Handle Listen (const v8::Arguments& args); + static v8::Handle Close (const v8::Arguments& args); Acceptor (v8::Handle handle, v8::Handle connection_handler,