Skip to content

Commit 098c502

Browse files
authored
Don't print out warnings when freeing.
1 parent 4b1023b commit 098c502

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

ext/zlib/zlib.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,17 +1226,6 @@ zstream_finalize(struct zstream *z)
12261226
finalizer_warn("the stream was freed prematurely.");
12271227
}
12281228

1229-
static void
1230-
zstream_free(void *p)
1231-
{
1232-
struct zstream *z = p;
1233-
1234-
if (ZSTREAM_IS_READY(z)) {
1235-
zstream_finalize(z);
1236-
}
1237-
xfree(z);
1238-
}
1239-
12401229
static size_t
12411230
zstream_memsize(const void *p)
12421231
{
@@ -1246,7 +1235,7 @@ zstream_memsize(const void *p)
12461235

12471236
static const rb_data_type_t zstream_data_type = {
12481237
"zstream",
1249-
{ zstream_mark, zstream_free, zstream_memsize, },
1238+
{ zstream_mark, xfree, zstream_memsize, },
12501239
0, 0, RUBY_TYPED_FREE_IMMEDIATELY
12511240
};
12521241

0 commit comments

Comments
 (0)