From d5a5333168690ea1e3453cdb6a5d042f46ba80b8 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Thu, 1 Jun 2023 20:41:06 +0900 Subject: [PATCH] [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. --- ext/stringio/stringio.c | 4 ++-- 1 file 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);