view util/xpcall.lua @ 10054:0656bd283fa2

mod_blocklist: Add comment to clarify some logic
author Kim Alvefur <zash@zash.se>
date Thu, 20 Jun 2019 21:44:43 +0200
parents cfc7b2f7251e
children d10957394a3c
line wrap: on
line source

local xpcall = xpcall;

if select(2, xpcall(function (x) return x end, function () end,  "test")) ~= "test" then
	xpcall = require"util.compat".xpcall;
end

return {
	xpcall = xpcall;
};