Skip to content

Commit

Permalink
workaround for nim script test
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Jul 17, 2019
1 parent 71c17f0 commit 814a02a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/pure/hashes.nim
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ proc hash*(x: pointer): Hash {.inline.} =
}
"""
else:
# bugfix #11764: s/cast[Hash]/hash/
result = hash(cast[uint](x) shr 3) # skip the alignment
# 2 bug fixes: s/cast[Hash]()/hash()/ (#11764); and also s/uint/BiggestInt/
# note that we can't use unsigned because nimscript doesn't have `$`(uint)
result = hash(cast[ByteAddress](x) shr 3) # skip the alignment
# CHECKME: why? isn't that responsability of caller if he needs this behavior?

when not defined(booting):
Expand Down

0 comments on commit 814a02a

Please sign in to comment.