ruby-changes:17404
From: naruse <ko1@a...>
Date: Mon, 4 Oct 2010 10:24:08 +0900 (JST)
Subject: [ruby-changes:17404] Ruby:r29409 (trunk): * random.c (rand_init): This checks the value is in 32bit or not,
naruse 2010-10-04 10:24:01 +0900 (Mon, 04 Oct 2010) New Revision: 29409 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29409 Log: * random.c (rand_init): This checks the value is in 32bit or not, so use int32_t, not int. Modified files: trunk/ChangeLog trunk/random.c Index: ChangeLog =================================================================== --- ChangeLog (revision 29408) +++ ChangeLog (revision 29409) @@ -1,3 +1,8 @@ +Mon Oct 4 10:22:21 2010 NARUSE, Yui <naruse@r...> + + * random.c (rand_init): This checks the value is in 32bit or not, + so use int32_t, not int. + Mon Oct 4 09:47:39 2010 NARUSE, Yui <naruse@r...> * random.c (rand_init): remove useless assignment. Index: random.c =================================================================== --- random.c (revision 29408) +++ random.c (revision 29409) @@ -403,7 +403,7 @@ fixnum_seed = -fixnum_seed; buf[0] = (unsigned int)(fixnum_seed & 0xffffffff); #if SIZEOF_LONG > SIZEOF_INT32 - if ((long)(int)fixnum_seed != fixnum_seed) { + if ((long)(int32_t)fixnum_seed != fixnum_seed) { if ((buf[1] = (unsigned int)(fixnum_seed >> 32)) != 0) ++len; } #endif -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/