summaryrefslogtreecommitdiff
path: root/ext/zlib/zlib.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-20 18:02:17 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-20 18:02:17 +0000
commit1b7465e893131c8a8b27078704223ecfb2311119 (patch)
tree1ef49f987a8f65bdb2c1396bf681c4f4e2ca8b6c /ext/zlib/zlib.c
parent866e083484738db8ba8b8b37674d9292ef7cb84a (diff)
* eval.c, file.c, etc.: code-cleanup patch from Stefan Huehner
<stefan at huehner.org>. [ruby-core:08029] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10351 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r--ext/zlib/zlib.c9
1 files changed, 5 insertions, 4 deletions
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;