Re: clrhash does not reset count?

"hpwickern" <[email protected]> Fri, 20 Jun 2003 05:58:11 -0000
Newsgroups gmane.lisp.corman
Message-ID <[email protected]>
Also clrhash return nil! In the hyperspec:

Removes all entries from hash-table, and then returns that empty hash 
table.

Hans-Peter


--- In [email protected], JP Massar <massar@a...> wrote:
> At 10:47 AM 6/19/03, hpwickern wrote:
> >Luke, thanks for the hint.
> >I add the bugfix, but still not resetting count!
> 
> It's just broken.  There appear to be various places in the code 
that
> should be resetting the COUNT field of the hash table structure but
> just aren't.
> 
> If you just need a hack fix then call this function instead of hash-
table-count
> 
> (defun hack-htc (ht)
>    (let ((c 0)) (maphash #'(lambda (k v) (declare (ignore k v)) 
(incf c)) 
> ht) c))
> 
> 
> Otherwise you'll need to go through the hash table code and make the
> necessary mods.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Looking for the latest Free IT White Papers?
Visit SearchSecurity.com to access over 500 white papers.
Get instant access at SearchSecurity.com Today
http://us.click.yahoo.com/.lAzoD/QLNGAA/witMAA/SyjtlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/