From d83cc3468c20f8124c434d9ba674811dfab1dd18 Mon Sep 17 00:00:00 2001 From: "John K. Luebs" Date: Sat, 17 Feb 2024 22:36:28 -0600 Subject: [PATCH] Drop LuaJIT 2.0.5 support Primary CI target is luajit-openresty. Even 2.1.0-beta3 is ancient. --- .github/workflows/busted.yml | 2 +- kiwi.lua | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/busted.yml b/.github/workflows/busted.yml index 6796d74..cf26f06 100644 --- a/.github/workflows/busted.yml +++ b/.github/workflows/busted.yml @@ -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 diff --git a/kiwi.lua b/kiwi.lua index f116ba7..9a60ab0 100644 --- a/kiwi.lua +++ b/kiwi.lua @@ -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