diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-12-01 19:33:04 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-12-01 19:33:04 -0800 |
commit | 507c6c1516233cb565142a71176bc0d3a246d5b4 (patch) | |
tree | b9d6b1502be7fee758fbd066687e249c9f686768 /hash.c | |
parent | 64266ae7f7f3d127f92accde2b78f84f5cdec7f1 (diff) | |
download | txr-507c6c1516233cb565142a71176bc0d3a246d5b4.tar.gz txr-507c6c1516233cb565142a71176bc0d3a246d5b4.tar.bz2 txr-507c6c1516233cb565142a71176bc0d3a246d5b4.zip |
hash: use new args keyword extraction mechanism.
* hash.c (hashv): Switch over to args_keys_extract.
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -1061,12 +1061,14 @@ void hash_process_weak(void) val hashv(struct args *args) { - val arglist = args_get_list(args); - val wkeys = memq(weak_keys_k, arglist); - val wvals = memq(weak_vals_k, arglist); - val equal = memq(equal_based_k, arglist); - val userdata = cadr(memq(userdata_k, arglist)); - val hash = make_hash(wkeys, wvals, equal); + val wkeys = nil, wvals = nil, equal = nil, userdata = nil; + val hash = (args_keys_extract(args, + weak_keys_k, nil, &wkeys, + weak_vals_k, nil, &wvals, + equal_based_k, nil, &equal, + userdata_k, t, &userdata, + nil), + make_hash(wkeys, wvals, equal)); if (userdata) set_hash_userdata(hash, userdata); return hash; |