diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-02 20:23:47 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-06-02 20:23:47 +0000 |
commit | f2980e3e2050f21273bfc8412e83adef5f75b1f0 (patch) | |
tree | 567b8001811a2396a9746d9f2332dbeab08f158d /file.c | |
parent | b875b4a6d9fd3a025bffc77c5c265e746614ee2d (diff) | |
download | ruby-f2980e3e2050f21273bfc8412e83adef5f75b1f0.tar.gz |
encoding.h: constify rb_encoding
* include/ruby/encoding.h: constify `rb_encoding` itself, not only
arguments.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -2953,7 +2953,7 @@ skiproot(const char *path, const char *end, rb_encoding *enc) #define nextdirsep rb_enc_path_next char * -rb_enc_path_next(const char *s, const char *e, const rb_encoding *enc) +rb_enc_path_next(const char *s, const char *e, rb_encoding *enc) { while (s < e && !isdirsep(*s)) { Inc(s, e, enc); @@ -2967,7 +2967,7 @@ rb_enc_path_next(const char *s, const char *e, const rb_encoding *enc) #define skipprefix(path, end, enc) (path) #endif char * -rb_enc_path_skip_prefix(const char *path, const char *end, const rb_encoding *enc) +rb_enc_path_skip_prefix(const char *path, const char *end, rb_encoding *enc) { #if defined(DOSISH_UNC) || defined(DOSISH_DRIVE_LETTER) #ifdef DOSISH_UNC @@ -3001,7 +3001,7 @@ skipprefixroot(const char *path, const char *end, rb_encoding *enc) #define strrdirsep rb_enc_path_last_separator char * -rb_enc_path_last_separator(const char *path, const char *end, const rb_encoding *enc) +rb_enc_path_last_separator(const char *path, const char *end, rb_encoding *enc) { char *last = NULL; while (path < end) { @@ -3019,7 +3019,7 @@ rb_enc_path_last_separator(const char *path, const char *end, const rb_encoding } static char * -chompdirsep(const char *path, const char *end, const rb_encoding *enc) +chompdirsep(const char *path, const char *end, rb_encoding *enc) { while (path < end) { if (isdirsep(*path)) { @@ -3035,7 +3035,7 @@ chompdirsep(const char *path, const char *end, const rb_encoding *enc) } char * -rb_enc_path_end(const char *path, const char *end, const rb_encoding *enc) +rb_enc_path_end(const char *path, const char *end, rb_encoding *enc) { if (path < end && isdirsep(*path)) path++; return chompdirsep(path, end, enc); @@ -3043,7 +3043,7 @@ rb_enc_path_end(const char *path, const char *end, const rb_encoding *enc) #if USE_NTFS static char * -ntfs_tail(const char *path, const char *end, const rb_encoding *enc) +ntfs_tail(const char *path, const char *end, rb_encoding *enc) { while (path < end && *path == '.') path++; while (path < end && *path != ':') { @@ -3833,7 +3833,7 @@ rb_file_s_realdirpath(int argc, VALUE *argv, VALUE klass) } static size_t -rmext(const char *p, long l0, long l1, const char *e, long l2, const rb_encoding *enc) +rmext(const char *p, long l0, long l1, const char *e, long l2, rb_encoding *enc) { int len1, len2; unsigned int c; @@ -3869,7 +3869,7 @@ rmext(const char *p, long l0, long l1, const char *e, long l2, const rb_encoding } const char * -ruby_enc_find_basename(const char *name, long *baselen, long *alllen, const rb_encoding *enc) +ruby_enc_find_basename(const char *name, long *baselen, long *alllen, rb_encoding *enc) { const char *p, *q, *e, *end; #if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC @@ -4064,7 +4064,7 @@ rb_file_dirname(VALUE fname) * */ const char * -ruby_enc_find_extname(const char *name, long *len, const rb_encoding *enc) +ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc) { const char *p, *e, *end = name + (len ? *len : (long)strlen(name)); |