diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-03-28 14:55:15 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-03-28 14:55:15 -0700 |
commit | d51806f15fff2716570d0d9d5887bcadaf4a288b (patch) | |
tree | 215730135213df600f90d8608c2203a9190ab120 /lib.c | |
parent | 1e67360104eb51a4df38c8be2fdb513517e06965 (diff) | |
download | txr-d51806f15fff2716570d0d9d5887bcadaf4a288b.tar.gz txr-d51806f15fff2716570d0d9d5887bcadaf4a288b.tar.bz2 txr-d51806f15fff2716570d0d9d5887bcadaf4a288b.zip |
* lib.c (obj_print, obj_pprint): Do not use the #<lazy-string ..>
notation for lazy strings that have been forced.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -4276,7 +4276,11 @@ val obj_print(val obj, val out) } return obj; case LSTR: - format(out, lit("#<lazy-string: ~s>"), obj->ls.prefix, nao); + if (obj->ls.list) + format(out, lit("#<lazy-string: ~s (~s ...)>"), obj->ls.prefix, + obj->ls.list, nao); + else + obj_print(obj->ls.prefix, out); return obj; case COBJ: obj->co.ops->print(obj, out); @@ -4373,7 +4377,11 @@ val obj_pprint(val obj, val out) } return obj; case LSTR: - format(out, lit("#<lazy-string: ~a>"), obj->ls.prefix, nao); + if (obj->ls.list) + format(out, lit("#<lazy-string: ~s (~s ...)>"), obj->ls.prefix, + obj->ls.list, nao); + else + obj_pprint(obj->ls.prefix, out); return obj; case COBJ: obj->co.ops->print(obj, out); |