diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-21 17:47:52 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-21 17:47:52 +0000 |
commit | fd307c3b60e3151d75b29e26acc5b1f7331eabc0 (patch) | |
tree | 3c01293cdca55984e0f55f0ee11c52650d79aa09 | |
parent | 8becb1e465ad96a4aff3ebb45a9d26972bd2c663 (diff) |
* 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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | ext/zlib/zlib.c | 6 |
2 files changed, 10 insertions, 4 deletions
@@ -1,3 +1,11 @@ +Sun May 22 02:41:52 2016 NARUSE, Yui <naruse@ruby-lang.org> + + * 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@ruby-lang.org> * configure.in (ALWAYS_INLINE): force compilers the function inlined. diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 66e68916a8..7f92eb6d19 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -52,8 +52,6 @@ max_uint(long n) #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) 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) 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; } |