mirror of
https://github.com/golang/go
synced 2024-11-19 05:24:42 -07:00
runtime: convert memclrBytes to Go
LGTM=khr R=khr CC=golang-codereviews https://golang.org/cl/131980043
This commit is contained in:
parent
ddce7c35f4
commit
68f91aea57
@ -273,3 +273,9 @@ func ifaceHash(i interface {
|
||||
}, seed uintptr) uintptr {
|
||||
return goalg(&algarray[alg_INTER]).hash(noescape(unsafe.Pointer(&i)), unsafe.Sizeof(i), seed)
|
||||
}
|
||||
|
||||
// Testing adapter for memclr
|
||||
func memclrBytes(b []byte) {
|
||||
s := (*sliceStruct)(unsafe.Pointer(&b))
|
||||
memclr(s.array, uintptr(s.len))
|
||||
}
|
||||
|
@ -287,8 +287,3 @@ runtime·hashinit(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Testing adapter for memclr
|
||||
func memclrBytes(s Slice) {
|
||||
runtime·memclr(s.array, s.len);
|
||||
}
|
||||
|
@ -78,13 +78,10 @@ var Int32Hash = int32Hash
|
||||
var Int64Hash = int64Hash
|
||||
var EfaceHash = efaceHash
|
||||
var IfaceHash = ifaceHash
|
||||
var MemclrBytes = memclrBytes
|
||||
|
||||
var HashLoad = &hashLoad
|
||||
|
||||
func memclrBytes(b []byte)
|
||||
|
||||
var MemclrBytes = memclrBytes
|
||||
|
||||
func gogoBytes() int32
|
||||
|
||||
var GogoBytes = gogoBytes
|
||||
|
Loading…
Reference in New Issue
Block a user