diff options
author | Kim Alvefur <zash@zash.se> | 2017-10-15 11:42:33 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-10-15 11:42:33 +0200 |
commit | 2855a2ce0a3be392b3441a73f162d6b1b0893422 (patch) | |
tree | 5fc8d89727ac6322606df358ef3c9416167c92ef | |
parent | 9f3c47fb9f60e9555afe28994aca88e0ce250a82 (diff) | |
download | prosody-2855a2ce0a3be392b3441a73f162d6b1b0893422.tar.gz prosody-2855a2ce0a3be392b3441a73f162d6b1b0893422.zip |
util.debug: Produce a sensible name for nameless upvalues to C functions
-rw-r--r-- | util/debug.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/util/debug.lua b/util/debug.lua index 00f476d0..e736d0dd 100644 --- a/util/debug.lua +++ b/util/debug.lua @@ -47,6 +47,7 @@ local function get_upvalues_table(func) for upvalue_num = 1, math.huge do local name, value = debug.getupvalue(func, upvalue_num); if not name then break; end + if name == "" then name = ("[%d]"):format(upvalue_num); end table.insert(upvalues, { name = name, value = value }); end end |