diff options
author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2021-08-07 13:32:15 +1200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-08-31 19:33:38 +0900 |
commit | d19af1675c9dcf4ccef643e831d83976f1831101 (patch) | |
tree | b18871dc466b216e5c4801e2bf74342610538cab /ext/zlib | |
parent | 41867532ac07515543e4d7e75094edeff09de743 (diff) | |
download | ruby-d19af1675c9dcf4ccef643e831d83976f1831101.tar.gz |
[ruby/zlib] Don't print out warnings when freeing.
https://github.com/ruby/zlib/commit/098c50255d
Diffstat (limited to 'ext/zlib')
-rw-r--r-- | ext/zlib/zlib.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 794cf3b103..b129e2eeb5 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -1226,17 +1226,6 @@ zstream_finalize(struct zstream *z) finalizer_warn("the stream was freed prematurely."); } -static void -zstream_free(void *p) -{ - struct zstream *z = p; - - if (ZSTREAM_IS_READY(z)) { - zstream_finalize(z); - } - xfree(z); -} - static size_t zstream_memsize(const void *p) { @@ -1246,7 +1235,7 @@ zstream_memsize(const void *p) static const rb_data_type_t zstream_data_type = { "zstream", - { zstream_mark, zstream_free, zstream_memsize, }, + { zstream_mark, xfree, zstream_memsize, }, 0, 0, RUBY_TYPED_FREE_IMMEDIATELY }; |