# HG changeset patch # User Waqas Hussain # Date 1318535189 -18000 # Node ID 1b4161970842de30fcf21ea957923bbf499a4f19 # Parent acc37e2219401b01cb308eb5758b5ef98270b8c8 net.server_event, net.server_select: Fixed some global pollution. diff -r acc37e221940 -r 1b4161970842 net/server_event.lua --- a/net/server_event.lua Fri Aug 12 00:01:35 2011 +0200 +++ b/net/server_event.lua Fri Oct 14 00:46:29 2011 +0500 @@ -827,14 +827,14 @@ end end -function get_backend() +local function get_backend() return base:method(); end -- We need to hold onto the events to stop them -- being garbage-collected local signal_events = {}; -- [signal_num] -> event object -function hook_signal(signal_num, handler) +local function hook_signal(signal_num, handler) local function _handler(event) local ret = handler(); if ret ~= false then -- Continue handling this signal? diff -r acc37e221940 -r 1b4161970842 net/server_select.lua --- a/net/server_select.lua Fri Aug 12 00:01:35 2011 +0200 +++ b/net/server_select.lua Fri Oct 14 00:46:29 2011 +0500 @@ -781,7 +781,7 @@ local quitting; -setquitting = function (quit) +local function setquitting(quit) quitting = not not quit; end @@ -832,7 +832,7 @@ return "quitting" end -step = function () +local function step() return loop(true); end