ruby-changes:24232
From: drbrain <ko1@a...>
Date: Tue, 3 Jul 2012 14:52:32 +0900 (JST)
Subject: [ruby-changes:24232] drbrain:r36283 (trunk): * ext/zlib/zlib.c (zstream_run_func): Fix bug that caused early exit
drbrain 2012-07-03 14:52:22 +0900 (Tue, 03 Jul 2012) New Revision: 36283 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36283 Log: * 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. Modified files: trunk/ChangeLog trunk/ext/zlib/zlib.c Index: ChangeLog =================================================================== --- ChangeLog (revision 36282) +++ ChangeLog (revision 36283) @@ -1,3 +1,9 @@ +Tue Jul 3 14:50:16 2012 Eric Hodel <drbrain@s...> + + * 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@r...> * ext/dl/cfunc.c (rb_dlcfunc_call): also needed the workaround for VC8 Index: ext/zlib/zlib.c =================================================================== --- ext/zlib/zlib.c (revision 36282) +++ ext/zlib/zlib.c (revision 36283) @@ -917,7 +917,8 @@ } 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 @@ break; } - if (err != Z_OK) + if (err != Z_OK && err != Z_BUF_ERROR) break; if (z->stream.avail_out > 0) { @@ -955,7 +956,8 @@ * 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/