diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-10-21 19:33:13 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-10-21 19:33:13 -0700 |
commit | 9d11922a82073010d3e2000121b68ed6aaaf28f3 (patch) | |
tree | bfa7c782a6f4e7ba3003c813b310f51e9d6bd9b9 | |
parent | bfae65583bb223279d70e7b45abf69a28da4a266 (diff) | |
download | txr-9d11922a82073010d3e2000121b68ed6aaaf28f3.tar.gz txr-9d11922a82073010d3e2000121b68ed6aaaf28f3.tar.bz2 txr-9d11922a82073010d3e2000121b68ed6aaaf28f3.zip |
hash: observe count in eql-based hash.
* hash.c (eql_hash): Decrement count and bail if zero.
-rw-r--r-- | hash.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -283,6 +283,9 @@ ucnum equal_hash(val obj, int *count, ucnum seed) static ucnum eql_hash(val obj, int *count) { + if ((*count)-- <= 0) + return 0; + switch (tag(obj)) { case TAG_PTR: switch (type(obj)) { |