diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-02-21 06:18:15 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-02-21 06:18:15 -0800 |
commit | 386545bab0787be5ca4b24fb0f64e89ee49eb908 (patch) | |
tree | b14b6e0bd2a348de1195616623c6b9253eb1a1d6 /linenoise/example.c | |
parent | 4f26ccee4c18fe02868345ed50082cd0d4203a08 (diff) | |
download | txr-386545bab0787be5ca4b24fb0f64e89ee49eb908.tar.gz txr-386545bab0787be5ca4b24fb0f64e89ee49eb908.tar.bz2 txr-386545bab0787be5ca4b24fb0f64e89ee49eb908.zip |
listener: fix hang when stringifying output.
The issue is that when *listener-pprint-p* is set, then
the evaluation is printed using pprinl. The user may have
arranged for that to safely work when there are circular
objects in the print. But then the listener ignores
*listener-pprint-p* when saving the output object as a string
(which is done for the sake of the Ctrl-X Ctrl-P
paste-previous-output feature). The tostring function is used
which can blow up on an object containing circular structure,
even though the object was successfully printed.
The user is puzzled: why was the result of the evaluation
printed completely and perfectly, yet the image has hanged?
* parser.c (repl): Do not use tostring for converting the
evaluated output to a string. Choose between tostring and
tostringp based on the *listener-pprint-p* variable.
Diffstat (limited to 'linenoise/example.c')
0 files changed, 0 insertions, 0 deletions