diff options
-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) |