diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-08 06:00:04 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-08 06:00:04 +0000 |
commit | 0056591f50502c58616f3ea5249e92a174ab86c6 (patch) | |
tree | 59a61fc85117795830079293353fdc2967596636 /bignum.c | |
parent | 4d6ac81117360a3b11f6a950ae1776a24bc49bcc (diff) |
* internal.h (INTEGER_PACK_FORCE_BIGNUM): New flag constant.
* bignum.c (rb_integer_unpack): Support INTEGER_PACK_FORCE_BIGNUM.
* random.c (int_pair_to_real_inclusive): Use
INTEGER_PACK_FORCE_BIGNUM to use rb_big_mul instead of rb_funcall.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r-- | bignum.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -932,6 +932,8 @@ rb_integer_unpack(int sign, const void *words, size_t numwords, size_t wordsize, while (dp < de) *dp++ = 0; + if (flags & INTEGER_PACK_FORCE_BIGNUM) + return bigtrunc(result); return bignorm(result); #undef PUSH_BITS } |