diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-24 13:27:14 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-24 13:27:14 +0000 |
commit | bc65d709ab72fc0fcdb37a6965028ba1b98940ba (patch) | |
tree | 00d4825863ad1e2f1a282cf0d881ed1ff1b11d54 | |
parent | 0224b515a8decf0359a17635830f91cd558300bd (diff) |
* 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
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | bignum.c | 6 |
2 files changed, 9 insertions, 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. @@ -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); |