summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-27 06:56:46 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-27 06:56:46 +0000
commita971778b399ae42cc694a207cb0a5e3f3ae74d74 (patch)
treeba841f6cf9f28358be5706afab57cb4016ffb2a1 /bignum.c
parentdaaa605b798e969e880176bb5ac38cf52d29bd99 (diff)
* pack.c: check assuption on QUAD_SIZE and SIZEOF_LONG.
* bignum.c: check assuption on SIZEOF_LONG and SIZEOF_BDIGITS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bignum.c b/bignum.c
index 451ed5a8e0..d316a60d82 100644
--- a/bignum.c
+++ b/bignum.c
@@ -304,6 +304,10 @@ rb_int2inum(SIGNED_VALUE n)
return rb_int2big(n);
}
+#if SIZEOF_LONG % SIZEOF_BDIGITS != 0
+# error unexpected SIZEOF_LONG : SIZEOF_BDIGITS ratio
+#endif
+
void
rb_big_pack(VALUE val, unsigned long *buf, long num_longs)
{