File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,6 @@ def print_struct_val(val, internal_dict):
43
43
return print_struct_val_starting_from (0 , val , internal_dict )
44
44
45
45
def print_vec_slice_val (val , internal_dict ):
46
- output = "&["
47
-
48
46
length = val .GetChildAtIndex (1 ).GetValueAsUnsigned ()
49
47
50
48
data_ptr_val = val .GetChildAtIndex (0 )
@@ -56,16 +54,12 @@ def print_vec_slice_val(val, internal_dict):
56
54
57
55
start_address = data_ptr_val .GetValueAsUnsigned ()
58
56
59
- for i in range ( length ):
57
+ def render_element ( i ):
60
58
address = start_address + i * element_type_size
61
- element_val = val .CreateValueFromAddress ( val .GetName () + ("[%s]" % i ), address , element_type )
62
- output += print_val (element_val , internal_dict )
63
-
64
- if i != length - 1 :
65
- output += ", "
59
+ element_val = val .CreateValueFromAddress ( val .GetName () + ("[%s]" % i ), address , element_type )
60
+ return print_val (element_val , internal_dict )
66
61
67
- output += "]"
68
- return output
62
+ return "&[%s]" % (', ' .join ([render_element (i ) for i in range (length )]))
69
63
70
64
def print_struct_val_starting_from (field_start_index , val , internal_dict ):
71
65
'''
You can’t perform that action at this time.
0 commit comments