@@ -269,7 +269,7 @@ local function db_node( db, val, depth, key )
269
269
(key == nil or not db .prune [ key ]) then
270
270
db .n_nodes = db .n_nodes + 1
271
271
node = {
272
- id = tostring ( db .n_nodes ) ,
272
+ id = db .n_nodes .. " " ,
273
273
value = val ,
274
274
depth = depth ,
275
275
shape = nil , label = nil , draw = nil , next = nil ,
435
435
local function make_label_elem ( tnode , v , db , subid , depth , alt )
436
436
local t = type ( v )
437
437
if t == " number" or t == " boolean" then
438
- return escape ( tostring ( v ), db .use_html )
438
+ return escape ( ptostring ( v ), db .use_html )
439
439
elseif t == " string" then
440
440
return quote ( escape ( abbrev ( v ), db .use_html ) )
441
441
else -- userdata, function, thread, table
@@ -465,7 +465,7 @@ local function make_html_table( db, node, val )
465
465
-- first the array part
466
466
local n , v = 1 , rawget ( val , 1 )
467
467
while v ~= nil do
468
- local el_label = make_label_elem ( node , v , db , tostring ( n ) , depth )
468
+ local el_label = make_label_elem ( node , v , db , n .. " " , depth )
469
469
label = label .. [[
470
470
<TR><TD PORT="]] .. n .. [[ " COLSPAN="2">]] .. el_label .. [[
471
471
</TD></TR>
@@ -503,7 +503,7 @@ local function make_record_table( db, node, val )
503
503
-- first the array part
504
504
local n ,v = 1 , rawget ( val , 1 )
505
505
while v ~= nil do
506
- local el_label = make_label_elem ( node , v , db , tostring ( n ) , depth )
506
+ local el_label = make_label_elem ( node , v , db , n .. " " , depth )
507
507
label = label .. " | <" .. n .. " > " .. el_label
508
508
handled [ n ] = true
509
509
n = n + 1
@@ -550,7 +550,7 @@ local function make_html_stack( db, node )
550
550
n = n + 1
551
551
for i = # frame , 1 , - 1 do
552
552
label = label .. ' <TR><TD>' ..
553
- escape ( tostring ( i ) , true ) .. ' </TD><TD>' ..
553
+ escape ( i .. " " , true ) .. ' </TD><TD>' ..
554
554
escape ( abbrev ( frame [ i ][ 1 ] ), true ) ..
555
555
' </TD><TD PORT="' .. n .. ' ">' ..
556
556
make_label_elem ( node , frame [ i ][ 2 ], db , n , depth ) ..
@@ -582,7 +582,7 @@ local function make_record_stack( db, node )
582
582
n = n + 1
583
583
local nums , keys , values = {}, {}, {}
584
584
for i = # frame , 1 , - 1 do
585
- nums [ # nums + 1 ] = escape ( tostring ( i ) , false )
585
+ nums [ # nums + 1 ] = escape ( i .. " " , false )
586
586
keys [ # keys + 1 ] = escape ( abbrev ( frame [ i ][ 1 ] ), false )
587
587
values [ # values + 1 ] = " <" .. n .. " > " ..
588
588
make_label_elem ( node , frame [ i ][ 2 ], db , n , depth )
713
713
714
714
715
715
local function dottify_thread ( db , node , val )
716
- local label = escape ( abbrev ( tostring ( val ) ), false )
716
+ local label = escape ( abbrev ( ptostring ( val ) ), false )
717
717
node .group = label
718
718
if getsize then
719
719
label = label .. " [" .. getsize ( val ).. " ]"
730
730
731
731
732
732
local function dottify_function ( db , node , val )
733
- local label = escape ( abbrev ( tostring ( val ) ), false )
733
+ local label = escape ( abbrev ( ptostring ( val ) ), false )
734
734
if getsize then
735
735
label = label .. " [" .. getsize ( val ).. " ]"
736
736
end
@@ -751,14 +751,14 @@ end
751
751
752
752
753
753
local function dottify_other ( db , node , val )
754
- node .label = escape ( abbrev ( tostring ( val ) ), false )
754
+ node .label = escape ( abbrev ( ptostring ( val ) ), false )
755
755
node .shape = " plaintext"
756
756
end
757
757
758
758
759
759
local function dottify_stack ( db , node )
760
760
if node .thread then
761
- node .group = escape ( abbrev ( tostring ( node .thread ) ), false )
761
+ node .group = escape ( abbrev ( ptostring ( node .thread ) ), false )
762
762
end
763
763
if db .use_html then
764
764
make_html_stack ( db , node )
769
769
770
770
771
771
local function dottify_size ( db , node , val )
772
- node .label = escape ( abbrev ( tostring ( val ) ), false )
772
+ node .label = escape ( abbrev ( val .. " " ), false )
773
773
node .shape = " circle"
774
774
node .width = " 0.3"
775
775
node .margin = " 0.01"
0 commit comments