From e77ea4e5f2b823181020bb3a337509ba028b6dc4 Mon Sep 17 00:00:00 2001 From: Hiroyuki Matsuzaki Date: Thu, 2 Oct 2014 19:24:21 +0900 Subject: fixed. cygwin-gcc(ver4.8.3) warning in conv_digit() --- src/string.c | 9 +++------ 1 file 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) { -- cgit v1.2.3