f. GC_REFCOUNT()
g. zend_get_parameters()
h. zend_register_persistent_resource()
+ i. RAND_RANGE()
2. Build system changes
a. Unix build system changes
zend_register_persistent_resource_ex() should beused to register
persistent resources, instead of manual insertion into EG(persistent_list).
+ i. The RANGE_RANGE() macro has been removed. php_mt_rand_range() should be
+ used instead.
+
========================
2. Build system changes
========================
}
}
while (--n_left) {
- RAND_RANGE(rnd_idx, 0, n_left, PHP_RAND_MAX);
+ rnd_idx = php_mt_rand_range(0, n_left);
if (rnd_idx != n_left) {
temp = hash->arData[n_left];
hash->arData[n_left] = hash->arData[rnd_idx];
}
}
while (--n_left) {
- RAND_RANGE(rnd_idx, 0, n_left, PHP_RAND_MAX);
+ rnd_idx = php_mt_rand_range(0, n_left);
if (rnd_idx != n_left) {
temp = hash->arData[n_left];
hash->arData[n_left] = hash->arData[rnd_idx];
#define RAND_RANGE_BADSCALING(__n, __min, __max, __tmax) \
(__n) = (__min) + (zend_long) ((double) ( (double) (__max) - (__min) + 1.0) * ((__n) / ((__tmax) + 1.0)))
-#define RAND_RANGE(__n, __min, __max, __tmax) \
- (__n) = php_mt_rand_range((__min), (__max))
-
#ifdef PHP_WIN32
#define GENERATE_SEED() (((zend_long) (time(0) * GetCurrentProcessId())) ^ ((zend_long) (1000000.0 * php_combined_lcg())))
#else
n_left = n_elems;
while (--n_left) {
- rnd_idx = php_rand();
- RAND_RANGE(rnd_idx, 0, n_left, PHP_RAND_MAX);
+ rnd_idx = php_mt_rand_range(0, n_left);
if (rnd_idx != n_left) {
temp = str[n_left];
str[n_left] = str[rnd_idx];