From 1b7465e893131c8a8b27078704223ecfb2311119 Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 20 Jun 2006 18:02:17 +0000 Subject: * eval.c, file.c, etc.: code-cleanup patch from Stefan Huehner . [ruby-core:08029] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/zlib/zlib.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'ext/zlib') diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 0be5aa9aef..c54e83eac0 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -478,7 +478,7 @@ zstream_append_buffer(struct zstream *z, const Bytef *src, int len) { if (NIL_P(z->buf)) { z->buf = rb_str_buf_new(len); - rb_str_buf_cat(z->buf, (char*)src, len); + rb_str_buf_cat(z->buf, (const char*)src, len); z->buf_filled = len; z->stream.next_out = (Bytef*)RSTRING(z->buf)->ptr; z->stream.avail_out = 0; @@ -573,11 +573,11 @@ zstream_append_input(struct zstream *z, const Bytef *src, unsigned int len) if (NIL_P(z->input)) { z->input = rb_str_buf_new(len); - rb_str_buf_cat(z->input, (char*)src, len); + rb_str_buf_cat(z->input, (const char*)src, len); RBASIC(z->input)->klass = 0; } else { - rb_str_buf_cat(z->input, (char*)src, len); + rb_str_buf_cat(z->input, (const char*)src, len); } } @@ -2995,7 +2995,8 @@ gzreader_gets(int argc, VALUE *argv, VALUE obj) struct gzfile *gz = get_gzfile(obj); volatile VALUE rs; VALUE dst; - char *rsptr, *p, *res; + const char *rsptr; + char *p, *res; long rslen, n; int rspara; -- cgit v1.2.3