com php-src: other place with 64 bit << and hash size: ext/opcache/zend_accelerator_util_funcs.c

From: Date: Sat, 28 Dec 2013 12:58:22 +0000
Subject: com php-src: other place with 64 bit << and hash size: ext/opcache/zend_accelerator_util_funcs.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-75488@lists.php.net to get a copy of this message
Commit: 4aca887f8b2a0796f91891a50c257df0f81cd17e Author: Anatol Belski <ab@php.net> Sat, 28 Dec 2013 13:58:22 +0100 Parents: 10cd3f86b70a9a0fd3b3219be1bfd8f464508ac4 Branches: str_size_and_int64 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4aca887f8b2a0796f91891a50c257df0f81cd17e Log: other place with 64 bit << and hash size Changed paths: M ext/opcache/zend_accelerator_util_funcs..c Diff: diff --git a/ext/opcache/zend_accelerator_util_funcs.c b/ext/opcache/zend_accelerator_util_funcs.c index 70d97ec..81e2648 100644 --- a/ext/opcache/zend_accelerator_util_funcs.c +++ b/ext/opcache/zend_accelerator_util_funcs.c @@ -88,8 +88,8 @@ zend_persistent_script* create_persistent_script(void) static int compact_hash_table(HashTable *ht) { - uint i = 3; - uint nSize; + zend_uint_t i = 3; + zend_uint_t nSize; Bucket **t; if (!ht->nNumOfElements) { @@ -97,14 +97,14 @@ static int compact_hash_table(HashTable *ht) return 1; } - if (ht->nNumOfElements >= 0x80000000) { + if (ht->nNumOfElements >= ZEND_INT_MAX) { /* prevent overflow */ - nSize = 0x80000000; + nSize = ZEND_INT_MAX; } else { - while ((1U << i) < ht->nNumOfElements) { + while ((Z_UI(1) << i) < ht->nNumOfElements) { i++; } - nSize = 1 << i; + nSize = Z_UI(1) << i; } if (nSize >= ht->nTableSize) { @@ -877,7 +877,7 @@ static void zend_class_copy_ctor(zend_class_entry **pce) #endif } -static int zend_hash_unique_copy(HashTable *target, HashTable *source, unique_copy_ctor_func_t pCopyConstructor, uint size, int ignore_dups, void **fail_data, void **conflict_data) +static int zend_hash_unique_copy(HashTable *target, HashTable *source, unique_copy_ctor_func_t pCopyConstructor, zend_uint_t size, int ignore_dups, void **fail_data, void **conflict_data) { Bucket *p; void *t;

« previous php.cvs (#75488) next »