Commit 68f91aea authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

runtime: convert memclrBytes to Go

LGTM=khr
R=khr
CC=golang-codereviews
https://golang.org/cl/131980043
parent ddce7c35
......@@ -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
......
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