com php-src: Change GMPs default PRNG to Mersenne Twister: ext/gmp/gmp.c

From: Date: Tue, 23 Sep 2014 18:51:56 +0000
Subject: com php-src: Change GMPs default PRNG to Mersenne Twister: ext/gmp/gmp.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-82281@lists.php.net to get a copy of this message
Commit: 3d6d863ccbd10d212352462b587ae1573af4f1d1 Author: Leigh <leight@gmail.com> Tue, 23 Sep 2014 19:51:56 +0100 Parents: 1765548bce7a7a802270ad255963b307e67cc63b Branches: PHP-5.6 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3d6d863ccbd10d212352462b587ae1573af4f1d1 Log: Change GMPs default PRNG to Mersenne Twister Since we don't allow users to seed the RNG, there is no BC issue with changing the generator. Changed paths: M ext/gmp/gmp.c Diff: diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index bad610c..5e03863 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -1799,7 +1799,7 @@ ZEND_FUNCTION(gmp_random) if (!GMPG(rand_initialized)) { /* Initialize */ - gmp_randinit_lc_2exp_size(GMPG(rand_state), 32L); + gmp_randinit_mt(GMPG(rand_state)); /* Seed */ gmp_randseed_ui(GMPG(rand_state), GENERATE_SEED());

« previous php.cvs (#82281) next »