lite-xl/data/core/compat.lua

11 lines
239 B
Lua
Raw Normal View History

2021-03-22 08:51:26 +01:00
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
2021-03-21 20:24:39 +01:00
2021-03-22 08:51:26 +01:00
table.unpack = unpack
end