1
0
mirror of https://github.com/golang/go synced 2024-11-23 00:00:07 -07:00

sync: update misleading comment in map.go about entry type while p == nil

As discussed in: https://github.com/golang/go/issues/45429,  about entry
type comments, it is possible for p == nil when m.dirty != nil, so
update the commemt about it.

Fixes #45429
This commit is contained in:
panchenglong01 2021-04-08 16:58:10 +08:00
parent a7e16abb22
commit 202c598a0a

View File

@ -73,7 +73,8 @@ var expunged = unsafe.Pointer(new(interface{}))
type entry struct { type entry struct {
// p points to the interface{} value stored for the entry. // p points to the interface{} value stored for the entry.
// //
// If p == nil, the entry has been deleted and m.dirty == nil. // If p == nil, the entry has been deleted, and either m.dirty == nil or
// m.dirty[key] is e.
// //
// If p == expunged, the entry has been deleted, m.dirty != nil, and the entry // If p == expunged, the entry has been deleted, m.dirty != nil, and the entry
// is missing from m.dirty. // is missing from m.dirty.