diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-01-09 20:22:21 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-01-09 20:22:21 -0800 |
commit | 41e5183c51e48cd2854099159a173da10eb30b8b (patch) | |
tree | b7b9e43817b220348b8df581a78195461ec2303d /eval.c | |
parent | 1020794b7ff51a4f168a73343f0674e71b0b279b (diff) | |
download | txr-41e5183c51e48cd2854099159a173da10eb30b8b.tar.gz txr-41e5183c51e48cd2854099159a173da10eb30b8b.tar.bz2 txr-41e5183c51e48cd2854099159a173da10eb30b8b.zip |
Rework lazy string optimization done in TXR 118.
This is also a bugfix. Padding up the index to be at least
1024 characters longer than the existing prefix was dumb
and wrong; it changes the semantics of code which restores the
list from the lazy string, like the @(freeform) directive.
How much of the string is forced is visible to the caller!
* lib.c (lazy_str_force, lazy_str_force_upto): Don't
collect pieces from the lazy list and then catenate them
in one pass. Instead, use the existing function string_extend,
which grows the string exponentially.
Diffstat (limited to 'eval.c')
0 files changed, 0 insertions, 0 deletions