aboutsummaryrefslogtreecommitdiff
path: root/compat53
diff options
context:
space:
mode:
Diffstat (limited to 'compat53')
-rw-r--r--compat53/init.lua4
-rw-r--r--compat53/module.lua14
2 files changed, 5 insertions, 13 deletions
diff --git a/compat53/init.lua b/compat53/init.lua
index 31085be..b952003 100644
--- a/compat53/init.lua
+++ b/compat53/init.lua
@@ -46,7 +46,7 @@ if lua_version == "5.1" then
46 46
47 47
48 if not is_luajit then 48 if not is_luajit then
49 local function helper(st, var_1, ...) 49 local function helper(_, var_1, ...)
50 if var_1 == nil then 50 if var_1 == nil then
51 if (...) ~= nil then 51 if (...) ~= nil then
52 error((...), 2) 52 error((...), 2)
@@ -197,7 +197,7 @@ if lua_version == "5.1" then
197 msg = msg:gsub("%z+", function(zeros) 197 msg = msg:gsub("%z+", function(zeros)
198 return "\n\t(..."..#zeros.." tail call(s)...)" 198 return "\n\t(..."..#zeros.." tail call(s)...)"
199 end) 199 end)
200 msg = msg:gsub("\001", function(zeros) 200 msg = msg:gsub("\001", function()
201 return "\n\t..." 201 return "\n\t..."
202 end) 202 end)
203 return msg 203 return msg
diff --git a/compat53/module.lua b/compat53/module.lua
index 0dd0317..f278f13 100644
--- a/compat53/module.lua
+++ b/compat53/module.lua
@@ -40,14 +40,6 @@ if lua_version < "5.3" then
40 end 40 end
41 end 41 end
42 42
43 local function checktype(x, t, i, f)
44 local xt = type(x)
45 if xt ~= t then
46 error("bad argument #"..i.." to '"..f.."' ("..t..
47 " expected, got "..xt..")", 0)
48 end
49 end
50
51 43
52 -- load utf8 library 44 -- load utf8 library
53 local utf8_ok, utf8lib = pcall(require, "compat53.utf8") 45 local utf8_ok, utf8lib = pcall(require, "compat53.utf8")
@@ -94,7 +86,7 @@ if lua_version < "5.3" then
94 86
95 -- update math library 87 -- update math library
96 do 88 do
97 local maxint, minint = 1, 0 89 local maxint, minint = 1
98 90
99 while maxint+1 > maxint and 2*maxint > maxint do 91 while maxint+1 > maxint and 2*maxint > maxint do
100 maxint = maxint * 2 92 maxint = maxint * 2
@@ -269,10 +261,10 @@ if lua_version < "5.3" then
269 x, y, a, b = y, x, b, a 261 x, y, a, b = y, x, b, a
270 end 262 end
271 if not cmp(y, z) then 263 if not cmp(y, z) then
272 y, z, b, c = z, y, c, b 264 y, b = z, c
273 end 265 end
274 if not cmp(x, y) then 266 if not cmp(x, y) then
275 x, y, a, b = y, x, b, a 267 y, b = x, a
276 end 268 end
277 return b, y 269 return b, y
278 else 270 else