зеркало из https://github.com/github/ruby.git
* bignum.c (bigadd_core): Removed.
(bigadd): Use bary_add instead of bigadd_core. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42342 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
ebbaec9696
Коммит
d0741fdf1c
|
@ -1,3 +1,8 @@
|
|||
Sat Aug 3 01:20:19 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* bignum.c (bigadd_core): Removed.
|
||||
(bigadd): Use bary_add instead of bigadd_core.
|
||||
|
||||
Sat Aug 3 00:52:43 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* bignum.c (rb_big2str1): Simplify power_level calculation.
|
||||
|
|
12
bignum.c
12
bignum.c
|
@ -5357,12 +5357,6 @@ bigadd_int(VALUE x, long y)
|
|||
return bignorm(z);
|
||||
}
|
||||
|
||||
static void
|
||||
bigadd_core(BDIGIT *xds, long xn, BDIGIT *yds, long yn, BDIGIT *zds, long zn)
|
||||
{
|
||||
bary_add(zds, zn, xds, xn, yds, yn);
|
||||
}
|
||||
|
||||
static VALUE
|
||||
bigadd(VALUE x, VALUE y, int sign)
|
||||
{
|
||||
|
@ -5383,9 +5377,9 @@ bigadd(VALUE x, VALUE y, int sign)
|
|||
}
|
||||
z = bignew(len, sign);
|
||||
|
||||
bigadd_core(BDIGITS(x), RBIGNUM_LEN(x),
|
||||
BDIGITS(y), RBIGNUM_LEN(y),
|
||||
BDIGITS(z), RBIGNUM_LEN(z));
|
||||
bary_add(BDIGITS(z), RBIGNUM_LEN(z),
|
||||
BDIGITS(x), RBIGNUM_LEN(x),
|
||||
BDIGITS(y), RBIGNUM_LEN(y));
|
||||
|
||||
return z;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче