diff options
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/pure/hashes.nim | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/pure/hashes.nim b/lib/pure/hashes.nim index 1249ff73b..9c086c675 100755 --- a/lib/pure/hashes.nim +++ b/lib/pure/hashes.nim @@ -67,12 +67,13 @@ proc hash*(x: Pointer): THash {.inline.} = else: result = (cast[THash](x)) shr 3 # skip the alignment -proc hash*[T: proc](x: T): THash {.inline.} = - ## efficient hashing of proc vars; closures are supported too. - when T is "closure": - result = hash(rawProc(x)) !& hash(rawEnv(x)) - else: - result = hash(pointer(x)) +when not defined(booting): + proc hash*[T: proc](x: T): THash {.inline.} = + ## efficient hashing of proc vars; closures are supported too. + when T is "closure": + result = hash(rawProc(x)) !& hash(rawEnv(x)) + else: + result = hash(pointer(x)) proc hash*(x: int): THash {.inline.} = ## efficient hashing of integers |