ruby-changes:65425
From: wanabe <ko1@a...>
Date: Tue, 9 Mar 2021 13:19:21 +0900 (JST)
Subject: [ruby-changes:65425] 0c5f8c6276 (master): [ruby/zlib] Resume zstream if available [Bug #10961]
https://git.ruby-lang.org/ruby.git/commit/?id=0c5f8c6276 From 0c5f8c62766afe4605172800063e63fe36996658 Mon Sep 17 00:00:00 2001 From: wanabe <s.wanabe@g...> Date: Sun, 7 Mar 2021 21:22:47 +0900 Subject: [ruby/zlib] Resume zstream if available [Bug #10961] --- ext/zlib/zlib.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 90fa5a6..1db5bdb 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -1095,6 +1095,12 @@ loop: https://github.com/ruby/ruby/blob/trunk/ext/zlib/zlib.c#L1095 RB_NOGVL_UBF_ASYNC_SAFE); #endif + /* retry if no exception is thrown */ + if (err == Z_OK && args.interrupt) { + args.interrupt = 0; + goto loop; + } + if (flush != Z_FINISH && err == Z_BUF_ERROR && z->stream.avail_out > 0) { z->flags |= ZSTREAM_FLAG_IN_STREAM; -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/