Drop LuaJIT 2.0.5 support

Primary CI target is luajit-openresty. Even 2.1.0-beta3 is ancient.
This commit is contained in:
2024-02-17 22:36:28 -06:00
parent b3cf6136a4
commit d83cc3468c
2 changed files with 3 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
lua_version: ["luajit-2.1.0-beta3", "luajit-2.0.5", "luajit-openresty"]
lua_version: ["luajit-openresty", "luajit-2.1.0-beta3"]
runs-on: ubuntu-latest

View File

@@ -871,8 +871,7 @@ do
function kiwi.error_mask(kinds, invert)
local mask = 0
for _, k in ipairs(kinds) do
-- must use tonumber only for LuaJIT 2.0 compatibility
mask = bor(mask, lshift(1, tonumber(kiwi.ErrKind(k)) --[[@as integer]]))
mask = bor(mask, lshift(1, kiwi.ErrKind(k)))
end
return invert and bit.bnot(mask) or mask
end
@@ -941,9 +940,8 @@ do
end
local errdata = new_error(kind, message, solver, item)
local error_mask = solver and solver.error_mask_ or 0
-- tonumber only required for LuaJIT 2.0 compatibility
return item,
band(error_mask, lshift(1, tonumber(kind) --[[@as integer]])) == 0 and error(errdata)
band(error_mask, lshift(1, kind --[[@as integer]])) == 0 and error(errdata)
or errdata
end
return item