diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-10-02 21:03:33 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-10-02 21:03:33 +0900 |
| commit | f03c23572d4dd106290af5bc17d4798ffca2d31b (patch) | |
| tree | 356e3729a9b2752800d8096a961048d7d3759f87 /src | |
| parent | c08321ef2328d4c5af6a1c82121f45ae2c4c7410 (diff) | |
| parent | e77ea4e5f2b823181020bb3a337509ba028b6dc4 (diff) | |
| download | mruby-f03c23572d4dd106290af5bc17d4798ffca2d31b.tar.gz mruby-f03c23572d4dd106290af5bc17d4798ffca2d31b.zip | |
Merge pull request #2602 from Hiroyuki-Matsuzaki/fix_cygwin_gcc_warning
fixed. cygwin-gcc(ver4.8.3) warning in conv_digit()
Diffstat (limited to 'src')
| -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) { |
