18#define IO_WITHOUT_GVL(func, arg) rb_nogvl(func, arg, RUBY_UBF_IO, 0, RB_NOGVL_OFFLOAD_SAFE)
19#define IO_WITHOUT_GVL_INT(func, arg) (int)(VALUE)IO_WITHOUT_GVL(func, arg)
117void ruby_set_inplace_mode(
const char *);
118void rb_stdio_set_default_encoding(
void);
120size_t rb_io_memsize(
const rb_io_t *);
121int rb_stderr_tty_p(
void);
122void rb_io_fptr_finalize_internal(
void *
ptr);
123#ifdef rb_io_fptr_finalize
124# undef rb_io_fptr_finalize
126#define rb_io_fptr_finalize rb_io_fptr_finalize_internal
129VALUE rb_io_prep_stdin(
void);
130VALUE rb_io_prep_stdout(
void);
131VALUE rb_io_prep_stderr(
void);
133RUBY_SYMBOL_EXPORT_BEGIN
135void rb_maygvl_fd_fix_cloexec(
int fd);
136int rb_gc_for_fd(
int err);
137void rb_write_error_str(
VALUE mesg);
139VALUE rb_io_blocking_region_wait(
struct rb_io *io, rb_blocking_function_t *function,
void *argument,
enum rb_io_event events);
140VALUE rb_io_blocking_region(
struct rb_io *io, rb_blocking_function_t *function,
void *argument);
141RUBY_SYMBOL_EXPORT_END
rb_io_event
Type of events that an IO can wait.
char * ptr
Pointer to the underlying memory region, of at least capa bytes.
Decomposed encoding flags (e.g.
Ruby's IO, metadata and buffers.
int mode
mode flags: FMODE_XXXs
rb_io_buffer_t wbuf
Write buffer.
void(* finalize)(struct rb_io *, int)
finalize proc
rb_econv_t * readconv
Encoding converter used when reading from this IO.
rb_econv_t * writeconv
Encoding converter used when writing to this IO.
struct rb_io_encoding encs
Decomposed encoding flags.
VALUE self
The IO's Ruby level counterpart.
VALUE write_lock
This is a Ruby level mutex.
VALUE timeout
The timeout associated with this IO when performing blocking operations.
FILE * stdio_file
stdio ptr for read/write, if available.
VALUE writeconv_pre_ecopts
Value of ::rb_io_t::rb_io_enc_t::ecopts stored right before initialising rb_io_t::writeconv.
VALUE tied_io_for_writing
Duplex IO object, if set.
int writeconv_initialized
Whether rb_io_t::writeconv is already set up.
rb_io_buffer_t rbuf
(Byte) read buffer.
int lineno
number of lines read
VALUE writeconv_asciicompat
This is, when set, an instance of rb_cString which holds the "common" encoding.
rb_io_buffer_t cbuf
rb_io_ungetc() destination.
rb_pid_t pid
child's pid (for pipes)
int writeconv_pre_ecflags
Value of ::rb_io_t::rb_io_enc_t::ecflags stored right before initialising rb_io_t::writeconv.
VALUE pathv
pathname for file
uintptr_t VALUE
Type that represents a Ruby object.