summaryrefslogtreecommitdiffstats
path: root/tests/012
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2024-02-27 20:46:33 -0800
committerKaz Kylheku <kaz@kylheku.com>2024-02-27 20:46:33 -0800
commitb3a440ca242a07ed86f89d06208f15757d947e12 (patch)
tree805e1862a39da0c730627a0a30ecb78ad219ec52 /tests/012
parentd36f90235fcf1561a43bf79283a40b042efff84a (diff)
downloadtxr-b3a440ca242a07ed86f89d06208f15757d947e12.tar.gz
txr-b3a440ca242a07ed86f89d06208f15757d947e12.tar.bz2
txr-b3a440ca242a07ed86f89d06208f15757d947e12.zip
seq_build: fix: incompatible items must create list.
In the make_like function, the list is converted to string or buffer if the first element of the list is a character, or integer. We need similar logic in seq_build. We can make it better. When any item is added which is incompatible, we can convert what we have so far to a list, change the seq_build type to list, and keep going. * lib.c (seq_build_convert_to_list): New static function. (seq_build_str_add, seq_build_buf_add): If the item is incompatible, convert the string or buffer to a list and pass to seq_build_convert_to_list. Then call bu->ops->add to add the item, now as a list. (seq_build_buf_pend): Function removed. (sb_buf_ops): Use the seq_build_generic_pend function for the pend operation. This is because we have to check each item one by one; we cannot use replace_buf.
Diffstat (limited to 'tests/012')
0 files changed, 0 insertions, 0 deletions