diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-08-17 21:53:10 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-08-17 21:53:10 -0700 |
commit | 25a3e10e7aed58c8745fdadc87b3b26e8b51523e (patch) | |
tree | 1cbe9b70c318f8406c4dbe92c4213218f24487a0 /win | |
parent | 49fa1df6a448459279cfcaa98f26f9d0d584a8ff (diff) | |
download | txr-25a3e10e7aed58c8745fdadc87b3b26e8b51523e.tar.gz txr-25a3e10e7aed58c8745fdadc87b3b26e8b51523e.tar.bz2 txr-25a3e10e7aed58c8745fdadc87b3b26e8b51523e.zip |
Rewriting string-extend.
* lib.c (string_extend): Restructure internals with these
goals: no loop: calculate needed space in one step; if the
allocation needs to grow, then grow it by 25% or step it
up to exactly the needed size, whichever of the two is
larger. Overflow check against INT_PTR_MAX, since len and alloc
fields of string are not fixnums but integers extracted
with c_num.
Diffstat (limited to 'win')
0 files changed, 0 insertions, 0 deletions