Diff

util/startup.lua @ 11149:28add4b22a74

util.startup: Retrieve less data for function string representation debug.getinfo(f) collects more info than what is needed here.
author Kim Alvefur <zash@zash.se>
date Fri, 09 Oct 2020 17:34:04 +0200
parent 11144:2b9f7c537acb
child 11150:0cfa36fa707e
line wrap: on
line diff
--- a/util/startup.lua	Fri Oct 09 16:37:15 2020 +0200
+++ b/util/startup.lua	Fri Oct 09 17:34:04 2020 +0200
@@ -197,7 +197,7 @@
 		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);