diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-07-06 14:14:59 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-07-06 14:14:59 -0700 |
commit | 77db3d2545b713caa64e8b741af3a9aea13ddc34 (patch) | |
tree | 86c1ba45687c57c6ff7f595453b964077df903a0 | |
parent | 567baab047c82c17c7e3d5a16dc508b5abf6cd25 (diff) | |
download | txr-77db3d2545b713caa64e8b741af3a9aea13ddc34.tar.gz txr-77db3d2545b713caa64e8b741af3a9aea13ddc34.tar.bz2 txr-77db3d2545b713caa64e8b741af3a9aea13ddc34.zip |
Bugfix in printed rep of stdio stream.
* stream.c (stdio_stream_print): Wrong way test on h->pid;
if it is nonzero it must be printed. Was printed wrong:
argument of integer type passed to ~s which expects a val.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | stream.c | 5 |
2 files changed, 11 insertions, 2 deletions
@@ -1,5 +1,13 @@ 2015-07-06 Kaz Kylheku <kaz@kylheku.com> + Bugfix in printed rep of stdio stream. + + * stream.c (stdio_stream_print): Wrong way test on h->pid; + if it is nonzero it must be printed. Was printed wrong: + argument of integer type passed to ~s which expects a val. + +2015-07-06 Kaz Kylheku <kaz@kylheku.com> + Clarify clear-error and flush return value. * stream.c (stdio_clear_error): Return the prior value of h->err. @@ -276,9 +276,10 @@ static void stdio_stream_print(val stream, val out) { struct stdio_handle *h = coerce(struct stdio_handle *, stream->co.handle); if (h->pid) - format(out, lit("#<~s ~s>"), stream->co.cls, h->descr, nao); + format(out, lit("#<~s ~s ~s>"), stream->co.cls, h->descr, + num(h->pid), nao); else - format(out, lit("#<~s ~s ~s>"), stream->co.cls, h->descr, h->pid, nao); + format(out, lit("#<~s ~s>"), stream->co.cls, h->descr, nao); } static void stdio_stream_destroy(val stream) |