diff options
author | Peter Zhu <peter@peterzhu.ca> | 2021-11-05 09:51:53 -0400 |
---|---|---|
committer | Peter Zhu <peter@peterzhu.ca> | 2021-11-08 14:05:54 -0500 |
commit | aeae6e2842e1702dfb89b8ae69b48c4f5f64c662 (patch) | |
tree | 33a7c7e23bf109123a77c7eb644e66e9bd44d75d /ext/zlib | |
parent | aa5bccfc65cf47a10d72cefa4bc2ee097f135b4c (diff) | |
download | ruby-aeae6e2842e1702dfb89b8ae69b48c4f5f64c662.tar.gz |
[Feature #18290] Remove all usages of rb_gc_force_recycle
This commit removes usages of rb_gc_force_recycle since it is a burden
to maintain and makes changes to the GC difficult.
Diffstat (limited to 'ext/zlib')
-rw-r--r-- | ext/zlib/zlib.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 9937f82740..9bf71ce80e 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -894,7 +894,6 @@ zstream_discard_input(struct zstream *z, long len) } rb_str_resize(z->input, newlen); if (newlen == 0) { - rb_gc_force_recycle(z->input); z->input = Qnil; } else { @@ -1137,7 +1136,6 @@ loop: } if (!NIL_P(old_input)) { rb_str_resize(old_input, 0); - rb_gc_force_recycle(old_input); } if (args.jump_state) @@ -2906,8 +2904,6 @@ gzfile_readpartial(struct gzfile *gz, long len, VALUE outbuf) if (!NIL_P(outbuf)) { rb_str_resize(outbuf, RSTRING_LEN(dst)); memcpy(RSTRING_PTR(outbuf), RSTRING_PTR(dst), RSTRING_LEN(dst)); - rb_str_resize(dst, 0); - rb_gc_force_recycle(dst); dst = outbuf; } return dst; |