summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2023-06-01 20:41:06 +0900
committergit <svn-admin@ruby-lang.org>2023-06-01 11:41:19 +0000
commitd5a5333168690ea1e3453cdb6a5d042f46ba80b8 (patch)
treef4efe2a11225ce1091fcc0acaccab7e7079d0373
parent957b6a491fe6a9a2df467f83a37e7c34861f995c (diff)
[ruby/stringio] Avoid direct struct usage.
(https://github.com/ruby/stringio/pull/54) We will eventually want to refactor this, but for now this is compatible enough.
-rw-r--r--ext/stringio/stringio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/stringio/stringio.c b/ext/stringio/stringio.c
index e69afc31f1..a385d70d6f 100644
--- a/ext/stringio/stringio.c
+++ b/ext/stringio/stringio.c
@@ -276,7 +276,7 @@ strio_init(int argc, VALUE *argv, struct StringIO *ptr, VALUE self)
{
VALUE string, vmode, opt;
int oflags;
- struct rb_io_enc_t convconfig;
+ rb_io_enc_t convconfig;
argc = rb_scan_args(argc, argv, "02:", &string, &vmode, &opt);
rb_io_extract_modeenc(&vmode, 0, opt, &oflags, &ptr->flags, &convconfig);
@@ -1743,7 +1743,7 @@ strio_set_encoding(int argc, VALUE *argv, VALUE self)
else {
enc = rb_find_encoding(ext_enc);
if (!enc) {
- struct rb_io_enc_t convconfig;
+ rb_io_enc_t convconfig;
int oflags, fmode;
VALUE vmode = rb_str_append(rb_str_new_cstr("r:"), ext_enc);
rb_io_extract_modeenc(&vmode, 0, Qnil, &oflags, &fmode, &convconfig);