From a5161776319695ab00b67d421e20c2d6969def81 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Fri, 14 Oct 2011 00:46:29 +0500 Subject: net.server_event, net.server_select: Fixed some global pollution. --- net/server_event.lua | 4 ++-- net/server_select.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'net') diff --git a/net/server_event.lua b/net/server_event.lua index daf2de6a..f4745c34 100644 --- a/net/server_event.lua +++ b/net/server_event.lua @@ -827,14 +827,14 @@ local function setquitting(yes) 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 --git a/net/server_select.lua b/net/server_select.lua index 65a4f764..412d03c0 100644 --- a/net/server_select.lua +++ b/net/server_select.lua @@ -781,7 +781,7 @@ end local quitting; -setquitting = function (quit) +local function setquitting(quit) quitting = not not quit; end @@ -832,7 +832,7 @@ loop = function(once) -- this is the main loop of the program return "quitting" end -step = function () +local function step() return loop(true); end -- cgit v1.2.3