shithub: mc

Download patch

ref: 92b12fc6772aae7ebb9b6436dcfc393e17de01b6
parent: addfe6e58b518046d3ed84e6b6081f1538946c3a
author: Lucas Gabriel Vuotto <lvuotto92@gmail.com>
date: Tue Oct 3 16:05:42 EDT 2017

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@gmail.com>
Date: Tue, 3 Oct 2017 19:48:55 -0300
Subject: [PATCH] Make ptrhash more explicit
X-Spam-Status: No, hits=0.000000 required=0.900000

Signed-off-by: Lucas Gabriel Vuotto <lvuotto92@gmail.com>

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