diff options
Diffstat (limited to 'src/string.c')
| -rw-r--r-- | src/string.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/string.c b/src/string.c index 63c0e4573..5eaed533a 100644 --- a/src/string.c +++ b/src/string.c @@ -1854,13 +1854,10 @@ mrb_cstr_to_inum(mrb_state *mrb, const char *str, int base, int badcheck) unsigned long n = 0; mrb_int val; -#undef ISDIGIT -#define ISDIGIT(c) ('0' <= (c) && (c) <= '9') #define conv_digit(c) \ - (!ISASCII(c) ? -1 : \ - isdigit(c) ? ((c) - '0') : \ - islower(c) ? ((c) - 'a' + 10) : \ - isupper(c) ? ((c) - 'A' + 10) : \ + (ISDIGIT(c) ? ((c) - '0') : \ + ISLOWER(c) ? ((c) - 'a' + 10) : \ + ISUPPER(c) ? ((c) - 'A' + 10) : \ -1) if (!str) { |
