diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-10-11 13:25:21 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-10-11 13:25:21 -0700 |
commit | 284bb3680d566e26bf6d8ceabacb6634442cde55 (patch) | |
tree | 81f9c035c1415017c8af0d2d0bcbb503b864dc25 /eval.c | |
parent | ec3ef435c68af026ddfca6fa312bde18077194b8 (diff) | |
download | txr-284bb3680d566e26bf6d8ceabacb6634442cde55.tar.gz txr-284bb3680d566e26bf6d8ceabacb6634442cde55.tar.bz2 txr-284bb3680d566e26bf6d8ceabacb6634442cde55.zip |
Hash table iterators exposed, with new macro.
* eval.c (eval_init): Register hash-begin and hash-next intrinsics.
* lisplib.c (hash_set_entries, hash_instantiate): New static functions.
(lisplib_init): Register new tables in dl_table.
* share/txr/stdlib/hash.tl: New file.
* txr.1: Document with-hash-iter macro.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -4499,6 +4499,8 @@ void eval_init(void) reg_fun(intern(lit("hash-update-1"), user_package), func_n4o(hash_update_1, 3)); reg_fun(intern(lit("hash-revget"), user_package), func_n4o(hash_revget, 2)); + reg_fun(intern(lit("hash-begin"), user_package), func_n1(hash_begin)); + reg_fun(intern(lit("hash-next"), user_package), func_n1(hash_next)); reg_fun(intern(lit("eval"), user_package), func_n2o(eval_intrinsic, 1)); reg_fun(intern(lit("lisp-parse"), user_package), func_n5o(lisp_parse, 0)); |