diff options
author | 2024-01-29 15:13:53 +0000 | |
---|---|---|
committer | 2024-01-29 15:13:53 +0000 | |
commit | 81198fa2d09f07bb54ec28f41b20f275e88a3254 (patch) | |
tree | 14f0d24168e085c50c27f6dadbe1fd71e63faca1 /vendor/codeberg.org/gruf/go-structr/hash_32.go | |
parent | [bugfix] Fix Postgres emoji delete, emoji category change (#2570) (diff) | |
download | gotosocial-81198fa2d09f07bb54ec28f41b20f275e88a3254.tar.xz |
update go-structr v0.2.0 => v0.3.0 to fix possible hash collision issues (#2586)
Diffstat (limited to 'vendor/codeberg.org/gruf/go-structr/hash_32.go')
-rw-r--r-- | vendor/codeberg.org/gruf/go-structr/hash_32.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/vendor/codeberg.org/gruf/go-structr/hash_32.go b/vendor/codeberg.org/gruf/go-structr/hash_32.go new file mode 100644 index 000000000..883a3a174 --- /dev/null +++ b/vendor/codeberg.org/gruf/go-structr/hash_32.go @@ -0,0 +1,14 @@ +//go:build structr_32bit_hash +// +build structr_32bit_hash + +package structr + +// Hash is the current compiler +// flag defined cache key hash +// checksum type. Here; uint32. +type Hash uint32 + +// uint64ToHash converts uint64 to currently Hash type. +func uint64ToHash(u uint64) Hash { + return Hash(u >> 32) +} |