diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-03 05:52:22 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-07-03 05:52:22 +0000 |
commit | 1884f1c0ab470d26f571a8d4bbc9fae7d4035122 (patch) | |
tree | d5be1710bbf03774c63250de9dc8d4ba0e3445c4 /ext/zlib | |
parent | c7c397f91757d2b1bcc9c21594bc1494750bc7cb (diff) |
* ext/zlib/zlib.c (zstream_run_func): Fix bug that caused early exit
of GVL-free loop. [Feature #6615]
* ext/zlib/zlib.c: Fix style to match existing functions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/zlib')
-rw-r--r-- | ext/zlib/zlib.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index ef718a4a86..73f3f7c5f0 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -917,7 +917,8 @@ zstream_end(struct zstream *z) } static VALUE -zstream_run_func(void *ptr) { +zstream_run_func(void *ptr) +{ struct zstream_run_args *args = (struct zstream_run_args *)ptr; int err, flush = args->flush; struct zstream *z = args->z; @@ -934,7 +935,7 @@ zstream_run_func(void *ptr) { break; } - if (err != Z_OK) + if (err != Z_OK && err != Z_BUF_ERROR) break; if (z->stream.avail_out > 0) { @@ -955,7 +956,8 @@ zstream_run_func(void *ptr) { * There is no safe way to interrupt z->run->func(). */ static void -zstream_unblock_func(void *ptr) { +zstream_unblock_func(void *ptr) +{ struct zstream_run_args *args = (struct zstream_run_args *)ptr; args->interrupt = 1; |