diff options
author | Samuel Williams <[email protected]> | 2025-04-15 20:15:26 +0900 |
---|---|---|
committer | git <[email protected]> | 2025-04-15 11:15:35 +0000 |
commit | 28491e53cda02c9b7372c01b88bf55dad50a53bf () | |
tree | 2fb4f089e914942be0361ae206c74c79e73b32bd /ext/stringio | |
parent | f6fddbd3371a6b923264fad7a23b62bdad987d76 (diff) |
[ruby/stringio] Support for `rb_io_mode_t`
(https://.com/ruby/stringio/pull/129) Companion PR to <https://.com/ruby/ruby/pull/7894>. https://.com/ruby/stringio/commit/2d3988e12f
-rw-r--r-- | ext/stringio/extconf.rb | 2 | ||||
-rw-r--r-- | ext/stringio/stringio.c | 9 |
2 files changed, 9 insertions, 2 deletions
@@ -1,6 +1,8 @@ # frozen_string_literal: false require 'mkmf' if RUBY_ENGINE == 'ruby' create_makefile('stringio') else File.write('Makefile', dummy_makefile("").join) @@ -35,12 +35,16 @@ STRINGIO_VERSION = "3.1.6"; # define rb_class_new_instance_kw(argc, argv, klass, kw_splat) rb_class_new_instance(argc, argv, klass) #endif struct StringIO { VALUE string; rb_encoding *enc; long pos; long lineno; - int flags; int count; }; @@ -1852,7 +1856,8 @@ strio_set_encoding(int argc, VALUE *argv, VALUE self) enc = rb_find_encoding(ext_enc); if (!enc) { 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); enc = convconfig.enc2; |