cvs: php4(PHP_4_2_0) / NEWS /ext/standard array.c

From: Date: Mon, 03 Jun 2002 17:57:41 +0000
Subject: cvs: php4(PHP_4_2_0) / NEWS /ext/standard array.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-12211@lists.php.net to get a copy of this message
edink Mon Jun 3 13:57:41 2002 EDT Modified files: (Branch: PHP_4_2_0) /php4 NEWS /php4/ext/standard array.c Log: MFH Index: php4/NEWS diff -u php4/NEWS:1.885.2.36 php4/NEWS:1.885.2.37 --- php4/NEWS:1.885.2.36 Sun May 26 17:22:45 2002 +++ php4/NEWS Mon Jun 3 13:57:41 2002 @@ -1,6 +1,7 @@ PHP 4 NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? 2002, Version 4.2.2 +- Fixed array_rand() on thread-safe platforms such as Windows. (Edin) - Report the right exit code after a call to exit(). (Edin) 13 May 2002, Version 4.2.1 Index: php4/ext/standard/array.c diff -u php4/ext/standard/array.c:1.157.2.1 php4/ext/standard/array.c:1.157.2.2 --- php4/ext/standard/array.c:1.157.2.1 Wed Apr 24 11:29:38 2002 +++ php4/ext/standard/array.c Mon Jun 3 13:57:41 2002 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: array.c,v 1.157.2.1 2002/04/24 15:29:38 andrei Exp $ */ +/* $Id: array.c,v 1.157.2.2 2002/06/03 17:57:41 edink Exp $ */ #include "php.h" #include "php_ini.h" @@ -2880,15 +2880,7 @@ zend_hash_internal_pointer_reset_ex(Z_ARRVAL_PP(input), &pos); while (num_req_val && (key_type = zend_hash_get_current_key_ex(Z_ARRVAL_PP(input), &string_key, &string_key_len, &num_key, 0, &pos)) != HASH_KEY_NON_EXISTANT) { -#ifdef HAVE_RANDOM - randval = random(); -#else -#ifdef HAVE_LRAND48 - randval = lrand48(); -#else - randval = rand(); -#endif -#endif + randval = php_rand(TSRMLS_C); if ((double)(randval/(PHP_RAND_MAX+1.0)) < (double)num_req_val/(double)num_avail) { /* If we are returning a single result, just do it. */

« previous php.cvs (#12211) next »