Skip to content

Commit

Permalink
bit library: add Lua 5.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jprjr committed Nov 12, 2020
1 parent 47225d0 commit d1e8848
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions http/bit.lua
Expand Up @@ -7,8 +7,8 @@ The bit operations are only done
This means we can ignore the differences between bit libraries.
]]

-- Lua 5.3 has built-in bit operators, wrap them in a function.
if _VERSION == "Lua 5.3" then
-- Lua 5.3+ has built-in bit operators, wrap them in a function.
if _VERSION == "Lua 5.4" or _VERSION == "Lua 5.3" then
-- Use debug.getinfo to get correct file+line numbers for loaded snippet
local info = debug.getinfo(1, "Sl")
return assert(load(("\n"):rep(info.currentline+1)..[[return {
Expand Down

0 comments on commit d1e8848

Please sign in to comment.