File

util/xpcall.lua @ 10478:5e9a1a75f8a7

util.encodings: Don’t export unneeded symbols This reduces the binary size from 22704 B to 18592 B.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sun, 01 Dec 2019 23:34:45 +0100
parent 9561:cfc7b2f7251e
child 12975: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;
};