mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
17998ad3bb
commit
aecc470a33
1 changed files with 5 additions and 4 deletions
|
@ -1701,15 +1701,16 @@ no_exception_p(VALUE opts)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef RB_IO_TIMEOUT_DEFAULT
|
// Provided by Ruby 3.2.0 and later in order to support the default IO#timeout.
|
||||||
#define RB_IO_TIMEOUT_DEFAULT Qnil
|
#ifndef RUBY_IO_TIMEOUT_DEFAULT
|
||||||
|
#define RUBY_IO_TIMEOUT_DEFAULT Qnil
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
io_wait_writable(rb_io_t *fptr)
|
io_wait_writable(rb_io_t *fptr)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_RB_IO_MAYBE_WAIT
|
#ifdef HAVE_RB_IO_MAYBE_WAIT
|
||||||
rb_io_maybe_wait_writable(errno, fptr->self, RB_IO_TIMEOUT_DEFAULT);
|
rb_io_maybe_wait_writable(errno, fptr->self, RUBY_IO_TIMEOUT_DEFAULT);
|
||||||
#else
|
#else
|
||||||
rb_io_wait_writable(fptr->fd);
|
rb_io_wait_writable(fptr->fd);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1719,7 +1720,7 @@ static void
|
||||||
io_wait_readable(rb_io_t *fptr)
|
io_wait_readable(rb_io_t *fptr)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_RB_IO_MAYBE_WAIT
|
#ifdef HAVE_RB_IO_MAYBE_WAIT
|
||||||
rb_io_maybe_wait_readable(errno, fptr->self, RB_IO_TIMEOUT_DEFAULT);
|
rb_io_maybe_wait_readable(errno, fptr->self, RUBY_IO_TIMEOUT_DEFAULT);
|
||||||
#else
|
#else
|
||||||
rb_io_wait_readable(fptr->fd);
|
rb_io_wait_readable(fptr->fd);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue