Fixed LuaJIT when not compiled with COMPAT mode (#6605)

LuaJIT as installed by apt doesn't include the COMPAT mode for using
Lua5.2 features. So this change just makes the flatbuffer code use a
common implementation.
This commit is contained in:
Derek Bailey
2021-05-03 11:35:49 -07:00
committed by GitHub
parent 3632208233
commit a27c7d8093
4 changed files with 29 additions and 15 deletions

View File

@@ -9,6 +9,13 @@ local Uint8Bound = 256 -- bound is the max uintN + 1
local Uint16Bound = 65536
local Uint32Bound = 4294967296
if not table.unpack then
table.unpack = unpack
end
if not table.pack then
table.pack = pack
end
m.GetAlignSize = function(k, size)
return band((bnot(k) + 1), (size - 1))