[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-janitors] #818: string-hash error
From: |
Chicken Trac |
Subject: |
Re: [Chicken-janitors] #818: string-hash error |
Date: |
Wed, 18 Apr 2012 23:35:52 -0000 |
#818: string-hash error
-----------------------------+----------------------------------------------
Reporter: zbigniew | Owner: sjamaan
Type: defect | Status: assigned
Priority: critical | Milestone: 4.8.0
Component: core libraries | Version: 4.7.x
Resolution: | Keywords:
-----------------------------+----------------------------------------------
Changes (by zbigniew):
* owner: => sjamaan
* status: new => assigned
Comment:
Attached patch fixes the problem. You can see now the hash function is
correct.
before:
{{{
$ csi -R srfi-69 -R srfi-13
#;1> (hash-table-hash-function (make-hash-table string=?))
#<procedure (string-hash s1128 . maybe-bound+start+end1129)>
}}}
after:
{{{
$ csi -R srfi-69 -R srfi-13
#;1> (hash-table-hash-function (make-hash-table string=?))
#<procedure (string-hash str608 . tmp607609)>
}}}
I verified that older chicken (for example, 4.7.0.5-st) also uses the
srfi-13 hash function. However it was never noticed before as the API was
identical.
It might be a good idea to add keyword-hash, symbol-hash and object-uid-
hash to *make-hash-function to enable randomization? Not sure why they
are missing. If this sounds ok then I will update this patch.
--
Ticket URL: <http://bugs.call-cc.org/ticket/818#comment:3>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.