Eigenstate: myrddin-dev mailing list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Make ptrhash more explicit


Hello,

inlined is patch to make more clear the workings of ptrhash.

Cheers.

From 8e01ae0a29d8937bc0fb5906085840e2f0d51ee3 Mon Sep 17 00:00:00 2001
From: Lucas Gabriel Vuotto <lvuotto92@xxxxxxxxx>
Date: Tue, 3 Oct 2017 19:48:55 -0300
Subject: [PATCH] Make ptrhash more explicit

Signed-off-by: Lucas Gabriel Vuotto <lvuotto92@xxxxxxxxx>
---
 lib/std/hashfuncs.myr | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/lib/std/hashfuncs.myr b/lib/std/hashfuncs.myr
index eca00c99..da47215f 100644
--- a/lib/std/hashfuncs.myr
+++ b/lib/std/hashfuncs.myr
@@ -78,10 +78,7 @@ const streq = {a, b
 }
 
 generic ptrhash = {p : @a#
-	var x
-
-	x = (&p : byte#)
-	-> siphash24(x[0:sizeof(@a#)], Seed)
+	-> inthash((p : intptr))
 }
 
 generic ptreq = {a, b
-- 
2.14.2


Follow-Ups:
Re: Make ptrhash more explicitOri Bernstein <ori@xxxxxxxxxxxxxx>