do not normalize luajit functions

This commit is contained in:
kikito 2015-04-06 20:44:11 +02:00
parent 686c18c49e
commit 9fcb45d9f2
1 changed files with 146 additions and 142 deletions

View File

@ -35,7 +35,10 @@ local char, byte, format, rep, sub =
local bit_or, bit_and, bit_not, bit_xor, bit_rshift, bit_lshift
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
@ -205,6 +208,7 @@ local function str2bei(s)
end
return v
end
end
-- convert raw string to little-endian int
local function str2lei(s)