Skip to content

Commit

Permalink
Adjust a fucntion signature
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu authored and hsbt committed Nov 30, 2019
1 parent 3e98e4c commit ee5c807
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ext/zlib/zlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -4277,13 +4277,19 @@ rb_gzreader_external_encoding(VALUE self)
}

static VALUE
zlib_gzip_ensure(VALUE arg)
zlib_gzip_end_rescue(VALUE arg)
{
struct gzfile *gz = (struct gzfile *)arg;
rb_rescue((VALUE(*)())gz->end, arg, NULL, Qnil);
gz->end(gz);
return Qnil;
}

static VALUE
zlib_gzip_ensure(VALUE arg)
{
return rb_rescue(zlib_gzip_end_rescue, arg, NULL, Qnil);
}

static void
zlib_gzip_end(struct gzfile *gz)
{
Expand Down

0 comments on commit ee5c807

Please sign in to comment.