cc-mek-scada/lockbox/util/bit.lua
2023-06-11 18:26:55 +00:00

20 lines
309 B
Lua

-- modified (simplified) for ComputerCraft
local ok, e = nil, nil
if not ok then
ok, e = pcall(require, "bit32") -- Lua 5.2
end
if not ok then
ok, e = pcall(require, "bit")
end
if not ok then
error("no bitwise support found", 2)
end
assert(type(e) == "table", "invalid bit module")
return e