diff options
author | Araq <rumpf_a@web.de> | 2012-09-09 01:08:13 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-09-09 01:08:13 +0200 |
commit | 6d94e4590244fe6174181ca4d0928a06d5c6a257 (patch) | |
tree | f6ce86ef812cf00eee1c002fd104bbb3de7c6160 /lib/pure | |
parent | d3d9d32c35ae6a841ad9e48da61e1a6e88b3904c (diff) | |
parent | 9c63d12cef05709c79ce6d0f6b0cffd0f2243fe7 (diff) | |
download | Nim-6d94e4590244fe6174181ca4d0928a06d5c6a257.tar.gz |
Merge branch 'master' of github.com:Araq/Nimrod
Diffstat (limited to 'lib/pure')
-rwxr-xr-x | lib/pure/hashes.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pure/hashes.nim b/lib/pure/hashes.nim index 9c086c675..ac6d3c3ce 100755 --- a/lib/pure/hashes.nim +++ b/lib/pure/hashes.nim @@ -122,3 +122,7 @@ proc hash*[T: tuple](x: T): THash = result = result !& hash(f) result = !$result +proc hash*(x: float): THash {.inline.} = + var y = x + 1.0 + result = cast[ptr THash](addr(y))[] + |