diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-02-01 03:18:03 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2000-02-01 03:18:03 +0000 |
| commit | c91a4a38a570709bc3042b5fa30f6e5c63de8292 (patch) | |
| tree | a08815f2fc153a6f97648cbd1e882ba70cc2d0dd | |
| parent | b77b7c30d4855734384a095db41a734d315bb8fa (diff) | |
| download | ruby-c91a4a38a570709bc3042b5fa30f6e5c63de8292.tar.gz ruby-c91a4a38a570709bc3042b5fa30f6e5c63de8292.tar.xz ruby-c91a4a38a570709bc3042b5fa30f6e5c63de8292.zip | |
2000-02-01
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | io.c | 9 | ||||
| -rw-r--r-- | rubyio.h | 1 |
2 files changed, 10 insertions, 0 deletions
@@ -167,6 +167,15 @@ rb_read_pending(fp) return READ_DATA_PENDING(fp); } +void +rb_read_check(fp) + FILE *fp; +{ + if (!READ_DATA_PENDING(fp)) { + rb_thread_wait_fd(fileno(fp)); + } +} + /* writing functions */ static VALUE io_write(io, str) @@ -58,5 +58,6 @@ void rb_io_synchronized _((OpenFile*)); void rb_io_check_closed _((OpenFile*)); void rb_eof_error _((void)); +void rb_read_check _((FILE*)); int rb_read_pending _((FILE*)); #endif |
