summary refs log tree commit diff stats
path: root/lib/pure/hashes.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pure/hashes.nim')
-rw-r--r--lib/pure/hashes.nim8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/pure/hashes.nim b/lib/pure/hashes.nim
index 17d1c6442..d5759e507 100644
--- a/lib/pure/hashes.nim
+++ b/lib/pure/hashes.nim
@@ -112,6 +112,14 @@ proc hash*(x: int64): Hash {.inline.} =
   ## efficient hashing of int64 integers
   result = toU32(x)
 
+proc hash*(x: uint): Hash {.inline.} =
+  ## efficient hashing of unsigned integers
+  result = cast[int](x)
+
+proc hash*(x: uint64): Hash {.inline.} =
+  ## efficient hashing of uint64 integers
+  result = toU32(cast[int](x))
+
 proc hash*(x: char): Hash {.inline.} =
   ## efficient hashing of characters
   result = ord(x)