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
commitdb336e6356aac1cfdcb25c6361cf948496bbda98 (patch)
tree4295b58769161d150e31d016918b1a34eed5e833
parent965ba784ef12319c3bbd1062925db8ac3b76c811 (diff)
downloadtxr-db336e6356aac1cfdcb25c6361cf948496bbda98.tar.gz
txr-db336e6356aac1cfdcb25c6361cf948496bbda98.tar.bz2
txr-db336e6356aac1cfdcb25c6361cf948496bbda98.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);