Commit 1023d63f authored by Ian Lance Taylor's avatar Ian Lance Taylor

unsafe: clarify wording in recent Alignof changes

Change-Id: I595379d2f02b0a43735f0375758e4997ce3b64a7
Reviewed-on: https://go-review.googlesource.com/18986
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 08396f78
......@@ -187,8 +187,8 @@ func Offsetof(x ArbitraryType) uintptr
// of a hypothetical variable v as if v was declared via var v = x.
// It is the largest value m such that the address of v is always zero mod m.
// It is the same as the value returned by reflect.TypeOf(x).Align().
// As a special case, if s has a struct type and f is a field within that
// struct, then Alignof(s.f) will return the required alignment of a field
// of that type within a struct. This case is the same as the value returned
// by reflect.TypeOf(s.f).FieldAlign().
// As a special case, if a variable s is of struct type and f is a field
// within that struct, then Alignof(s.f) will return the required alignment
// of a field of that type within a struct. This case is the same as the
// value returned by reflect.TypeOf(s.f).FieldAlign().
func Alignof(x ArbitraryType) uintptr
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment