diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-02-05 15:12:22 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-02-05 15:12:22 -0800 |
commit | 70ddb25b6534b1dbf0e69b53dc768a80bb4838e0 (patch) | |
tree | 4295b58769161d150e31d016918b1a34eed5e833 | |
parent | b1a8da709c6fc23122cd0f1c1999688ceff27a38 (diff) | |
download | txr-70ddb25b6534b1dbf0e69b53dc768a80bb4838e0.tar.gz txr-70ddb25b6534b1dbf0e69b53dc768a80bb4838e0.tar.bz2 txr-70ddb25b6534b1dbf0e69b53dc768a80bb4838e0.zip |
bugfix: wrongly strict stream class check in poll.
* sysif.c (poll_wrap): Fix function not accepting streams
of type stdio-stream or any other derived stream type.
We must check that the object is subtyped from stream,
not that it's exactly of type stream.
-rw-r--r-- | sysif.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -790,7 +790,7 @@ static val poll_wrap(val poll_list, val timeout_in) pfd[i].fd = c_num(obj); break; case COBJ: - if (obj->co.cls == stream_s) { + if (subtypep(obj->co.cls, stream_s)) { val fdval = stream_get_prop(obj, fd_k); if (!fdval) { free(pfd); |