summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bignum.c b/bignum.c
index d24e8ae702..138e336724 100644
--- a/bignum.c
+++ b/bignum.c
@@ -107,8 +107,8 @@ bigfixize(VALUE x)
long len = RBIGNUM(x)->len;
BDIGIT *ds = BDIGITS(x);
- if (len*SIZEOF_BDIGITS <= sizeof(VALUE)) {
- SIGNED_VALUE num = 0;
+ if (len*SIZEOF_BDIGITS <= sizeof(long)) {
+ long num = 0;
while (len--) {
num = BIGUP(num) + ds[len];
}
@@ -415,7 +415,7 @@ rb_cstr_to_inum(const char *str, int base, int badcheck)
}
len *= strlen(str)*sizeof(char);
- if (len <= (sizeof(VALUE)*CHAR_BIT)) {
+ if (len <= (sizeof(long)*CHAR_BIT)) {
unsigned long val = strtoul(str, &end, base);
if (str < end && *end == '_') goto bigparse;