summaryrefslogtreecommitdiff
path: root/ext/zlib
AgeCommit message (Collapse)Author
2013-04-01* ext/zlib/zlib.c (rb_gzfile_set_mtime): Use NUM2UINT.akr
The old logic doesn't work well on LP64 platforms as: .. -2**63-1 => error, -2**63 .. -2**62-1 => success, -2**62 .. -2**31-1 => error, -2**31 .. 2**31-1 => success, 2**31 .. 2**62-1 => error, 2**62 .. 2**64-1 => success, 2**64 .. => error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-01* ext/zlib/zlib.c (Zlib::Inflate.new):eregon
Fix documentation syntax and naming errors. Based on patch by Robin Dupret. Fix GH-271. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-01* ext/zlib/zlib.c (Zlib::GzipFile): Fix typo by zed_0xffzzak
[Fixes Github #229] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-23zlib.c: function namenobu
* ext/zlib/zlib.c (rb_gzreader_lines): fix function name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-22Deprecate #{lines,bytes,chars,codepoints} of IO-likes.knu
* io.c (rb_io_lines, rb_io_bytes, rb_io_chars, rb_io_codepoints): Deprecate IO#{lines,bytes,chars,codepoints} and those of ARGF. [Feature #6670] * ext/stringio/stringio.c (strio_lines, strio_bytes, strio_chars) (strio_codepoints): Deprecate StringIO#{lines,bytes,chars,codepoints}. [Feature #6670] * ext/zlib/zlib.c (rb_gzreader_lines, rb_gzreader_bytes): Deprecate Zlib::GzipReader#{lines,bytes}. [Feature #6670] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30zlib.c: suppress warningnobu
* ext/zlib/zlib.c (zstream_run): suppress unused-but-set-variable warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-30zlib.c: suppress warningnobu
* ext/zlib/zlib.c (zlib_mem_alloc): suppress unused-value warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-06Recognize zlibwapi as linking libraryluislavena
* ext/zlib/extconf.rb: Recognize zlibwapi as linking library. Patch by Daniel Berger. [ruby-core:44979] [Feature #6421] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-08* ext/zlib/zlib.c (zstream_run_func): don't call inflate() whennagachika
z->stream.avail_in == 0. it return Z_BUF_ERROR. but deflate() could be called with z->stream->avail_in == 0 because it has hidden buffer in z->stream->state (opaque structure). fix for gem install error. [ruby-dev:46149] [Bug #7040] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37119 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-09-04remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-11get rid of warningsnobu
* io.c (sysopen_func, rb_sysopen_internal): cast through VALUE to get rid of warnings. fixup of r36355. * process.c (rb_waitpid_blocking, rb_waitpid): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-10* ext/zlib/zlib.c: Added streaming support to inflate processing.drbrain
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. * test/zlib/test_zlib.rb: Updated tests git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36356 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-10rb_thread_call_without_gvlnobu
* include/ruby/thread.h: new header file for thread stuff. * thread.c (rb_thread_call_without_gvl): export. [Feature#4328] returns void* instead of VALUE. [Feature #5543] * thread.c (rb_thread_blocking_region): deprecate. [ruby-core:46295] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-10* ext/zlib/zlib.c: Revert r36349. Added streaming support to inflatedrbrain
processing. rb_block_given_p() is not callable without the GVL. * ext/zlib/extconf.rb: ditto * NEWS: ditto * test/zlib/test_zlib.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-10* ext/zlib/zlib.c: Added streaming support to inflate processing.drbrain
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
2012-07-09ext/zlib/zlib.c: initialize return valuenobu
* ext/zlib/zlib.c (zstream_run_func): initialize the return value, interrupt flag may set before starting loop. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-05* ext/zlib/zlib.c (zstream_expand_buffer_without_gvl): Usedrbrain
ruby_xrealloc() to avoid crash with CALC_EXACT_MALLOC_SIZE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-03* ext/zlib/zlib.c (zstream_run_func): Fix bug that caused early exitdrbrain
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
2012-07-03* ext/zlib/zlib.c (zstream_detach_buffer): Refactored tainting ofdrbrain
output string, moving it from the callee to zstream_detach_buffer. * ext/zlib/zlib.c (rb_zstream_finish): ditto * ext/zlib/zlib.c (rb_zstream_flush_next_out): ditto * ext/zlib/zlib.c (rb_deflate_deflate): ditto * ext/zlib/zlib.c (rb_deflate_flush): ditto * ext/zlib/zlib.c (rb_inflate_inflate): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-02* ext/zlib/zlib.c: Restored the comment explaining the choice ofdrbrain
buffer expansion size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-02* ext/zlib/zlib.c (zstream_run): Process zlib streams without GVL.drbrain
[Feature #6615] * NEWS: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-01* ext/zlib/zlib.c: cosmetic changes.ktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-23use RB_TYPE_P() instead of comparison of TYPE()nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-18* ext/openssl/extconf.rb: Use Logging::message instead of message.kosaki
* ext/zlib/extconf.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-18* ext/zlib/extconf.rb: Use an exception instaed of bare puts.kosaki
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-30* ext/zlib/extconf.rb: detect z_crc_t type which will be definedakr
since zlib-1.2.7. * ext/zlib/zlib.c (rb_zlib_crc_table): use z_crc_t if available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-10* ext/zlib/zlib.c (rb_deflate_s_deflate): Fixed ruby example replacingdrbrain
NO_FLUSH with FINISH. [ruby-trunk - Bug #6273] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-03-06Comment out unused lines.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-15* ext/zlib/zlib.c (Init_zlib): Added Zlib::TEXT and note thatdrbrain
Zlib::ASCII is deprecated in zlib 1.2.3 and newer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-15* ext/zlib/zlib.c: Move constant descriptions to constants. Removedrbrain
extra comment block at the top of Init_zlib(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-15* ext/zlib/zlib.c (Init_zlib): Added Zlib::FIXED and Zlib::RLEdrbrain
strategies. * NEWS: Add note about the new Zlib constants. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-15* ext/zlib/zlib.c: Improve documentation. [ruby-trunk - Bug #5948]drbrain
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-11* ext/zlib/zlib.c (rb_inflate_add_dictionary): Addeddrbrain
Zlib::Inflate#add_dictionary to allow users to pre-specify for using during #inflate. [ruby-trunk - Feature #5937] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-11* ext/zlib/zlib.c (do_inflate): Inflate more data if buffered datadrbrain
exists. Allows Zlib::Inflate#set_dictionary to work. [ruby-trunk - Bug #5929] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-05* ext/zlib/zlib.c (rb_gzreader_initialize): revert a part of r33937.usa
1st, to change the mode of an IO is very sensitive problem, so the maintainer of this library should judge it. 2nd, usually Zlib::GzReader.new is not called directly. #initialize is called via .open, and in the method the I/O is opened in binary mode, so there is no problem without changing the mode in #initialize. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-04Introduce NEED_READCONV and NEED_WRITECONV to replace universal newline ↵luislavena
decorator Use CRLF only when required to improve file reading and writing under Windows. Patch by Hiroshi Shirosaki. [ruby-core:40706] [Feature #5562] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-23* ext/zlib/zlib.c (gzfile_read_header): Ensure that each section ofnahi
gzip header is readable to avoid SEGV. * test/zlib/test_zlib.rb (test_corrupted_header): Test it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-09 * ext/zlib/zlib.c (gzfile_wrap): Document encoding options.drbrain
* ext/zlib/zlib.c (rb_gzwriter_s_open): ditto * ext/zlib/zlib.c (rb_gzreader_s_open): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-31 * ext/zlib/zlib.c: Fix document-method declarations for set_sync anddrbrain
set_comment. [Ruby 1.9 - Bug #4695] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-25 * ext/zlib/zlib.c: Fix Document-method declarations. Improvedrbrain
Zlib::GzipFile's method catalog. [Ruby 1.9 - Bug #4695] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31726 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-14 * ext/zlib/zlib.c: Improve documentation. Patch by Vincent Batts.drbrain
[Ruby 1.9 - Bug #4695] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-04-03* ext/zlib/zlib.c: parenthesize macro arguments.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-03* ext/zlib/zlib.c (gzfile_reader_get_unused): no need to dupnobu
before rb_str_resurrect. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-03e ext/zlib/zlib.c (gzfile_reader_get_unused): use rb_str_resurrectnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-03* ext/zlib/zlib.c (gzfile_reader_get_unused): use rb_str_new_sharednaruse
because gz->z.input is hidden string. [ruby-core:35057] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28* ext/zlib/zlib.c: parenthesize macro arguments.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-14The cast must use uint32_t. [ruby-core:34481]naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-14* ext/zlib/zlib.c (gzfile_check_footer): ISIZE (Input SIZE) innaruse
gzip's header is the size of uncompressed input data modulo 2^32. [ruby-core:34481] http://www.ietf.org/rfc/rfc1952.txt git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-01* ext/zlib/zlib.c: take care of platforms where long is biggernobu
than int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e