summaryrefslogtreecommitdiff
path: root/ext/zlib
AgeCommit message (Collapse)Author
2015-10-18* ChangeLog: Good-bye OS/2.kosaki
* common.mk: ditto. * configure.in: ditto. * dln_find.c: ditto. * ext/Setup.emx: ditto. * ext/extmk.rb: ditto. * ext/socket/extconf.rb: ditto. * ext/zlib/extconf.rb: ditto. * file.c: ditto. * include/ruby/defines.h: ditto. * io.c: ditto. * lib/mkmf.rb: ditto. * missing/os2.c: ditto. * process.c: ditto. * ruby.c: ditto. * NEWS: announce OS/2 is no longer supported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52161 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-10zlib.c: GC guardsnobu
* ext/zlib/zlib.c: prevent from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-10zlib.c: protoizenobu
* ext/zlib/zlib.c (do_checksum): protoize the definition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-11* ext/zlib/zlib.c: Fix indentation for rdoc.hsbt
[Bug #11221][ruby-core:69465] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-10* ext/zlib/zlib.c (rb_gzreader_external_encoding):glass
define GzipReader#external_encoding. [Bug #10900] * test/zlib/test_zlib.rb: test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-08* ext/zlib/zlib.c (rb_gzfile_close): Don't raise on doubleakr
close for consistent to IO#close. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-10* ext/zlib/zlib.c: fix document of method signatures.hsbt
[Bug #10668][ruby-core:67186][ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-04ext/zlib/zlib.c: TypedData conversionnormal
* ext/zlib/zlib.c (zstream_mark, zstream_free): update signature (gzfile_mark, gzfile_free): ditto (zstream_memsize): new function for rb_data_type->dsize (gzfile_memsize): ditto (zstream_data_type, gzfile_data_type): new data types (zstream_new): Data_Make_Struct => TypedData_Make_Struct (gzfile_new): ditto (get_zstream, get_gzfile): Data_Get_Struct => TypedData_Get_Struct (rb_zstream_flush_next_in): ditto (rb_zstream_flush_next_out): ditto (rb_zstream_avail_out): ditto (rb_zstream_avail_in): ditto (rb_zstream_closed_p): ditto (rb_deflate_initialize): ditto (rb_deflate_init_copy): ditto (rb_inflate_initialize): ditto (gzfile_ensure_close): ditto (rb_gzfile_closed_p): ditto (rb_gzfile_path): ditto (rb_gzwriter_initialize): ditto (rb_gzreader_initialize): ditto (rb_gzreader_unused): ditto [ruby-core:65377] [Feature #10319] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-30protoize no-arguments functionsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-17ext/zlib/zlib.c (struct gzfile): pack (288 => 272 bytes) on 64-bitnormal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-17ext/zlib/zlib.c (zlib_mem_alloc): check overflownormal
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47613 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-08-30zlib: GzipReader#rewind preserves ZSTREAM_FLAG_GZFILEnormal
* ext/zlib/zlib.c (gzfile_reset): preserve ZSTREAM_FLAG_GZFILE [Bug #10101] * test/zlib/test_zlib.rb (test_rewind): test each_byte We must preserve the ZSTREAM_FLAG_GZFILE flag to prevent zstream_detach_buffer from: a) returning Qnil and breaking out of the `each_byte' loop b) yielding a large string to each_byte Note: the test case in bug report takes a long time. I found this bug because I noticed the massive time descrepancy between `each_byte' and `readbyte' loop before this patch. With this patch, `each_byte' and `readbyte' both take very long. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-27* ext/zlib/zlib.c: [DOC] Remove default value of Zlib constants, aszzak
they may change in the implementation without notice. Patched by @robin850 [Fixes GH-682] https://github.com/ruby/ruby/pull/682 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-11* ext/socket/ifaddr.c (IS_IFADDRS): Unused macro removed.akr
* ext/strscan/strscan.c (BUFSIZE): Ditto. * ext/zlib/zlib.c (OBJ_IS_FREED): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-18zlib.c: return unshared stringnobu
* ext/zlib/zlib.c (zstream_shift_buffer): create new copied string since it cannot be shared ever. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-21class.c: do nothing if copying selfnobu
* class.c (rb_mod_init_copy): do nothing if copying self. [ruby-dev:47989] [Bug #9535] * hash.c (rb_hash_initialize_copy): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-28* ext/zlib/zlib.c (rb_zlib_adler32): [DOC] Add example for adler32zzak
Patch by Vajrasky Kok [Bug #9307] [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44723 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-12ext: use rb_sprintf() and rb_vsprintf() with PRIsVALUEnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-28* ext/zlib/zlib.c (zstream_run): Fix handling of deflate streams thatdrbrain
need a dictionary but are being decompressed by Zlib::Inflate.inflate (which has no option to set a dictionary). Now Zlib::NeedDict is raised instead of crashing. [ruby-trunk - Bug #8829] * test/zlib/test_zlib.rb (TestZlibInflate): Test for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42720 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-31zlib.c: check EOFnobu
* ext/zlib/zlib.c (gzfile_read, gzfile_read_all, gzfile_getc), (gzreader_gets): check EOF. [ruby-core:55220] [Bug #8467] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-13* include/ruby/ruby.h: constify RBasic::klass and addko1
RBASIC_CLASS(obj) macro which returns a class of `obj'. This change is a part of RGENGC branch [ruby-trunk - Feature #8339]. * object.c: add new function rb_obj_reveal(). This function reveal interal (hidden) object by rb_obj_hide(). Note that do not change class before and after hiding. Only permitted example is: klass = RBASIC_CLASS(obj); rb_obj_hide(obj); .... rb_obj_reveal(obj, klass); TODO: API design. rb_obj_reveal() should be replaced with others. TODO: modify constified variables using cast may be harmful for compiler's analysis and optimizaton. Any idea to prohibt inserting RBasic::klass directly? If rename RBasic::klass and force to use RBASIC_CLASS(obj), then all codes such as `RBASIC(obj)->klass' will be compilation error. Is it acceptable? (We have similar experience at Ruby 1.9, for example "RARRAY(ary)->ptr" to "RARRAY_PTR(ary)". * internal.h: add some macros. * RBASIC_CLEAR_CLASS(obj) clear RBasic::klass to make it internal object. * RBASIC_SET_CLASS(obj, cls) set RBasic::klass. * RBASIC_SET_CLASS_RAW(obj, cls) same as RBASIC_SET_CLASS without write barrier (planned). * RCLASS_SET_SUPER(a, b) set super class of a. * array.c, class.c, compile.c, encoding.c, enum.c, error.c, eval.c, file.c, gc.c, hash.c, io.c, iseq.c, marshal.c, object.c, parse.y, proc.c, process.c, random.c, ruby.c, sprintf.c, string.c, thread.c, transcode.c, vm.c, vm_eval.c, win32/file.c: Use above macros and functions to access RBasic::klass. * ext/coverage/coverage.c, ext/readline/readline.c, ext/socket/ancdata.c, ext/socket/init.c, * ext/zlib/zlib.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-16* ext/socket/option.c: Document synonymous methods, by windwiny [GH-277]zzak
* ext/stringio/stringio.c: ditto * ext/io/wait/wait.c: ditto * ext/gdbm/gdbm.c: ditto * ext/dl/cfunc.c: ditto * ext/zlib/zlib.c: ditto * ext/win32ole/win32ole.c: ditto * ext/dbm/dbm.c: ditto * ext/json/generator/generator.c: ditto * ext/date/date_core.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-14* ext/-test-/debug/depend: New file.akr
* ext/-test-/exception/depend: Ditto. * ext/-test-/printf/depend: Ditto. * ext/-test-/string/depend: Ditto. * ext/coverage/depend: Ditto. * ext/io/console/depend: Ditto. * ext/io/nonblock/depend: Ditto. * ext/io/wait/depend: Ditto. * ext/openssl/depend: Ditto. * ext/pathname/depend: Ditto. * ext/psych/depend: Ditto. * ext/zlib/depend: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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