ruby-changes:40733
From: kosaki <ko1@a...>
Date: Tue, 1 Dec 2015 05:30:09 +0900 (JST)
Subject: [ruby-changes:40733] kosaki:r52812 (trunk): * random.c (init_randomseed): remove "initial" argument. It never
kosaki 2015-12-01 05:29:37 +0900 (Tue, 01 Dec 2015) New Revision: 52812 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52812 Log: * random.c (init_randomseed): remove "initial" argument. It never be used from outside of this function. Modified files: trunk/ChangeLog trunk/random.c Index: ChangeLog =================================================================== --- ChangeLog (revision 52811) +++ ChangeLog (revision 52812) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Thu Oct 22 00:19:07 2015 KOSAKI Motohiro <kosaki.motohiro@g...> + + * random.c (init_randomseed): remove "initial" argument. It never + be used from outside of this function. + Thu Oct 22 00:12:33 2015 KOSAKI Motohiro <kosaki.motohiro@g...> * lib/securerandom.rb (SecureRandom::gen_random): use /dev/urandom Index: random.c =================================================================== --- random.c (revision 52811) +++ random.c (revision 52812) @@ -1453,9 +1453,11 @@ static union { https://github.com/ruby/ruby/blob/trunk/random.c#L1453 } sipseed; static VALUE -init_randomseed(struct MT *mt, uint32_t initial[DEFAULT_SEED_CNT]) +init_randomseed(struct MT *mt) { + uint32_t initial[DEFAULT_SEED_CNT]; VALUE seed; + fill_random_seed(initial); init_by_array(mt, initial, DEFAULT_SEED_CNT); seed = make_seed_value(initial); @@ -1467,9 +1469,8 @@ void https://github.com/ruby/ruby/blob/trunk/random.c#L1469 Init_RandomSeed(void) { rb_random_t *r = &default_rand; - uint32_t initial[DEFAULT_SEED_CNT]; struct MT *mt = &r->mt; - VALUE seed = init_randomseed(mt, initial); + VALUE seed = init_randomseed(mt); int i; hashseed = genrand_int32(mt); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/