* bignum.c: Add static assertions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b9d2960337
commit
1a42f3683f
@ -1,3 +1,7 @@
|
||||
Mon Jul 15 13:46:26 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* bignum.c: Add static assertions.
|
||||
|
||||
Mon Jul 15 13:36:02 2013 Masaki Matsushita <glass.saga@gmail.com>
|
||||
|
||||
* hash.c (rb_hash_each_pair): performance improvement by using
|
||||
|
6
bignum.c
6
bignum.c
@ -45,6 +45,12 @@ static VALUE big_three = Qnil;
|
||||
#endif
|
||||
|
||||
STATIC_ASSERT(sizeof_bdigit_dbl, sizeof(BDIGIT_DBL) == SIZEOF_BDIGIT_DBL);
|
||||
STATIC_ASSERT(sizeof_bdigit_dbl_signed, sizeof(BDIGIT_DBL_SIGNED) == SIZEOF_BDIGIT_DBL);
|
||||
STATIC_ASSERT(sizeof_bdigit, SIZEOF_BDIGITS <= sizeof(BDIGIT));
|
||||
STATIC_ASSERT(sizeof_bdigit_and_dbl, SIZEOF_BDIGITS*2 <= SIZEOF_BDIGIT_DBL);
|
||||
STATIC_ASSERT(bdigit_signedness, 0 < (BDIGIT)-1);
|
||||
STATIC_ASSERT(bdigit_dbl_signedness, 0 < (BDIGIT_DBL)-1);
|
||||
STATIC_ASSERT(bdigit_dbl_signed_signedness, 0 > (BDIGIT_DBL_SIGNED)-1);
|
||||
STATIC_ASSERT(rbignum_embed_len_max, RBIGNUM_EMBED_LEN_MAX <= (RBIGNUM_EMBED_LEN_MASK >> RBIGNUM_EMBED_LEN_SHIFT));
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
|
Loading…
x
Reference in New Issue
Block a user