diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-20 18:02:17 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-06-20 18:02:17 +0000 |
commit | 1b7465e893131c8a8b27078704223ecfb2311119 (patch) | |
tree | 1ef49f987a8f65bdb2c1396bf681c4f4e2ca8b6c /io.c | |
parent | 866e083484738db8ba8b8b37674d9292ef7cb84a (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 'io.c')
-rw-r--r-- | io.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1643,7 +1643,7 @@ rb_io_getline_fast(OpenFile *fptr, unsigned char delim) } static int -rscheck(char *rsptr, long rslen, VALUE rs) +rscheck(const char *rsptr, long rslen, VALUE rs) { if (RSTRING(rs)->ptr != rsptr && RSTRING(rs)->len != rslen) rb_raise(rb_eRuntimeError, "rs modified"); @@ -1667,7 +1667,7 @@ rb_io_getline(VALUE rs, VALUE io) } else { int c, newline; - char *rsptr; + const char *rsptr; long rslen; int rspara = 0; @@ -2527,7 +2527,7 @@ rb_io_binmode(VALUE io) return io; } -static char* +static const char* rb_io_flags_mode(int flags) { #ifdef O_BINARY @@ -2666,7 +2666,7 @@ rb_io_mode_modenum(const char *mode) #define MODENUM_MAX 4 -static char* +static const char* rb_io_modenum_mode(int flags) { #ifdef O_BINARY @@ -3154,7 +3154,7 @@ pipe_open(int argc, VALUE *argv, const char *mode) static VALUE rb_io_s_popen(int argc, VALUE *argv, VALUE klass) { - char *mode; + const char *mode; VALUE pname, pmode, port, tmp; if (rb_scan_args(argc, argv, "11", &pname, &pmode) == 1) { @@ -3199,7 +3199,7 @@ static VALUE rb_open_file(int argc, VALUE *argv, VALUE io) { VALUE fname, vmode, perm; - char *mode; + const char *mode; int flags, fmode; rb_scan_args(argc, argv, "12", &fname, &vmode, &perm); @@ -3514,7 +3514,7 @@ static VALUE rb_io_reopen(int argc, VALUE *argv, VALUE file) { VALUE fname, nmode; - char *mode; + const char *mode; OpenFile *fptr; rb_secure(4); |