summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-11-19 08:07:51 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-11-19 08:07:51 +0000
commit5315f0d66741aa8caca75d30953b35733474bf87 (patch)
tree00da6cc4c3bf018f949dfcbc5c88f8662fee1480 /bignum.c
parent710e25422b099e8ce2c13d868effaefa10366378 (diff)
* array.c (rb_ary_zip): iterates over items in the receiver.
zipped with nil if argument arrays are shorter. if arrays are longer, left items are ignored. now works with blocks. * enum.c (zip_i): changed for new behavior. * array.c (rb_ary_transpose): added. [new] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/bignum.c b/bignum.c
index 0d23189955..f3ab04ab8e 100644
--- a/bignum.c
+++ b/bignum.c
@@ -182,8 +182,6 @@ rb_int2inum(n)
#ifdef HAVE_LONG_LONG
-#define DIGSPERLONGLONG ((unsigned int)(SIZEOF_LONG_LONG/SIZEOF_BDIGITS))
-
void
rb_quad_pack(buf, val)
char *buf;
@@ -233,14 +231,14 @@ rb_quad_unpack(buf, sign)
}
i = 0;
- big = bignew(DIGSPERLONGLONG, 1);
+ big = bignew(DIGSPERLL, 1);
digits = BDIGITS(big);
- while (i < DIGSPERLONGLONG) {
+ while (i < DIGSPERLL) {
digits[i++] = BIGLO(q);
q = BIGDN(q);
}
- i = DIGSPERLONGLONG;
+ i = DIGSPERLL;
while (i-- && !digits[i]) ;
RBIGNUM(big)->len = i+1;