summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorTomoyuki Sahara <[email protected]>2012-09-12 13:44:40 +0900
committerTomoyuki Sahara <[email protected]>2012-09-12 14:02:58 +0900
commit32b88c72afbeb5758be57f09ebdf4820b7994c6d (patch)
tree7b0d752b7082234eaee908d964f5167ad5bb9e8f /src
parent54101eec43821a16a83db00840a9cc8034d8f3a1 (diff)
downloadmruby-32b88c72afbeb5758be57f09ebdf4820b7994c6d.tar.gz
mruby-32b88c72afbeb5758be57f09ebdf4820b7994c6d.zip
two more wrapper macros for ctype.h
we need them on the platform where 'char' is signed.
Diffstat (limited to 'src')
-rw-r--r--src/string.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/string.c b/src/string.c
index d8fe56790..7077e9dfd 100644
--- a/src/string.c
+++ b/src/string.c
@@ -866,12 +866,12 @@ mrb_str_capitalize_bang(mrb_state *mrb, mrb_value str)
if (s->len == 0 || !s->ptr) return mrb_nil_value();
p = s->ptr; pend = s->ptr + s->len;
if (ISLOWER(*p)) {
- *p = toupper(*p);
+ *p = TOUPPER(*p);
modify = 1;
}
while (++p < pend) {
if (ISUPPER(*p)) {
- *p = tolower(*p);
+ *p = TOLOWER(*p);
modify = 1;
}
}
@@ -1079,7 +1079,7 @@ mrb_str_downcase_bang(mrb_state *mrb, mrb_value str)
pend = s->ptr + s->len;
while (p < pend) {
if (ISUPPER(*p)) {
- *p = tolower(*p);
+ *p = TOLOWER(*p);
modify = 1;
}
p++;
@@ -2744,7 +2744,7 @@ mrb_str_upcase_bang(mrb_state *mrb, mrb_value str)
pend = RSTRING_END(str);
while (p < pend) {
if (ISLOWER(*p)) {
- *p = toupper(*p);
+ *p = TOUPPER(*p);
modify = 1;
}
p++;