[brick] update lua debuger
According to changes at luajit, using a table as key at a table
is disabled. So, I fix a table reference printing logic.
@@ -640,8 +640,6 @@ func GetDebuggerCode() *C.char {
--}}}
--{{{ local function dumpval( level, name, value, limit )
- local dumpvisited
-
local function dumpval( level, name, value, limit )
local index
if type(name) == 'number' then
@@ -656,20 +654,15 @@ func GetDebuggerCode() *C.char {
index = string.format('[%q] = ',tostring(name))
end
if type(value) == 'table' then
- if dumpvisited[value] then
- indented( level, index, string.format('ref%q;',dumpvisited[value]) )
- else
- dumpvisited[value] = tostring(value)
if (limit or 0) > 0 and level+1 >= limit then
- indented( level, index, dumpvisited[value] )
+ indented( level, index, tostring(value), ';' )
else
- indented( level, index, '{ -- ', dumpvisited[value] )
+ indented( level, index, '{' )
for n,v in pairs(value) do
dumpval( level+1, n, v, limit )
end
indented( level, '};' )
end
- end
else
if type(value) == 'string' then
if string.len(value) > 40 then
@@ -687,7 +680,6 @@ func GetDebuggerCode() *C.char {
--{{{ local function dumpvar( value, limit, name )
local function dumpvar( value, limit, name )
- dumpvisited = {}
dumpval( 0, name or tostring(value), value, limit )
end
