From 9302a14d803625e06d7a93a9b7d498a1219c383d Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 9 Oct 2020 17:34:04 +0200 Subject: util.startup: Retrieve less data for function string representation debug.getinfo(f) collects more info than what is needed here. --- util/startup.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/startup.lua') diff --git a/util/startup.lua b/util/startup.lua index f0b9b2c0..af126e8c 100644 --- a/util/startup.lua +++ b/util/startup.lua @@ -197,7 +197,7 @@ function startup.set_function_metatable() end end function mt.__tostring(f) - local info = debug.getinfo(f); + local info = debug.getinfo(f, "S"); return ("function(%s:%d)"):format(info.short_src:match("[^\\/]*$"), info.linedefined); end debug.setmetatable(function() end, mt); -- cgit v1.2.3