aboutsummaryrefslogtreecommitdiff
path: root/data/core/compat.lua
blob: 176de905cf97115cde79b2e14a8335864eb5402b (plain)
1
2
3
4
5
6
7
8
9
10
local has_jit_module = pcall(require, "jit")
if has_jit_module then
  -- when using luajit the function table.pack/unpack are not available
  function table.pack(...)
    return {n=select('#',...), ...}
  end

  table.unpack = unpack
end