summaryrefslogtreecommitdiffstats
path: root/stream.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-09-26 11:20:08 -0700
committerKaz Kylheku <kaz@kylheku.com>2011-09-26 11:20:08 -0700
commitf3fe0151fc4116f0fec40e7454d8866f11908560 (patch)
treeaf1a4cee2e429f295b26587ee55463917860b341 /stream.c
parentd8e2644d5ebb3783660b2c9cb7e1d09dac2230f1 (diff)
downloadtxr-f3fe0151fc4116f0fec40e7454d8866f11908560.tar.gz
txr-f3fe0151fc4116f0fec40e7454d8866f11908560.tar.bz2
txr-f3fe0151fc4116f0fec40e7454d8866f11908560.zip
Trie compression. Hash table iteration.
Bugfix in typeof. * filter.c (trie_compress): New function. (trie_value_at, trie_lookup_feed_char, filter_string): Handle cons cell nodes in trie. (build_filter): Call trie_compress. * gc.c (cobj_destroy_op): Function renamed to cobj_destroy_stub_op since it doesn't do anything. (cobj_destroy_free_op): New function. * hash.c (struct hash_iter): New type. (hash_destroy): Function removed. (hash_ops): Reference to hash_destroy replaced with cobj_destroy_free_op. (hash_count, hash_iter_mark, hash_begin, hash_next): New functions. (hash_iter_ops): New static structure. * hash.h (hash_count, hash_begin, hash_next): New functions declared. * lib.c (hash_iter_s): New symbol variable. (typeof): Bugfix: TAG_LIT type tag not handled. (vecref): New function. (obj_init): Initialize hash_iter_s. * lib.h (cobj_destroy_op): Declaration renamed. (cobj_destroy_free_op, vecref): New functions declared. (hash_iter_s): New variable declared. * stream.c (string_in_ops, byte_in_ops): cobj_destroy_op renamed to cobj_destroy_stub_op.
Diffstat (limited to 'stream.c')
-rw-r--r--stream.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stream.c b/stream.c
index 2f6bf1e8..2b4d09f2 100644
--- a/stream.c
+++ b/stream.c
@@ -324,7 +324,7 @@ static val string_in_get_char(val stream)
static struct strm_ops string_in_ops = {
{ cobj_equal_op,
cobj_print_op,
- cobj_destroy_op,
+ cobj_destroy_stub_op,
string_in_stream_mark,
cobj_hash_op },
0,
@@ -353,7 +353,7 @@ static val byte_in_get_byte(val stream)
static struct strm_ops byte_in_ops = {
{ cobj_equal_op,
cobj_print_op,
- cobj_destroy_op,
+ cobj_destroy_stub_op,
cobj_mark_op,
cobj_hash_op },
0,