Skip to content

Commit 8c9afb8

Browse files
committed
mock-array: fix name space collision
split is a tcl procedure, don't override it Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 2b46028 commit 8c9afb8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flow/designs/asap7/mock-array/util.tcl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Helper function to split a string into a list of strings and numbers
2-
proc split {str} {
2+
proc split_strings_and_numbers {str} {
33
set result {}
44
foreach {all letters numbers} [regexp -all -inline {(\D*)(\d*)} $str] {
55
if {$letters ne ""} {
@@ -14,8 +14,8 @@ proc split {str} {
1414

1515
# Custom comparison function
1616
proc natural_compare {str1 str2} {
17-
set list1 [split $str1]
18-
set list2 [split $str2]
17+
set list1 [split_strings_and_numbers $str1]
18+
set list2 [split_strings_and_numbers $str2]
1919
set len [expr {min([llength $list1], [llength $list2])}]
2020
for {set i 0} {$i < $len} {incr i} {
2121
set part1 [lindex $list1 $i]

0 commit comments

Comments
 (0)