mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
20 lines
309 B
Lua
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
|