diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-12-06 06:26:14 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-12-06 06:26:14 -0800 |
commit | 67bea8d7d93447767181af3ef047cb55b79f9ea0 (patch) | |
tree | 694569d77242aaf28db186bf045c379595854857 /hash.h | |
parent | aa279b849e8a4c5fc4eb3429ac38f71f81704b2d (diff) | |
download | txr-67bea8d7d93447767181af3ef047cb55b79f9ea0.tar.gz txr-67bea8d7d93447767181af3ef047cb55b79f9ea0.tar.bz2 txr-67bea8d7d93447767181af3ef047cb55b79f9ea0.zip |
hash tables: now default to :equal-based.
* hash.c (eql_based_k): New keyword variable.
(equal_based_p): New static function.
(hashv): Use eql_based_p to determine whether to make an
equal-based hash table. Subject to opt_compat relative
to version 187.
(hash_init): Intern :eql-based keyword and store in new
variable.
* hash.h (eql_based_k, userdata_k): Declared.
* txr.1: Documentation updated, with compat notes too.
Diffstat (limited to 'hash.h')
-rw-r--r-- | hash.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -25,7 +25,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -extern val weak_keys_k, weak_vals_k, equal_based_k; +extern val weak_keys_k, weak_vals_k, equal_based_k, eql_based_k, userdata_k; cnum equal_hash(val obj, int *count); val make_hash(val weak_keys, val weak_vals, val equal_based); |