~ chicken-core (chicken-5) 03ed75b418d157dff47753774f5ccaf477171292
commit 03ed75b418d157dff47753774f5ccaf477171292 Author: felix <felix@call-with-current-continuation.org> AuthorDate: Sat Jan 9 13:10:32 2010 +0100 Commit: felix <felix@call-with-current-continuation.org> CommitDate: Sat Jan 9 13:10:32 2010 +0100 restrict srfi-69 hash to 32-bit diff --git a/srfi-69.scm b/srfi-69.scm index 9144f837..a576b100 100644 --- a/srfi-69.scm +++ b/srfi-69.scm @@ -134,7 +134,8 @@ (if (fx< fxn 0) (fxneg fxn) fxn ) ) (define-inline (%hash/limit hsh lim) - (fxmod (fxand (foreign-value "C_MOST_POSITIVE_FIXNUM" int) + ;; use 32-bit mask to have identical hashes on 64-bit platforms + (fxmod (fxand (foreign-value "C_MOST_POSITIVE_32_BIT_FIXNUM" int) (%fxabs hsh)) lim) )Trap