summaryrefslogtreecommitdiff
path: root/ext/zlib/extconf.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-10 00:04:47 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-10 00:04:47 +0000
commit3e419e6c4aa3675d8b4aa4ae74610ec5289a9500 (patch)
tree3e710b73d8fd8e52350295ebed8fe28b76ac59c6 /ext/zlib/extconf.rb
parent428a5a9cd95b92b0a5570cb1154191c23453ebd4 (diff)
* ext/zlib/zlib.c: Added streaming support to inflate processing.
This allows zlib streams to be processed without huge memory growth. [Feature #6612] * NEWS: ditto * ext/zlib/zlib.c (zstream_expand_buffer): Uses rb_yield when a block is given for streaming support. Refactored to use zstream_expand_buffer_into to remove duplicate code. * ext/zlib/zlib.c (zstream_expand_buffer_protect): Added wrapper function to pass jump state back through GVL-free section to allow zstream clean-up before terminating the ruby call. * ext/zlib/zlib.c (zstream_expand_buffer_without_gvl): Acquire GVL to yield processed chunk of output stream. * ext/zlib/zlib.c (zstream_detach_buffer): When a block is given, returns Qnil mid-stream and yields the output buffer at the end of the stream. * ext/zlib/extconf.rb: Update INCFLAGS to find internal.h for rb_thread_call_with_gvl * test/zlib/test_zlib.rb: Updated tests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36349 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/zlib/extconf.rb')
-rw-r--r--ext/zlib/extconf.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/zlib/extconf.rb b/ext/zlib/extconf.rb
index c49c29d..c08dba7 100644
--- a/ext/zlib/extconf.rb
+++ b/ext/zlib/extconf.rb
@@ -7,8 +7,9 @@
require 'mkmf'
require 'rbconfig'
-dir_config 'zlib'
+$INCFLAGS << " -I$(topdir) -I$(top_srcdir)"
+dir_config 'zlib'
if %w'z libz zlib1 zlib zdll'.find {|z| have_library(z, 'deflateReset')} and
have_header('zlib.h') then