mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
Merge pull request #2654 from psychon/luajit-xpcall
gears.protected_call: Automatically detect xpcall features
This commit is contained in:
commit
710278c4b9
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ local function handle_result(success, ...)
|
|||
end
|
||||
|
||||
local do_pcall
|
||||
if _VERSION <= "Lua 5.1" then
|
||||
if not select(2, xpcall(function(a) return a end, error, true)) then
|
||||
-- Lua 5.1 doesn't support arguments in xpcall :-(
|
||||
do_pcall = function(func, ...)
|
||||
local args = { ... }
|
||||
|
|
Loading…
Reference in a new issue