mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* bignum.c (bigxor_int): Apply BIGLO for long in a BDIGIT expression.
(bigor_int): Ditto. (bigand_int): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0224b515a8
commit
bc65d709ab
2 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
Sun Nov 24 22:24:19 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* bignum.c (bigxor_int): Apply BIGLO for long in a BDIGIT expression.
|
||||
(bigor_int): Ditto.
|
||||
(bigand_int): Ditto.
|
||||
|
||||
Sun Nov 24 18:13:23 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* include/ruby/defines.h (SIZEOF_ACTUAL_BDIGIT): Defined.
|
||||
|
|
6
bignum.c
6
bignum.c
|
@ -6445,7 +6445,7 @@ bigand_int(VALUE x, long xn, BDIGIT hibitsx, long y)
|
|||
|
||||
#if SIZEOF_BDIGITS >= SIZEOF_LONG
|
||||
i = 1;
|
||||
zds[0] = xds[0] & y;
|
||||
zds[0] = xds[0] & BIGLO(y);
|
||||
#else
|
||||
for (i=0; i < xn; i++) {
|
||||
if (y == 0 || y == -1) break;
|
||||
|
@ -6551,7 +6551,7 @@ bigor_int(VALUE x, long xn, BDIGIT hibitsx, long y)
|
|||
|
||||
#if SIZEOF_BDIGITS >= SIZEOF_LONG
|
||||
i = 1;
|
||||
zds[0] = xds[0] | y;
|
||||
zds[0] = xds[0] | BIGLO(y);
|
||||
if (i < zn)
|
||||
goto y_is_fixed_point;
|
||||
goto finish;
|
||||
|
@ -6674,7 +6674,7 @@ bigxor_int(VALUE x, long xn, BDIGIT hibitsx, long y)
|
|||
|
||||
#if SIZEOF_BDIGITS >= SIZEOF_LONG
|
||||
i = 1;
|
||||
zds[0] = xds[0] ^ y;
|
||||
zds[0] = xds[0] ^ BIGLO(y);
|
||||
#else
|
||||
for (i = 0; i < xn; i++) {
|
||||
zds[i] = xds[i] ^ BIGLO(y);
|
||||
|
|
Loading…
Reference in a new issue