mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/zlib/zlib.c (gzfile_reader_get_unused): use rb_str_new_shared
because gz->z.input is hidden string. [ruby-core:35057] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
10354c7b5c
commit
d6d24991bd
2 changed files with 8 additions and 2 deletions
|
@ -1,6 +1,12 @@
|
|||
Thu Feb 3 18:33:26 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* ext/zlib/zlib.c (gzfile_reader_get_unused): use rb_str_new_shared
|
||||
because gz->z.input is hidden string. [ruby-core:35057]
|
||||
|
||||
Thu Feb 3 16:34:10 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* enc/shift_jis.c (code_to_mbc): cast as int from the subtraction of pointers.
|
||||
* enc/shift_jis.c (code_to_mbc): cast as int from the subtraction of
|
||||
pointers.
|
||||
|
||||
* enc/utf_16le.c (utf16le_mbc_enc_len): use ptrdiff_t.
|
||||
|
||||
|
|
|
@ -2471,7 +2471,7 @@ gzfile_reader_get_unused(struct gzfile *gz)
|
|||
}
|
||||
if (NIL_P(gz->z.input)) return Qnil;
|
||||
|
||||
str = rb_str_dup(gz->z.input);
|
||||
str = rb_str_new_shared(gz->z.input);
|
||||
OBJ_TAINT(str); /* for safe */
|
||||
return str;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue