@@ -92,7 +92,7 @@ local function dump_(prefix, value, maxlen, level, add)
9292 -- light userdata is just a pointer (can't iterate over it)
9393 -- XXX is there a better way of checking for light userdata?
9494 if type (value ) == ' userdata' and not pcall (pairs (value )) then
95- value = ' <pointer> '
95+ value = tostring ( value ): gsub ( ' userdata:%s* ' , ' ' )
9696
9797 -- modify the value heuristically
9898 elseif ({table = 1 , userdata = 1 })[type (value )] then
@@ -131,9 +131,10 @@ local function dump_(prefix, value, maxlen, level, add)
131131 add (string.format (' %s%s%s%s%s%s%s%s' , indent , prefix , presep , typ ,
132132 typsep , quo , value , quo ))
133133 -- light userdata is just a pointer (can't iterate over it)
134- -- XXX is there a better way of checking for light userdataXS ?
134+ -- XXX is there a better way of checking for light userdata ?
135135 elseif valtyp == ' userdata' and not pcall (pairs (value )) then
136- add (string.format (' %s%s%s%s <pointer>' , indent , prefix , presep , typ ))
136+ add (string.format (' %s%s%s%s %s' , indent , prefix , presep , typ ,
137+ tostring (value ):gsub (' userdata:%s*' , ' ' )))
137138 elseif ({table = 1 , userdata = 1 })[valtyp ] then
138139 add (string.format (' %s%s%s%s%s{' , indent , prefix , presep , typ , typsep ))
139140 -- Attr and Attr.attributes have both numeric and string keys, so
0 commit comments