nobu
b6371b55de
* ext/zlib/zlib.c (gzfile_reader_get_unused): no need to dup
...
before rb_str_resurrect.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-03 15:15:04 +00:00
naruse
b4940b61e3
e ext/zlib/zlib.c (gzfile_reader_get_unused): use rb_str_resurrect
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-03 09:56:52 +00:00
naruse
d6d24991bd
* ext/zlib/zlib.c (gzfile_reader_get_unused): use rb_str_new_shared
...
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-02-03 09:35:55 +00:00
akr
f6de1a3f00
* ext/zlib/zlib.c: parenthesize macro arguments.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-28 12:49:53 +00:00
naruse
a2e9ec244e
The cast must use uint32_t. [ruby-core:34481]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-14 04:54:51 +00:00
naruse
ec9a859c76
* ext/zlib/zlib.c (gzfile_check_footer): ISIZE (Input SIZE) in
...
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-14 04:51:34 +00:00
nobu
778796b008
* ext/zlib/zlib.c: take care of platforms where long is bigger
...
than int.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-01 02:10:30 +00:00
nobu
cf1cc4bd8b
* ext/zlib/zlib.c (sizeof): zlib.h mistakenly assumes the result
...
of sizeof to be int, not size_t.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-31 02:16:00 +00:00
naruse
ca96e8da24
* ext/zlib/zlib.c (Init_zlib): Add Zlib.defale and Zlib.inflate.
...
[ruby-dev:42833]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-27 01:36:19 +00:00
naruse
e755ecacf9
Update rdoc of zlib.
...
Add description about gzip(1) compatible output.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-27 01:36:16 +00:00
nobu
91c6ba2333
* ext/zlib/zlib.c (gzreader_gets): support optional length
...
parameter.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25 02:02:55 +00:00
nobu
aeb8d7f5e5
* ext/zlib/zlib.c (gzfile_read, gzfile_readpartial): length should
...
be long.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30340 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25 01:59:15 +00:00
usa
dcca25f003
* ext/zlib/zlib.c (gzfile_s_open): should close the IO if some error
...
occurs in initilizing.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30203 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-14 04:36:14 +00:00
knu
82abe79b9f
* class.c (rb_scan_args): Add support for optional keyword
...
argument hash.
* README.EXT, README.EXT.ja: Update documentation accordingly.
* dir.c (dir_initialize): Make use of the new rb_scan_args()
feature.
* io.c (rb_io_s_popen, rb_scan_open_args, rb_io_initialize)
(rb_io_s_pipe, open_key_args, io_s_foreach, io_s_readlines)
(rb_io_s_read, rb_io_set_encoding): Ditto.
* transcode.c (str_transcode, econv_args)
(econv_primitive_convert): Ditto.
* ext/zlib/zlib.c (rb_gzreader_initialize): Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-10 07:51:58 +00:00
nobu
c53664c84d
.cvsignore: have not been used already. [Bug #3468 ]
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-07 05:43:21 +00:00
nobu
062b4d6752
* include/ruby/{intern,io}.h: add missing prototypes.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-22 03:02:40 +00:00
nobu
01e1a0ac78
* ext/zlib/zlib.c (gzfile_raise): add invalid header to
...
exceptions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-07-07 02:44:04 +00:00
mame
1887f60a85
* ext/zlib/zlib.c (zstream_append_input2): add RB_GC_GUARD.
...
This caused failure when test/csv is executed with GC.stress = true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-29 17:22:46 +00:00
nobu
977267c2e0
* ext/**/*.[ch]: removed trailing spaces.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22 08:04:13 +00:00
mame
7c7a7c1205
* ext/zlib/zlib.c (rb_deflate_params): update buf_filled count because
...
deflateParams writes to out buffer. And, revert r18029 because the
flush was not needed now and emits garbage. [ruby-dev:40802]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-20 15:23:23 +00:00
takano32
f14133782b
* ext/zlib/zlib.c (zstream_expand_buffer_into): remove compare different type values warning.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-01 11:11:08 +00:00
akr
8d532a8689
* ext/zlib/zlib.c (zlib_mem_alloc): suppress valgrind warnings.
...
http://www.zlib.net/zlib_faq.html#faq36
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-02-15 13:26:51 +00:00
naruse
bddadeeae4
* ext/zlib/zlib.c (rb_gzfile_s_wrap): add rdoc. [Bug #2656 ]
...
patched by Hugh Sasse [ruby-core:27692] [ruby-core:27852]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-26 13:31:12 +00:00
naruse
0ba192d729
* ext/zlib/zlib.c (rb_gzfile_s_wrap): add rdoc.
...
patched by Hugh Sasse [ruby-core:27692]
* ext/zlib/doc/zlib.rd: removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-26 11:18:17 +00:00
usa
d842fce66e
* ext/zlib/{extconf.rb, zlib.c): crc32_combine and adler32_combine is
...
supported on Zlib 1.2.2.1, so check them for old zlib.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-19 05:14:29 +00:00
tenderlove
4395758903
* ext/zlib/zlib.c: added Zlib.crc32_combine and Zlib.adler32_combine
...
* test/zlib/test_zlib.rb: corresponding tests [ruby-core:27551]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-01-19 00:06:04 +00:00
mame
f22a307d7e
* ext/zlib/zlib.c (rb_zlib_adler32): fix typo.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-13 12:19:08 +00:00
naruse
438b8706a7
* ext/bigdecimal/bigdecimal.c (VpMidRound): remove warnings.
...
patch from Charlie Savage. [ruby-core:22869]
* ext/digest/bubblebabble/bubblebabble.c (bubblebabble_str_new): ditto.
* ext/digest/digest.c (hexencode_str_new): ditto.
* ext/iconv/iconv.c (iconv_convert): ditto.
* ext/socket/socket.c (inspect_sockaddr): ditto.
* ext/socket/raddrinfo.c (sockaddr_obj): ditto.
* ext/syck/emitter.c (syck_emitter_write): ditto.
* ext/syck/emitter.c (syck_emitter_flush): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-16 04:36:31 +00:00
naruse
80918e2ac9
* ext/zlib/zlib.c (gzfile_read_all): use gzfile_newstr;
...
set and convert its encoding. [ruby-dev:38304]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-29 16:17:26 +00:00
knu
2bb576e5ac
* ext/zlib/zlib.c (Zlib::GzipFile#path): New method.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-22 16:31:06 +00:00
nobu
2f3c15cb22
* ext/zlib/zlib.c (zstream_run): suppress a warning. a patch from
...
Charlie Savage at [ruby-core:22607].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-01 10:39:01 +00:00
usa
17bd806aea
* ext/zlib/zlib.c (zstream_run): previous change didn't resolve the
...
problem.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-28 15:26:03 +00:00
usa
f80356eb91
* ext/zlib/zlib.c (zstream_run): desperately guard the variable.
...
[ruby-core:20576]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21859 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-28 13:55:13 +00:00
nobu
388abb698c
* ext/zlib/zlib.c (Init_zlib): defines readbyte instead redefining
...
readchar.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-11-02 07:41:56 +00:00
matz
38c7a687e1
* string.c (rb_str_conv_enc_opts): new function to convert with
...
specifying ecflags and ecopts.
* ext/zlib/zlib.c (gzfile_newstr): specify ecflags and ecopts for
conversion using above function.
* ext/zlib/zlib.c (gzfile_newstr): use own rb_econv_t for dummy
encoding to handling stateful encoding (e.g. iso-2022-jp).
[ruby-dev:36857]
* ext/zlib/zlib.c (gzfile_getc): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19892 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-22 16:53:50 +00:00
matz
81525af4c9
* ext/zlib/zlib.c (rb_gzreader_ungetc): should be able to unget
...
Fixnum.
* ext/stringio/stringio.c (strio_ungetc): should convert unget
string.
* ext/stringio/stringio.c (strio_ungetbyte): new method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19883 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 22:10:49 +00:00
matz
16549e33da
* ext/stringio/stringio.c (strio_write): should convert writing
...
string to the encoding of the buffer.
* hash.c (rb_any_hash): typo fixed.
* ext/zlib/zlib.c (rb_gzwriter_write): oops, IO string conversion
need to be done by to_s.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 14:14:13 +00:00
matz
42a6550027
* ext/zlib/zlib.c (rb_gzwriter_write): conversion should be done
...
using to_str, not to_s.
* ext/zlib/zlib.c (rb_gzwriter_write): need proper conversion
according to gz encoding.
* ext/zlib/zlib.c (rb_gzreader_ungetc): convert string encoding
before unget.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 12:56:48 +00:00
matz
b6ef272d02
* ext/zlib/zlib.c: remove obsolete prototype macros.
...
* ext/zlib/zlib.c (struct gzfile): add encoding field to gzfile
structure.
* ext/zlib/zlib.c (rb_gzreader_getc): now works on characters.
* ext/zlib/zlib.c (rb_gzreader_getbyte): new method to retrieve
single byte.
* ext/zlib/zlib.c (rb_gzreader_readbyte): ditto.
* ext/zlib/zlib.c (rb_gzreader_each_byte): renamed from each_char
* ext/zlib/zlib.c (rb_gzreader_ungetc): allow unget strings.
* ext/zlib/zlib.c (rb_gzreader_ungetbyte): renamed from ungetc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-21 09:18:34 +00:00
matz
71b832dd8e
* ext/zlib/zlib.c (Init_zlib): add getbyte as an alias to getc.
...
[ruby-dev:36801]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-10-20 11:21:57 +00:00
akr
dac421a9c9
* include/ruby/intern.h (rb_file_open_str): declared.
...
* io.c (rb_file_open_str): defined.
* ext/zlib/zlib.c (gzfile_s_open): use rb_file_open_str instead of
rb_file_open.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-04 14:43:45 +00:00
mame
7a89495beb
* ext/zlib/zlib.c (rb_deflate_params): flush before deflateParams.
...
[ruby-core:17675]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-11 13:59:05 +00:00
knu
ecc1dedabb
* ext/zlib/zlib.c (rb_deflate_init_copy): Copy buffers as well.
...
[ruby-list:45018]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-08 17:35:41 +00:00
ko1
72ba13aa8e
* array.c, bignum.c, cont.c, dir.c, dln.c, encoding.c, enumerator.c,
...
enumerator.c (enumerator_allocate), eval_jump.c, file.c, hash.c,
io.c, load.c, pack.c, proc.c, random.c, re.c, ruby.c, st.c,
string.c, thread.c, thread_pthread.c, time.c, util.c, variable.c,
vm.c, gc.c:
allocated memory objects by xmalloc (ruby_xmalloc) should be
freed by xfree (ruby_xfree).
* ext/curses/curses.c, ext/dbm/dbm.c, ext/digest/digest.c,
ext/gdbm/gdbm.c, ext/json/ext/parser/parser.c,
ext/json/ext/parser/unicode.c, ext/openssl/ossl_cipher.c,
ext/openssl/ossl_hmac.c, ext/openssl/ossl_pkey_ec.c,
ext/sdbm/init.c, ext/strscan/strscan.c, ext/zlib/zlib.c:
ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-08 10:01:40 +00:00
knu
aaaab31d8b
* ext/zlib/zlib.c (rb_deflate_initialize, Init_zlib): Fix up
...
initialize_copy; [ruby-list:45016].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-07 14:57:16 +00:00
mame
c9977b82a8
* ext/zlib/zlib.c (rb_gzfile_set_mtime): fix typo.
...
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-04 14:11:06 +00:00
nobu
441be3ca06
* ext/zlib/extconf.rb: search zlib1, and regard mswin32 later than VC6
...
as WIN32. [ruby-core:16984]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-29 08:52:31 +00:00
matz
86dfbd3c47
* ext/zlib/zlib.c (gzreader_gets): may cause infinite loop.
...
[ruby-reference-manual:762]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-06 15:56:21 +00:00
knu
ffc456d0ed
* ext/dbm/dbm.c (fdbm_each_value, fdbm_each_key, fdbm_each_pair):
...
GDBM#{each,each_pair,each_key,each_value}: Return an enumerator
if no block is given.
* ext/gdbm/gdbm.c (fgdbm_each_value, fgdbm_each_key,
fgdbm_each_pair): GDBM#{each,each_pair,each_key,each_value}:
Return an enumerator if no block is given.
* ext/openssl/ossl_config.c (ossl_config_each):
OpenSSL::Config#each: Return an enumerator if no block is given.
* ext/readline/readline.c (hist_each): Readline::HISTORY#each:
Return an enumerator if no block is given.
* ext/sdbm/init.c (fsdbm_each_value, fsdbm_each_key,
fsdbm_each_pair): SDBM#{each,each_pair,each_key,each_value}:
Return an enumerator if no block is given.
* ext/stringio/stringio.c (strio_each_byte, strio_each):
StringIO#{each,each_line,each_byte}: Return an enumerator if no
block is given.
* ext/stringio/stringio.c (Init_stringio): Add #lines and #bytes,
which are aliases to #each_line and #each_byte, respectively.
* ext/win32ole/win32ole.c (fole_each): WIN32OLE#each: Return an
enumerator if no block is given.
* ext/zlib/zlib.c (rb_gzreader_each_byte, rb_gzreader_each):
Zlib::GzipReader#{each,each_line,each_byte}: Return an
enumerator if no block is given.
* ext/zlib/zlib.c (Init_zlib): Add Zlib::GzipReader#lines and
#bytes, which are aliases to #each_line and #each_byte,
respectively.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-04-21 08:48:33 +00:00
akr
3a868301ea
* ext/zlib/zlib.c (gzfile_s_open): use FilePathValue to support
...
to_path.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-06-08 07:33:59 +00:00