Software /
code /
prosody
File
util/xpcall.lua @ 10034:4fca92d60040
util.format: Handle formats expecting an integer in Lua 5.3+ (fixes #1371)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 30 May 2019 13:41:05 +0200 |
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; };