mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
b5490da26b
commit
aaaab31d8b
2 changed files with 10 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
Sat Jun 7 23:47:35 2008 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* ext/zlib/zlib.c (rb_deflate_initialize, Init_zlib): Fix up
|
||||
initialize_copy; [ruby-list:45016].
|
||||
|
||||
Sat Jun 7 22:15:02 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in (VENDOR_DIR): use LIBDIR instead of PREFIX as well as
|
||||
|
|
|
@ -1116,10 +1116,12 @@ rb_deflate_initialize(int argc, VALUE *argv, VALUE obj)
|
|||
static VALUE
|
||||
rb_deflate_init_copy(VALUE self, VALUE orig)
|
||||
{
|
||||
struct zstream *z1 = get_zstream(self);
|
||||
struct zstream *z2 = get_zstream(orig);
|
||||
struct zstream *z1, *z2;
|
||||
int err;
|
||||
|
||||
Data_Get_Struct(self, struct zstream, z1);
|
||||
z2 = get_zstream(orig);
|
||||
|
||||
err = deflateCopy(&z1->stream, &z2->stream);
|
||||
if (err != Z_OK) {
|
||||
raise_zlib_error(err, 0);
|
||||
|
@ -3267,7 +3269,7 @@ void Init_zlib()
|
|||
rb_define_singleton_method(cDeflate, "deflate", rb_deflate_s_deflate, -1);
|
||||
rb_define_alloc_func(cDeflate, rb_deflate_s_allocate);
|
||||
rb_define_method(cDeflate, "initialize", rb_deflate_initialize, -1);
|
||||
rb_define_method(cDeflate, "initialize_copy", rb_deflate_init_copy, 0);
|
||||
rb_define_method(cDeflate, "initialize_copy", rb_deflate_init_copy, 1);
|
||||
rb_define_method(cDeflate, "deflate", rb_deflate_deflate, -1);
|
||||
rb_define_method(cDeflate, "<<", rb_deflate_addstr, 1);
|
||||
rb_define_method(cDeflate, "flush", rb_deflate_flush, -1);
|
||||
|
|
Loading…
Reference in a new issue