1
0
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:
Josh Bleecher Snyder 2014-08-20 14:02:11 -07:00
parent ddce7c35f4
commit 68f91aea57
3 changed files with 7 additions and 9 deletions

View File

@ -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))
}

View File

@ -287,8 +287,3 @@ runtime·hashinit(void)
}
}
}
// Testing adapter for memclr
func memclrBytes(s Slice) {
runtime·memclr(s.array, s.len);
}

View File

@ -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