summaryrefslogtreecommitdiffstats
path: root/bignum.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-26 06:23:34 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-26 06:23:34 +0000
commit244e67a822a20ee1f95be679a7dadad095613ab1 (patch)
tree96b063d6df2cc6e0690fac33ef705ee6ac83a34f /bignum.c
parent32fc6324d3ca642f4597aeecc544d08c2d28fd50 (diff)
downloadruby-244e67a822a20ee1f95be679a7dadad095613ab1.tar.gz
ruby-244e67a822a20ee1f95be679a7dadad095613ab1.tar.xz
ruby-244e67a822a20ee1f95be679a7dadad095613ab1.zip
* include/ruby/ruby.h: IL32LLP64 support.
* bignum.c (bigfixize, rb_cstr_to_inum): ditto. * insns.def (opt_plus, opt_minus, opt_mult): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 d24e8ae70..138e33672 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;