Expose enum rb_io_event
flags without _t
suffix. (#7887)
This commit is contained in:
parent
47a8de6095
commit
b7ee51e81d
Notes:
git
2023-06-01 13:54:38 +00:00
Merged-By: ioquatix <samuel@codeotaku.com>
@ -78,11 +78,13 @@ RUBY_EXTERN VALUE rb_eIOTimeoutError;
|
||||
*
|
||||
* This is visible from extension libraries because `io/wait` wants it.
|
||||
*/
|
||||
typedef enum {
|
||||
enum rb_io_event {
|
||||
RUBY_IO_READABLE = RB_WAITFD_IN, /**< `IO::READABLE` */
|
||||
RUBY_IO_WRITABLE = RB_WAITFD_OUT, /**< `IO::WRITABLE` */
|
||||
RUBY_IO_PRIORITY = RB_WAITFD_PRI, /**< `IO::PRIORITY` */
|
||||
} rb_io_event_t;
|
||||
};
|
||||
|
||||
typedef enum rb_io_event rb_io_event_t;
|
||||
|
||||
/**
|
||||
* IO buffers. This is an implementation detail of ::rb_io_t::wbuf and
|
||||
|
4
io.c
4
io.c
@ -9785,7 +9785,7 @@ wait_mode_sym(VALUE mode)
|
||||
rb_raise(rb_eArgError, "unsupported mode: %"PRIsVALUE, mode);
|
||||
}
|
||||
|
||||
static inline rb_io_event_t
|
||||
static inline enum rb_io_event
|
||||
io_event_from_value(VALUE value)
|
||||
{
|
||||
int events = RB_NUM2INT(value);
|
||||
@ -9816,7 +9816,7 @@ static VALUE
|
||||
io_wait(int argc, VALUE *argv, VALUE io)
|
||||
{
|
||||
VALUE timeout = Qundef;
|
||||
rb_io_event_t events = 0;
|
||||
enum rb_io_event events = 0;
|
||||
int return_io = 0;
|
||||
|
||||
// The documented signature for this method is actually incorrect.
|
||||
|
Loading…
x
Reference in New Issue
Block a user