diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-31 11:44:49 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-05-31 11:44:49 +0000 |
commit | f072d4e34a70d79a78d06616aad3658dd6b97141 (patch) | |
tree | e057c597ca1693829f73ebba7161435fc7176685 /string.c | |
parent | 0d0c31ff8414edc38417b7b172819275e03f4dc3 (diff) |
Merge from ruby_1_8.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -545,7 +545,8 @@ rb_str_associated(str) return Qfalse; } -static char *null_str = ""; +static const char null_str[] = ""; +#define null_str ((char *)null_str) VALUE rb_string_value(ptr) @@ -4480,7 +4481,7 @@ rb_str_crypt(str, salt) { extern char *crypt(); VALUE result; - char *s; + const char *s; StringValue(salt); if (RSTRING(salt)->len < 2) @@ -4607,7 +4608,8 @@ rb_str_justify(argc, argv, str, jflag) VALUE w; long width, flen = 0; VALUE res; - char *p, *pend, *f = " "; + char *p, *pend; + const char *f = " "; long n; VALUE pad; @@ -4633,7 +4635,7 @@ rb_str_justify(argc, argv, str, jflag) } } else { - char *q = f; + const char *q = f; while (p + flen <= pend) { memcpy(p,f,flen); p += flen; |