Skip to content

Commit

Permalink
use faster ISDIGIT() assuming ASCII
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 committed Dec 26, 2011
1 parent 5ed07cb commit 5c9d858
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bignum.c
Expand Up @@ -517,6 +517,8 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
VALUE z;
BDIGIT *zds;

#undef ISDIGIT
#define ISDIGIT(c) ('0' <= (c) && (c) <= '9')
#define conv_digit(c) \
(!ISASCII(c) ? -1 : \
ISDIGIT(c) ? ((c) - '0') : \
Expand Down

0 comments on commit 5c9d858

Please sign in to comment.