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 /internal.h | |
parent | 4d6ac81117360a3b11f6a950ae1776a24bc49bcc (diff) | |
download | ruby-0056591f50502c58616f3ea5249e92a174ab86c6.tar.gz |
* 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 'internal.h')
-rw-r--r-- | internal.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/internal.h b/internal.h index 6d4f8d417e..3b091e503e 100644 --- a/internal.h +++ b/internal.h @@ -55,11 +55,15 @@ extern "C" { /* "MS" in MSWORD and MSBYTE means "most significant" */ /* "LS" in LSWORD and LSBYTE means "least significant" */ +/* For rb_integer_pack and rb_integer_unpack: */ #define INTEGER_PACK_MSWORD_FIRST 0x01 #define INTEGER_PACK_LSWORD_FIRST 0x02 #define INTEGER_PACK_MSBYTE_FIRST 0x10 #define INTEGER_PACK_LSBYTE_FIRST 0x20 #define INTEGER_PACK_NATIVE_BYTE_ORDER 0x40 +/* For rb_integer_unpack: */ +#define INTEGER_PACK_FORCE_BIGNUM 0x100 +/* Combinations: */ #define INTEGER_PACK_LITTLE_ENDIAN \ (INTEGER_PACK_LSWORD_FIRST | \ INTEGER_PACK_LSBYTE_FIRST) |