Software /
code /
prosody
Comparison
util/debug.lua @ 12250:e157e5c79daa
util.pluginloader: Support for multiple pluginloader instances, and options
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 03 Feb 2022 12:53:19 +0000 |
parent | 11177:37dc2a6144d1 |
child | 12256:8fd3eebb8966 |
comparison
equal
deleted
inserted
replaced
12249:5173f8a761a0 | 12250:e157e5c79daa |
---|---|
29 local function get_locals_table(thread, level) | 29 local function get_locals_table(thread, level) |
30 local locals = {}; | 30 local locals = {}; |
31 for local_num = 1, math.huge do | 31 for local_num = 1, math.huge do |
32 local name, value; | 32 local name, value; |
33 if thread then | 33 if thread then |
34 name, value = debug.getlocal(thread, level, local_num); | 34 name, value = debug.getlocal(thread, level-1, local_num); |
35 else | 35 else |
36 name, value = debug.getlocal(level+1, local_num); | 36 name, value = debug.getlocal(level+1, local_num); |
37 end | 37 end |
38 if not name then break; end | 38 if not name then break; end |
39 table.insert(locals, { name = name, value = value }); | 39 table.insert(locals, { name = name, value = value }); |