Support map keys for simple compare types
This commit is contained in:
1 parent
7fbc081119
commit
57f5976ac1
5 files changed
+26
-7
No files matched your search
@@ -76,6 +76,7 @@ default_hash_ptr :: inline proc "contextless" (data: rawptr, size: int) -> uintp
|
||||
return default_hash(transmute([]byte)(s));
|
||||
}
|
||||
|
||||
@(private)
|
||||
_default_hasher_const :: inline proc "contextless" (data: rawptr, seed: uintptr, $N: uint) -> uintptr {
|
||||
h := u64(seed) + 0xcbf29ce484222325;
|
||||
p := uintptr(data);
|
||||
@@ -86,7 +87,8 @@ _default_hasher_const :: inline proc "contextless" (data: rawptr, seed: uintptr,
|
||||
}
|
||||
return uintptr(h);
|
||||
}
|
||||
_default_hasher_n :: inline proc "contextless" (data: rawptr, seed: uintptr, N: int) -> uintptr {
|
||||
|
||||
default_hasher_n :: inline proc "contextless" (data: rawptr, seed: uintptr, N: int) -> uintptr {
|
||||
h := u64(seed) + 0xcbf29ce484222325;
|
||||
p := uintptr(data);
|
||||
for _ in 0..<N {
|
||||
|
||||
Reference in new issue
Block a user