update dependencies

Signed-off-by: hongming <talonwan@yunify.com>
This commit is contained in:
hongming
2020-12-22 16:48:26 +08:00
parent 4a11a50544
commit fe6c5de00f
2857 changed files with 252134 additions and 115656 deletions

View File

@@ -2,11 +2,12 @@ language: go
sudo: false
go:
- 1.8
- 1.9
- "1.10"
- "1.11"
- "1.12"
- master
script:
- go test -tags safe ./...
- go test ./...
-

View File

@@ -1 +1,3 @@
module github.com/OneOfOne/xxhash
go 1.11

View File

@@ -1,5 +1,7 @@
package xxhash
import "hash"
const (
prime32x1 uint32 = 2654435761
prime32x2 uint32 = 2246822519
@@ -22,6 +24,9 @@ const (
zero64x4 = 0x61c8864e7a143579
)
func NewHash32() hash.Hash { return New32() }
func NewHash64() hash.Hash { return New64() }
// Checksum32 returns the checksum of the input data with the seed set to 0.
func Checksum32(in []byte) uint32 {
return Checksum32S(in, 0)

View File

@@ -1,4 +1,4 @@
// +build appengine safe ppc64le ppc64be mipsle mipsbe
// +build appengine safe ppc64le ppc64be mipsle mips s390x
package xxhash

View File

@@ -3,7 +3,8 @@
// +build !ppc64le
// +build !mipsle
// +build !ppc64be
// +build !mipsbe
// +build !mips
// +build !s390x
package xxhash
@@ -48,9 +49,10 @@ func (xx *XXHash64) WriteString(s string) (int, error) {
return 0, nil
}
ss := (*reflect.StringHeader)(unsafe.Pointer(&s))
return xx.Write((*[maxInt32]byte)(unsafe.Pointer(ss.Data))[:len(s)])
return xx.Write((*[maxInt32]byte)(unsafe.Pointer(ss.Data))[:len(s):len(s)])
}
//go:nocheckptr
func checksum64(in []byte, seed uint64) uint64 {
var (
wordsLen = len(in) >> 3
@@ -102,6 +104,7 @@ func checksum64(in []byte, seed uint64) uint64 {
return mix64(h)
}
//go:nocheckptr
func checksum64Short(in []byte, seed uint64) uint64 {
var (
h = seed + prime64x5 + uint64(len(in))