node_net: IsIP and CreateErrnoException just work

pull/22966/head
Bert Belder 2010-11-26 03:19:30 +01:00
parent a807ac6660
commit 46dc393ff1
1 changed files with 3 additions and 3 deletions

View File

@ -1430,6 +1430,8 @@ static Handle<Value> GetAddrInfo(const Arguments& args) {
return Undefined(); return Undefined();
} }
#endif // __POSIX__
static Handle<Value> IsIP(const Arguments& args) { static Handle<Value> IsIP(const Arguments& args) {
HandleScope scope; HandleScope scope;
@ -1467,8 +1469,6 @@ static Handle<Value> CreateErrnoException(const Arguments& args) {
return scope.Close(exception); return scope.Close(exception);
} }
#endif // __POSIX__
void InitNet(Handle<Object> target) { void InitNet(Handle<Object> target) {
HandleScope scope; HandleScope scope;
@ -1510,9 +1510,9 @@ void InitNet(Handle<Object> target) {
NODE_SET_METHOD(target, "getsockname", GetSockName); NODE_SET_METHOD(target, "getsockname", GetSockName);
NODE_SET_METHOD(target, "getpeername", GetPeerName); NODE_SET_METHOD(target, "getpeername", GetPeerName);
NODE_SET_METHOD(target, "getaddrinfo", GetAddrInfo); NODE_SET_METHOD(target, "getaddrinfo", GetAddrInfo);
#endif // __POSIX__
NODE_SET_METHOD(target, "isIP", IsIP); NODE_SET_METHOD(target, "isIP", IsIP);
NODE_SET_METHOD(target, "errnoException", CreateErrnoException); NODE_SET_METHOD(target, "errnoException", CreateErrnoException);
#endif // __POSIX__
errno_symbol = NODE_PSYMBOL("errno"); errno_symbol = NODE_PSYMBOL("errno");
syscall_symbol = NODE_PSYMBOL("syscall"); syscall_symbol = NODE_PSYMBOL("syscall");