mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* bignum.c (conv_digit): use ISDIGIT, ISLOWER and ISUPPER.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1db9577184
commit
9d52fda376
2 changed files with 7 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
|||
Thu Jan 3 02:44:34 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* bignum.c (conv_digit): use ISDIGIT, ISLOWER and ISUPPER.
|
||||
|
||||
Wed Jan 2 23:50:15 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* util.c (ruby_strtoul): "0x", "+" and "-" is not a valid integer.
|
||||
|
|
6
bignum.c
6
bignum.c
|
@ -380,9 +380,9 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
|
|||
|
||||
#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) {
|
||||
|
|
Loading…
Reference in a new issue