# HG changeset patch # User Waqas Hussain # Date 1265744070 -18000 # Node ID 60493186fef6d974967729e7ec944a30afd98aca # Parent 0584e157f0737355cc19613c34b1dc58c6849984 net.dns: Removed some useless indirection to improve readability. diff -r 0584e157f073 -r 60493186fef6 net/dns.lua --- a/net/dns.lua Wed Feb 10 00:12:48 2010 +0500 +++ b/net/dns.lua Wed Feb 10 00:34:30 2010 +0500 @@ -927,37 +927,36 @@ return r; end +local _resolver = dns.resolver(); +dns._resolver = _resolver; function dns.lookup(...) -- - - - - - - - - - - - - - - - - - - - - lookup - return resolve(resolver.lookup, ...); + return _resolver:lookup(...); end function dns.purge(...) -- - - - - - - - - - - - - - - - - - - - - - purge - return resolve(resolver.purge, ...); + return _resolver:purge(...); end function dns.peek(...) -- - - - - - - - - - - - - - - - - - - - - - - peek - return resolve(resolver.peek, ...); + return _resolver:peek(...); end - function dns.query(...) -- - - - - - - - - - - - - - - - - - - - - - query - return resolve(resolver.query, ...); + return _resolver:query(...); end function dns.feed(...) -- - - - - - - - - - - - - - - - - - - - - - feed - return resolve(resolver.feed, ...); + return _resolver:feed(...); end function dns.cancel(...) -- - - - - - - - - - - - - - - - - - - - - - cancel - return resolve(resolver.cancel, ...); + return _resolver:cancel(...); end function dns:socket_wrapper_set(...) -- - - - - - - - - socket_wrapper_set - return resolve(resolver.socket_wrapper_set, ...); + return _resolver:socket_wrapper_set(...); end -dns._resolver = dns.resolver(); - return dns;