Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't print out warnings when freeing. #28

Merged
merged 1 commit into from
Aug 12, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions ext/zlib/zlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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
};

Expand Down