Changeset

4399:1b4161970842

net.server_event, net.server_select: Fixed some global pollution.
author Waqas Hussain <waqas20@gmail.com>
date Fri, 14 Oct 2011 00:46:29 +0500
parents 4398:acc37e221940
children 4400:ac651265766c 4405:e7c501d203b0
files net/server_event.lua net/server_select.lua
diffstat 2 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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?
--- 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