forked from minetest-mods/MoreMesecons
do not normalize luajit functions
This commit is contained in:
parent
686c18c49e
commit
9fcb45d9f2
6
md5.lua
6
md5.lua
@ -35,7 +35,10 @@ local char, byte, format, rep, sub =
|
|||||||
local bit_or, bit_and, bit_not, bit_xor, bit_rshift, bit_lshift
|
local bit_or, bit_and, bit_not, bit_xor, bit_rshift, bit_lshift
|
||||||
|
|
||||||
local ok, bit = pcall(require, 'bit')
|
local ok, bit = pcall(require, 'bit')
|
||||||
if not ok then ok, bit = pcall(require, 'bit32') end
|
if ok then
|
||||||
|
bit_or, bit_and, bit_not, bit_xor, bit_rshift, bit_lshift = bit.bor, bit.band, bit.bnot, bit.xor, bit.rshift, bit.lshift
|
||||||
|
else
|
||||||
|
ok, bit = pcall(require, 'bit32')
|
||||||
|
|
||||||
if ok then
|
if ok then
|
||||||
|
|
||||||
@ -205,6 +208,7 @@ local function str2bei(s)
|
|||||||
end
|
end
|
||||||
return v
|
return v
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- convert raw string to little-endian int
|
-- convert raw string to little-endian int
|
||||||
local function str2lei(s)
|
local function str2lei(s)
|
||||||
|
Loading…
Reference in New Issue
Block a user