Skip to content

Commit

Permalink
Drop LuaJIT 2.0.5 support
Browse files Browse the repository at this point in the history
Primary CI target is luajit-openresty. Even 2.1.0-beta3 is ancient.
  • Loading branch information
jkl1337 committed Feb 18, 2024
1 parent b3cf613 commit d83cc34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/busted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 2 additions & 4 deletions kiwi.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d83cc34

Please sign in to comment.