cespare / xxhash

A Go implementation of the 64-bit xxHash algorithm (XXH64)
MIT License
1.79k stars 123 forks source link

Separate unsafe code for App Engine support. #4

Closed xStrom closed 7 years ago

xStrom commented 7 years ago

Unfortunately App Engine doesn't allow unsafe. This PR makes the library compatible with App Engine by falling back to a safe implementation with the appengine build tag.

dmitshur commented 7 years ago

Just checking, but did you take xxhash_amd64.go and xxhash_other.go files into account when creating these 2 new files?

I know those files have more build constraints than just appengine (// +build !amd64 appengine !gc noasm), but asking just in case.

xStrom commented 7 years ago

xxhash_amd64.go isn't used due to the !appengine constraint that was there already. xxhash_other.go is pure Go and works as before.

cespare commented 7 years ago

Thanks @xStrom! Sorry for the delay.