@@ -526,7 +526,7 @@ import Base.==
526
526
527
527
const global hashoffset = [UInt (190 )]
528
528
529
- Base. hash (s:: MyString ) = hash (s. str) + hashoffset[]
529
+ Base. hash (s:: MyString ) = hash (s. str) + hashoffset[1 ]
530
530
Base. endof (s:: MyString ) = endof (s. str)
531
531
Base. next (s:: MyString , v:: Int ) = next (s. str, v)
532
532
Base. isequal (a:: MyString , b:: MyString ) = isequal (a. str, b. str)
@@ -559,7 +559,7 @@ let badKeys = [
559
559
# Walk through all possible hash values (mod size of hash table)
560
560
for offset = 0 : 1023
561
561
d2 = Dict {MyString,Int} ()
562
- hashoffset[] = offset
562
+ hashoffset[1 ] = offset
563
563
for i = 1 : length (badKeys)
564
564
d2[MyString (badKeys[i])] = i
565
565
end
@@ -574,7 +574,7 @@ immutable MyInt <: Integer
574
574
val:: UInt
575
575
end
576
576
577
- Base. hash (v:: MyInt ) = v. val + hashoffset[]
577
+ Base. hash (v:: MyInt ) = v. val + hashoffset[1 ]
578
578
Base. endof (v:: MyInt ) = endof (v. val)
579
579
Base. next (v:: MyInt , i:: Int ) = next (v. val, i)
580
580
Base. isequal (a:: MyInt , b:: MyInt ) = isequal (a. val, b. val)
@@ -589,7 +589,7 @@ let badKeys = UInt16[0xb800,0xa501,0xcdff,0x6303,0xe40a,0xcf0e,0xf3df,0xae99,0x9
589
589
# Walk through all possible hash values (mod size of hash table)
590
590
for offset = 0 : 1023
591
591
d2 = Dict {MyInt, Int} ()
592
- hashoffset[] = offset
592
+ hashoffset[1 ] = offset
593
593
for i = 1 : length (badKeys)
594
594
d2[MyInt (badKeys[i])] = i
595
595
end
0 commit comments