Skip to content

Commit ae94419

Browse files
authored
Avoid direct struct usage. (#54)
We will eventually want to refactor this, but for now this is compatible enough.
1 parent af11faa commit ae94419

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/stringio/stringio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ strio_init(int argc, VALUE *argv, struct StringIO *ptr, VALUE self)
276276
{
277277
VALUE string, vmode, opt;
278278
int oflags;
279-
struct rb_io_enc_t convconfig;
279+
rb_io_enc_t convconfig;
280280

281281
argc = rb_scan_args(argc, argv, "02:", &string, &vmode, &opt);
282282
rb_io_extract_modeenc(&vmode, 0, opt, &oflags, &ptr->flags, &convconfig);
@@ -1743,7 +1743,7 @@ strio_set_encoding(int argc, VALUE *argv, VALUE self)
17431743
else {
17441744
enc = rb_find_encoding(ext_enc);
17451745
if (!enc) {
1746-
struct rb_io_enc_t convconfig;
1746+
rb_io_enc_t convconfig;
17471747
int oflags, fmode;
17481748
VALUE vmode = rb_str_append(rb_str_new_cstr("r:"), ext_enc);
17491749
rb_io_extract_modeenc(&vmode, 0, Qnil, &oflags, &fmode, &convconfig);

0 commit comments

Comments
 (0)