osrm-backend/lua/flatbuffers/compat_5_1.lua
Siarhei Fedartsou 0f6aab9da6 Squashed 'third_party/flatbuffers/' content from commit 595bf0007
git-subtree-dir: third_party/flatbuffers
git-subtree-split: 595bf0007ab1929570c7671f091313c8fc20644e
2024-06-22 13:33:34 +02:00

22 lines
447 B
Lua

local m = {}
local ok, bit = pcall(require, "bit32")
assert(ok, "The Bit32 library must be installed")
assert(pcall(require, "compat53"), "The Compat 5.3 library must be installed")
m.GetAlignSize = function(k, size)
return bit.band(bit.bnot(k) + 1,(size - 1))
end
if not table.unpack then
table.unpack = unpack
end
if not table.pack then
table.pack = pack
end
m.string_pack = string.pack
m.string_unpack = string.unpack
return m