summaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-09 05:53:00 (GMT)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-09 05:53:00 (GMT)
commit837392b45260785a8ccc13aceba5be90e067a974 (patch)
tree047e5d63437c4e2f439dd991d1c76ae8da98520d /random.c
parentf6757f080c9201de6fbd1d25b663c37341ef2305 (diff)
* bignum.c (rb_integer_pack): numwords_allocated argument removed.
* internal.h (rb_integer_pack): Follow the above change. * hash.c (rb_hash): Ditto. * time.c (v2w_bignum): Ditto. * pack.c (pack_pack): Ditto. * random.c (int_pair_to_real_inclusive): Ditto. (rand_init): Ditto. (random_load): Ditto. (limited_big_rand): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'random.c')
-rw-r--r--random.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/random.c b/random.c
index 6973ce3..3241874 100644
--- a/random.c
+++ b/random.c
@@ -295,7 +295,7 @@ int_pair_to_real_inclusive(uint32_t a, uint32_t b)
}
else {
uint32_t uary[4];
- rb_integer_pack(x, NULL, NULL, uary, numberof(uary), sizeof(uint32_t), 0,
+ rb_integer_pack(x, NULL, uary, numberof(uary), sizeof(uint32_t), 0,
INTEGER_PACK_MSWORD_FIRST|INTEGER_PACK_NATIVE_BYTE_ORDER);
/* r = x >> 64 */
r = (double)uary[0] * (0x10000 * (double)0x10000) + (double)uary[1];
@@ -380,7 +380,7 @@ rand_init(struct MT *mt, VALUE vseed)
len = MT_MAX_STATE;
if (len > numberof(buf0))
buf = ALLOC_N(unsigned int, len);
- rb_integer_pack(seed, &sign, NULL, buf, len, sizeof(uint32_t), 0,
+ rb_integer_pack(seed, &sign, buf, len, sizeof(uint32_t), 0,
INTEGER_PACK_LSWORD_FIRST|INTEGER_PACK_NATIVE_BYTE_ORDER);
if (sign < 0)
sign = -sign;
@@ -644,7 +644,7 @@ random_load(VALUE obj, VALUE dump)
default:
rb_raise(rb_eArgError, "wrong dump data");
}
- rb_integer_pack(state, NULL, NULL, mt->state, numberof(mt->state),
+ rb_integer_pack(state, NULL, mt->state, numberof(mt->state),
sizeof(*mt->state), 0,
INTEGER_PACK_LSWORD_FIRST|INTEGER_PACK_NATIVE_BYTE_ORDER);
x = NUM2ULONG(left);
@@ -754,7 +754,7 @@ limited_big_rand(struct MT *mt, VALUE limit)
tmp = ALLOCV_N(uint32_t, vtmp, len*2);
lim_array = tmp;
rnd_array = tmp + len;
- rb_integer_pack(limit, NULL, NULL, lim_array, len, sizeof(uint32_t), 0,
+ rb_integer_pack(limit, NULL, lim_array, len, sizeof(uint32_t), 0,
INTEGER_PACK_LSWORD_FIRST|INTEGER_PACK_NATIVE_BYTE_ORDER);
retry: