Skip to content
Snippets Groups Projects
Commit c5f810f0 authored by Ian Lance Taylor's avatar Ian Lance Taylor
Browse files

reflect: remove extra word in comment

Change-Id: I06881fc447a5fae0067557c317f69a0427bed337
Reviewed-on: https://go-review.googlesource.com/2760


Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent bc244008
No related branches found
No related tags found
No related merge requests found
...@@ -732,7 +732,7 @@ func (v Value) Field(i int) Value { ...@@ -732,7 +732,7 @@ func (v Value) Field(i int) Value {
// Either flagIndir is set and v.ptr points at struct, // Either flagIndir is set and v.ptr points at struct,
// or flagIndir is not set and v.ptr is the actual struct data. // or flagIndir is not set and v.ptr is the actual struct data.
// In the former case, we want v.ptr + offset. // 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. // so v.ptr + field.offset is still okay.
ptr := unsafe.Pointer(uintptr(v.ptr) + field.offset) ptr := unsafe.Pointer(uintptr(v.ptr) + field.offset)
return Value{typ, ptr, fl} return Value{typ, ptr, fl}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment