mirror of https://github.com/golang/go.git
reflect: remove extra word in comment
Change-Id: I06881fc447a5fae0067557c317f69a0427bed337 Reviewed-on: https://go-review.googlesource.com/2760 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
bc244008af
commit
c5f810f058
|
|
@ -732,7 +732,7 @@ func (v Value) Field(i int) Value {
|
|||
// Either flagIndir is set and v.ptr points at struct,
|
||||
// or flagIndir is not set and v.ptr is the actual struct data.
|
||||
// In the former case, we want v.ptr + offset.
|
||||
// In the latter case, we must be have field.offset = 0,
|
||||
// In the latter case, we must have field.offset = 0,
|
||||
// so v.ptr + field.offset is still okay.
|
||||
ptr := unsafe.Pointer(uintptr(v.ptr) + field.offset)
|
||||
return Value{typ, ptr, fl}
|
||||
|
|
|
|||
Loading…
Reference in New Issue