summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-02-05 15:12:22 -0800
committerKaz Kylheku <kaz@kylheku.com>2017-02-05 15:12:22 -0800
commit70ddb25b6534b1dbf0e69b53dc768a80bb4838e0 (patch)
tree4295b58769161d150e31d016918b1a34eed5e833
parentb1a8da709c6fc23122cd0f1c1999688ceff27a38 (diff)
downloadtxr-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysif.c b/sysif.c
index 26b67f3a..fa88128d 100644
--- a/sysif.c
+++ b/sysif.c
@@ -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);