Skip to content

Commit 9a8328f

Browse files
dgryskideadprogram
authored andcommitted
src/runtime/hashmap: comments for iterator structure
1 parent 6812a4d commit 9a8328f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/runtime/hashmap.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ type hashmapBucket struct {
4141
}
4242

4343
type hashmapIterator struct {
44-
buckets unsafe.Pointer
45-
numBuckets uintptr
46-
bucketNumber uintptr
47-
bucket *hashmapBucket
48-
bucketIndex uint8
44+
buckets unsafe.Pointer // pointer to array of hashapBuckets
45+
numBuckets uintptr // length of buckets array
46+
bucketNumber uintptr // current index into buckets array
47+
bucket *hashmapBucket // current bucket in chain
48+
bucketIndex uint8 // current index into bucket
4949
}
5050

5151
// Get the topmost 8 bits of the hash, without using a special value (like 0).

0 commit comments

Comments
 (0)