ruby-changes:43032
From: naruse <ko1@a...>
Date: Sun, 22 May 2016 02:48:01 +0900 (JST)
Subject: [ruby-changes:43032] naruse:r55105 (trunk): * ext/zlib/zlib.c: remove hacky macro introduced at r30437.
naruse 2016-05-22 02:47:52 +0900 (Sun, 22 May 2016) New Revision: 55105 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55105 Log: * ext/zlib/zlib.c: remove hacky macro introduced at r30437. * ext/zlib/zlib.c (gzfile_make_header): cast as long (instead of int). * ext/zlib/zlib.c (gzfile_make_footer): ditto. Modified files: trunk/ChangeLog trunk/ext/zlib/zlib.c Index: ext/zlib/zlib.c =================================================================== --- ext/zlib/zlib.c (revision 55104) +++ ext/zlib/zlib.c (revision 55105) @@ -52,8 +52,6 @@ max_uint(long n) https://github.com/ruby/ruby/blob/trunk/ext/zlib/zlib.c#L52 #define MAX_UINT(n) (uInt)(n) #endif -#define sizeof(x) ((int)sizeof(x)) - static ID id_dictionaries; /*--------- Prototypes --------*/ @@ -2523,7 +2521,7 @@ gzfile_make_header(struct gzfile *gz) https://github.com/ruby/ruby/blob/trunk/ext/zlib/zlib.c#L2521 gzfile_set32((unsigned long)gz->mtime, &buf[4]); buf[8] = extraflags; buf[9] = gz->os_code; - zstream_append_buffer(&gz->z, buf, sizeof(buf)); + zstream_append_buffer(&gz->z, buf, (long)sizeof(buf)); if (!NIL_P(gz->orig_name)) { zstream_append_buffer2(&gz->z, gz->orig_name); @@ -2544,7 +2542,7 @@ gzfile_make_footer(struct gzfile *gz) https://github.com/ruby/ruby/blob/trunk/ext/zlib/zlib.c#L2542 gzfile_set32(gz->crc, buf); gzfile_set32(gz->z.stream.total_in, &buf[4]); - zstream_append_buffer(&gz->z, buf, sizeof(buf)); + zstream_append_buffer(&gz->z, buf, (long)sizeof(buf)); gz->z.flags |= GZFILE_FLAG_FOOTER_FINISHED; } Index: ChangeLog =================================================================== --- ChangeLog (revision 55104) +++ ChangeLog (revision 55105) @@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sun May 22 02:41:52 2016 NARUSE, Yui <naruse@r...> + + * ext/zlib/zlib.c: remove hacky macro introduced at r30437. + + * ext/zlib/zlib.c (gzfile_make_header): cast as long (instead of int). + + * ext/zlib/zlib.c (gzfile_make_footer): ditto. + Sat May 21 21:07:18 2016 NARUSE, Yui <naruse@r...> * configure.in (ALWAYS_INLINE): force compilers the function inlined. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/