Ruby
3.1.0dev(2021-09-10revisionb76ad15ed0da636161de0243c547ee1e6fc95681)
|
Go to the source code of this file.
Data Structures | |
struct | StringIO |
struct | getline_arg |
Macros | |
#define | STRINGIO_VERSION "3.0.0" |
#define | rb_io_extract_modeenc strio_extract_modeenc |
#define | IS_STRIO(obj) (rb_typeddata_is_kind_of((obj), &strio_data_type)) |
#define | error_inval(msg) (rb_syserr_fail(EINVAL, msg)) |
#define | get_enc(ptr) ((ptr)->enc ? (ptr)->enc : rb_enc_get((ptr)->string)) |
#define | check_strio(self) ((struct StringIO*)rb_check_typeddata((self), &strio_data_type)) |
#define | StringIO(obj) get_strio(obj) |
#define | STRIO_READABLE FL_USER4 |
#define | STRIO_WRITABLE FL_USER5 |
#define | STRIO_READWRITE (STRIO_READABLE|STRIO_WRITABLE) |
#define | STRIO_MODE_SET_P(strio, mode) |
#define | CLOSED(strio) (!STRIO_MODE_SET_P(strio, READWRITE)) |
#define | READABLE(strio) STRIO_MODE_SET_P(strio, READABLE) |
#define | WRITABLE(strio) STRIO_MODE_SET_P(strio, WRITABLE) |
#define | strio_fcntl strio_unimpl |
#define | strio_flush strio_self |
#define | strio_fsync strio_0 |
#define | strio_set_sync strio_first |
#define | strio_tell strio_get_pos |
#define | strio_addstr rb_io_addstr |
#define | strio_print rb_io_print |
#define | strio_printf rb_io_printf |
#define | strio_puts rb_io_puts |
#define | strio_syswrite rb_io_write |
#define | strio_isatty strio_false |
#define | strio_pid strio_nil |
#define | strio_fileno strio_nil |
Typedefs | |
typedef char | strio_flags_check[(STRIO_READABLE/FMODE_READABLE==STRIO_WRITABLE/FMODE_WRITABLE) *2 - 1] |
Functions | |
void | Init_stringio (void) |
#define check_strio | ( | self | ) | ((struct StringIO*)rb_check_typeddata((self), &strio_data_type)) |
Definition at line 172 of file stringio.c.
#define CLOSED | ( | strio | ) | (!STRIO_MODE_SET_P(strio, READWRITE)) |
Definition at line 214 of file stringio.c.
#define error_inval | ( | msg | ) | (rb_syserr_fail(EINVAL, msg)) |
Definition at line 124 of file stringio.c.
#define get_enc | ( | ptr | ) | ((ptr)->enc ? (ptr)->enc : rb_enc_get((ptr)->string)) |
Definition at line 125 of file stringio.c.
#define IS_STRIO | ( | obj | ) | (rb_typeddata_is_kind_of((obj), &strio_data_type)) |
Definition at line 123 of file stringio.c.
#define rb_io_extract_modeenc strio_extract_modeenc |
Definition at line 36 of file stringio.c.
#define READABLE | ( | strio | ) | STRIO_MODE_SET_P(strio, READABLE) |
Definition at line 215 of file stringio.c.
#define StringIO | ( | obj | ) | get_strio(obj) |
Definition at line 205 of file stringio.c.
#define STRINGIO_VERSION "3.0.0" |
Definition at line 15 of file stringio.c.
#define strio_addstr rb_io_addstr |
Definition at line 1431 of file stringio.c.
#define strio_fcntl strio_unimpl |
Definition at line 695 of file stringio.c.
#define strio_fileno strio_nil |
Definition at line 1619 of file stringio.c.
#define strio_flush strio_self |
Definition at line 697 of file stringio.c.
#define strio_fsync strio_0 |
Definition at line 699 of file stringio.c.
#define strio_isatty strio_false |
Definition at line 1615 of file stringio.c.
#define STRIO_MODE_SET_P | ( | strio, | |
mode | |||
) |
Definition at line 211 of file stringio.c.
#define strio_pid strio_nil |
Definition at line 1617 of file stringio.c.
#define strio_print rb_io_print |
Definition at line 1440 of file stringio.c.
#define strio_printf rb_io_printf |
Definition at line 1448 of file stringio.c.
#define strio_puts rb_io_puts |
Definition at line 1480 of file stringio.c.
#define STRIO_READABLE FL_USER4 |
Definition at line 207 of file stringio.c.
#define STRIO_READWRITE (STRIO_READABLE|STRIO_WRITABLE) |
Definition at line 209 of file stringio.c.
#define strio_set_sync strio_first |
Definition at line 818 of file stringio.c.
#define strio_syswrite rb_io_write |
Definition at line 1604 of file stringio.c.
#define strio_tell strio_get_pos |
Definition at line 820 of file stringio.c.
#define STRIO_WRITABLE FL_USER5 |
Definition at line 208 of file stringio.c.
#define WRITABLE | ( | strio | ) | STRIO_MODE_SET_P(strio, WRITABLE) |
Definition at line 216 of file stringio.c.
typedef char strio_flags_check[(STRIO_READABLE/FMODE_READABLE==STRIO_WRITABLE/FMODE_WRITABLE) *2 - 1] |
Definition at line 210 of file stringio.c.
void Init_stringio | ( | void | ) |
Definition at line 1754 of file stringio.c.
References rb_cObject, rb_define_alloc_func(), rb_define_class(), rb_define_const(), rb_ext_ractor_safe(), rb_include_module(), rb_mEnumerable, rb_str_new_cstr, and STRINGIO_VERSION.