mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
c7c397f917
commit
1884f1c0ab
2 changed files with 11 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Tue Jul 3 14:50:16 2012 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
|
* ext/zlib/zlib.c (zstream_run_func): Don't exit run loop for buffer
|
||||||
|
error. [Feature #6615]
|
||||||
|
* ext/zlib/zlib.c: Fix style to match existing functions.
|
||||||
|
|
||||||
Tue Jul 3 12:05:51 2012 NAKAMURA Usaku <usa@ruby-lang.org>
|
Tue Jul 3 12:05:51 2012 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* ext/dl/cfunc.c (rb_dlcfunc_call): also needed the workaround for VC8
|
* ext/dl/cfunc.c (rb_dlcfunc_call): also needed the workaround for VC8
|
||||||
|
|
|
@ -917,7 +917,8 @@ zstream_end(struct zstream *z)
|
||||||
}
|
}
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
zstream_run_func(void *ptr) {
|
zstream_run_func(void *ptr)
|
||||||
|
{
|
||||||
struct zstream_run_args *args = (struct zstream_run_args *)ptr;
|
struct zstream_run_args *args = (struct zstream_run_args *)ptr;
|
||||||
int err, flush = args->flush;
|
int err, flush = args->flush;
|
||||||
struct zstream *z = args->z;
|
struct zstream *z = args->z;
|
||||||
|
@ -934,7 +935,7 @@ zstream_run_func(void *ptr) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (err != Z_OK)
|
if (err != Z_OK && err != Z_BUF_ERROR)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (z->stream.avail_out > 0) {
|
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().
|
* There is no safe way to interrupt z->run->func().
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
zstream_unblock_func(void *ptr) {
|
zstream_unblock_func(void *ptr)
|
||||||
|
{
|
||||||
struct zstream_run_args *args = (struct zstream_run_args *)ptr;
|
struct zstream_run_args *args = (struct zstream_run_args *)ptr;
|
||||||
|
|
||||||
args->interrupt = 1;
|
args->interrupt = 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue