diff options
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r-- | ext/zlib/zlib.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index e2b4f44c90..ae8536b7d1 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -695,7 +695,7 @@ zstream_expand_buffer_protect(void *ptr) rb_protect((VALUE (*)(VALUE))zstream_expand_buffer, (VALUE)z, &state); - return (void *)state; + return (void *)(VALUE)state; } static int @@ -991,8 +991,8 @@ zstream_run_func(void *ptr) } if (args->stream_output) { - state = (int)rb_thread_call_with_gvl(zstream_expand_buffer_protect, - (void *)z); + state = (int)(VALUE)rb_thread_call_with_gvl(zstream_expand_buffer_protect, + (void *)z); } else { state = zstream_expand_buffer_without_gvl(z); } @@ -1004,7 +1004,7 @@ zstream_run_func(void *ptr) } } - return (void *)err; + return (void *)(VALUE)err; } /* @@ -1050,9 +1050,8 @@ zstream_run(struct zstream *z, Bytef *src, long len, int flush) } loop: - err = (int)rb_thread_call_without_gvl( - zstream_run_func, (void *)&args, - zstream_unblock_func, (void *)&args); + err = (int)(VALUE)rb_thread_call_without_gvl(zstream_run_func, (void *)&args, + zstream_unblock_func, (void *)&args); if (flush != Z_FINISH && err == Z_BUF_ERROR && z->stream.avail_out > 0) { |