Skip to content
Open
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
20 changes: 10 additions & 10 deletions ext/zlib/zlib.c
Original file line numberDiff line numberDiff line change
Expand Up@@ -609,7 +609,7 @@ static const struct zstream_funcs inflate_funcs = {
};

struct zstream_run_args {
struct zstream *const z;
struct zstream *z;
Bytef *src;
long len;
int flush; /* stream flush value for inflate() or deflate() */
Expand DownExpand Up@@ -1227,15 +1227,15 @@ zstream_run_ensure(VALUE value_arg)
static void
zstream_run(struct zstream *z, Bytef *src, long len, int flush)
{
struct zstream_run_args args = {
.z = z,
.src = src,
.len = len,
.flush = flush,
.interrupt = 0,
.jump_state = 0,
.stream_output = !ZSTREAM_IS_GZFILE(z) && rb_block_given_p(),
};
struct zstream_run_args args;

args.z = z;
args.src = src;
args.len = len;
args.flush = flush;
args.interrupt = 0;
args.jump_state = 0;
args.stream_output = !ZSTREAM_IS_GZFILE(z) && rb_block_given_p();

rb_ensure(zstream_run_try, (VALUE)&args, zstream_run_ensure, (VALUE)&args);
if (args.jump_state)
Expand Down