diff options
| author | Hiroyuki Matsuzaki <[email protected]> | 2014-10-02 19:24:21 +0900 |
|---|---|---|
| committer | Hiroyuki Matsuzaki <[email protected]> | 2014-10-02 19:50:58 +0900 |
| commit | e77ea4e5f2b823181020bb3a337509ba028b6dc4 (patch) | |
| tree | c4cb5991c136854cb43e38ee51f385be896b47e0 | |
| parent | ff663075e4ed93e8609774bf9c7a46dce62fc2b6 (diff) | |
| download | mruby-e77ea4e5f2b823181020bb3a337509ba028b6dc4.tar.gz mruby-e77ea4e5f2b823181020bb3a337509ba028b6dc4.zip | |
fixed. cygwin-gcc(ver4.8.3) warning in conv_digit()
| -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) { |
