From f7736a1c6193c42ae63d38b4f88f222bf7788bce Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Wed, 24 Jan 2024 21:40:27 -0600 Subject: [PATCH] Drop support for Lua 5.2 I realized late that Lua 5.2 doesn't support bitwise operators... I don't think it's worth my time to be backwards compatible there, so just drop it entirely. Signed-off-by: Kyle Evans --- .github/workflows/build.yml | 4 +--- lib/orch.lua | 4 ++-- lib/orch_lib.h | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 21bb62d..0fdb06c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-20.04, ubuntu-22.04, macos-latest] - lua: [5.2, 5.3, 5.4] + lua: [5.3, 5.4] include: - os: ubuntu-20.04 - os: ubuntu-22.04 @@ -25,8 +25,6 @@ jobs: exclude: - os: ubuntu-20.04 lua: 5.4 - - os: macos-latest - lua: 5.2 - os: macos-latest lua: 5.3 steps: diff --git a/lib/orch.lua b/lib/orch.lua index aa59ad3..2b91b53 100644 --- a/lib/orch.lua +++ b/lib/orch.lua @@ -399,7 +399,7 @@ end local function include_file(file, alter_path, env) local f = assert(impl.open(file, alter_path)) - local chunk = f:read("*l") -- * for compatibility with Lua 5.2... + local chunk = f:read("l") if not chunk then error(file .. " appears to be empty!") @@ -412,7 +412,7 @@ local function include_file(file, alter_path, env) chunk = chunk .. "\n" end - chunk = chunk .. assert(f:read("*a")) + chunk = chunk .. assert(f:read("a")) local func = assert(load(chunk, "@" .. file, "t", env)) return execute(func, true) diff --git a/lib/orch_lib.h b/lib/orch_lib.h index a4dad53..473f0e5 100644 --- a/lib/orch_lib.h +++ b/lib/orch_lib.h @@ -14,7 +14,7 @@ #include #include -/* We only support Lua 5.2+ */ +/* We only support Lua 5.3+ */ /* Introduced in Lua 5.4 */ #ifndef luaL_pushfail