mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: make _TinySizeClass an int8 to prevent use as spanClass
Currently _TinySizeClass is untyped, which means it can accidentally
be used as a spanClass (not that I would know this from experience or
anything). Make it an int8 to avoid this mix up.
This is a cherry-pick of dev.garbage commit 81b74bf9c5.
Change-Id: I1e69eccee436ea5aa45e9a9828a013e369e03f1a
Reviewed-on: https://go-review.googlesource.com/41254
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
This commit is contained in:
parent
8e25d4ccef
commit
295d160e01
2 changed files with 2 additions and 2 deletions
|
|
@ -326,7 +326,7 @@ type spanClass uint8
|
|||
|
||||
const (
|
||||
numSpanClasses = _NumSizeClasses << 1
|
||||
tinySpanClass = tinySizeClass<<1 | 1
|
||||
tinySpanClass = spanClass(tinySizeClass<<1 | 1)
|
||||
)
|
||||
|
||||
func makeSpanClass(sizeclass uint8, noscan bool) spanClass {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue