diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-02-22 20:48:37 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-02-22 20:48:37 -0800 |
commit | 6af39064ca9d9a78d0e12e64cb817f9080cf3793 (patch) | |
tree | 336efee13eeee5f633cacf4208091ab876bbb919 /hash.c | |
parent | 91477b902ec2c36d893e72e99916469f99558ac9 (diff) | |
download | txr-6af39064ca9d9a78d0e12e64cb817f9080cf3793.tar.gz txr-6af39064ca9d9a78d0e12e64cb817f9080cf3793.tar.bz2 txr-6af39064ca9d9a78d0e12e64cb817f9080cf3793.zip |
hashing: provide unsafe hash count.
* hash.c (us_hash_count): New function. Blindly assumes that
the argument is a hash.
* hash.h (us_hash_count): Declared.
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -886,6 +886,12 @@ val hash_count(val hash) return num_fast(h->count); } +val us_hash_count(val hash) +{ + struct hash *h = coerce(struct hash *, hash->co.handle); + return num_fast(h->count); +} + val get_hash_userdata(val hash) { val self = lit("get-hash-userdata"); |