Software /
code /
prosody
Comparison
util/startup.lua @ 12982:fc0109c59807
util.startup: Tweak function string representation
Mostly in order to avoid triggering the XML syntax highlighting in the
console logger.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 26 Mar 2023 00:11:42 +0100 |
parent | 12975:d10957394a3c |
child | 13014:06453c564141 |
comparison
equal
deleted
inserted
replaced
12981:d795e3bbc0e3 | 12982:fc0109c59807 |
---|---|
231 info[i] = debug.getlocal(f, i); | 231 info[i] = debug.getlocal(f, i); |
232 end | 232 end |
233 if info.isvararg then | 233 if info.isvararg then |
234 info[n_params+1] = "..."; | 234 info[n_params+1] = "..."; |
235 end | 235 end |
236 return ("function<%s:%d>(%s)"):format(info.short_src:match("[^\\/]*$"), info.linedefined, table.concat(info, ", ")); | 236 return ("function @%s:%d(%s)"):format(info.short_src:match("[^\\/]*$"), info.linedefined, table.concat(info, ", ")); |
237 end | 237 end |
238 debug.setmetatable(function() end, mt); | 238 debug.setmetatable(function() end, mt); |
239 end | 239 end |
240 | 240 |
241 function startup.detect_platform() | 241 function startup.detect_platform() |