aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Janda <siffiejoe@gmx.net>2015-02-23 20:32:11 +0100
committerPhilipp Janda <siffiejoe@gmx.net>2015-02-23 20:32:11 +0100
commitb459455e78e6c24d257982e3961142182bfe0e06 (patch)
treeb5f3dd7997713300d4f05e7242e1f76c7d055bfa
parent7465629f1779c702a4b2db8274cddc057adda659 (diff)
downloadlua-compat-5.3-b459455e78e6c24d257982e3961142182bfe0e06.tar.gz
lua-compat-5.3-b459455e78e6c24d257982e3961142182bfe0e06.tar.bz2
lua-compat-5.3-b459455e78e6c24d257982e3961142182bfe0e06.zip
remove some references to global variables
-rw-r--r--compat53.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/compat53.lua b/compat53.lua
index 4a78260..84ef101 100644
--- a/compat53.lua
+++ b/compat53.lua
@@ -697,13 +697,14 @@ if lua_version < "5.3" then
697 return pcall_exec(current, pcall_coroutine(func), ...) 697 return pcall_exec(current, pcall_coroutine(func), ...)
698 end 698 end
699 699
700 local _tostring = tostring
700 local function xpcall_catch(current, call, msgh, success, ...) 701 local function xpcall_catch(current, call, msgh, success, ...)
701 if not success then 702 if not success then
702 xpcall_running[current] = call 703 xpcall_running[current] = call
703 local ok, result = _pcall(msgh, ...) 704 local ok, result = _pcall(msgh, ...)
704 xpcall_running[current] = nil 705 xpcall_running[current] = nil
705 if not ok then 706 if not ok then
706 return false, "error in error handling ("..tostring(result)..")" 707 return false, "error in error handling (".._tostring(result)..")"
707 end 708 end
708 return false, result 709 return false, result
709 end 710 end
@@ -735,6 +736,7 @@ if lua_version < "5.3" then
735 end 736 end
736 737
737 738
739 local package = package
738 if not is_luajit then 740 if not is_luajit then
739 local io_open = io.open 741 local io_open = io.open
740 local table_concat = table.concat 742 local table_concat = table.concat