mirror of
https://github.com/php/php-src.git
synced 2026-04-02 05:32:28 +02:00
Removed unused "pHashFunction" argument in _zend_hash_init() and family (must be 99% source compatible)
This commit is contained in:
@@ -1010,7 +1010,7 @@ ZEND_API int _array_init(zval *arg, uint size ZEND_FILE_LINE_DC) /* {{{ */
|
||||
{
|
||||
ALLOC_HASHTABLE_REL(Z_ARRVAL_P(arg));
|
||||
|
||||
_zend_hash_init(Z_ARRVAL_P(arg), size, NULL, ZVAL_PTR_DTOR, 0 ZEND_FILE_LINE_RELAY_CC);
|
||||
_zend_hash_init(Z_ARRVAL_P(arg), size, ZVAL_PTR_DTOR, 0 ZEND_FILE_LINE_RELAY_CC);
|
||||
Z_TYPE_P(arg) = IS_ARRAY;
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ ZEND_API ulong zend_hash_func(const char *arKey, uint nKeyLength)
|
||||
|
||||
static const Bucket *uninitialized_bucket = NULL;
|
||||
|
||||
ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC)
|
||||
ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC)
|
||||
{
|
||||
uint i = 3;
|
||||
|
||||
@@ -172,9 +172,9 @@ ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunctio
|
||||
}
|
||||
|
||||
|
||||
ZEND_API int _zend_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC)
|
||||
ZEND_API int _zend_hash_init_ex(HashTable *ht, uint nSize, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC)
|
||||
{
|
||||
int retval = _zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent ZEND_FILE_LINE_CC);
|
||||
int retval = _zend_hash_init(ht, nSize, pDestructor, persistent ZEND_FILE_LINE_CC);
|
||||
|
||||
ht->bApplyProtection = bApplyProtection;
|
||||
return retval;
|
||||
|
||||
@@ -97,12 +97,12 @@ typedef Bucket* HashPosition;
|
||||
BEGIN_EXTERN_C()
|
||||
|
||||
/* startup/shutdown */
|
||||
ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC);
|
||||
ZEND_API int _zend_hash_init_ex(HashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC);
|
||||
ZEND_API int _zend_hash_init(HashTable *ht, uint nSize, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC);
|
||||
ZEND_API int _zend_hash_init_ex(HashTable *ht, uint nSize, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC);
|
||||
ZEND_API void zend_hash_destroy(HashTable *ht);
|
||||
ZEND_API void zend_hash_clean(HashTable *ht);
|
||||
#define zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent) _zend_hash_init((ht), (nSize), (pHashFunction), (pDestructor), (persistent) ZEND_FILE_LINE_CC)
|
||||
#define zend_hash_init_ex(ht, nSize, pHashFunction, pDestructor, persistent, bApplyProtection) _zend_hash_init_ex((ht), (nSize), (pHashFunction), (pDestructor), (persistent), (bApplyProtection) ZEND_FILE_LINE_CC)
|
||||
#define zend_hash_init(ht, nSize, pHashFunction, pDestructor, persistent) _zend_hash_init((ht), (nSize), (pDestructor), (persistent) ZEND_FILE_LINE_CC)
|
||||
#define zend_hash_init_ex(ht, nSize, pHashFunction, pDestructor, persistent, bApplyProtection) _zend_hash_init_ex((ht), (nSize), (pDestructor), (persistent), (bApplyProtection) ZEND_FILE_LINE_CC)
|
||||
|
||||
/* additions/updates/changes */
|
||||
ZEND_API int _zend_hash_add_or_update(HashTable *ht, const char *arKey, uint nKeyLength, void *pData, uint nDataSize, void **pDest, int flag ZEND_FILE_LINE_DC);
|
||||
|
||||
@@ -59,24 +59,24 @@ static void end_write(TsHashTable *ht)
|
||||
}
|
||||
|
||||
/* delegates */
|
||||
ZEND_API int _zend_ts_hash_init(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC)
|
||||
ZEND_API int _zend_ts_hash_init(TsHashTable *ht, uint nSize, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC)
|
||||
{
|
||||
#ifdef ZTS
|
||||
ht->mx_reader = tsrm_mutex_alloc();
|
||||
ht->mx_writer = tsrm_mutex_alloc();
|
||||
ht->reader = 0;
|
||||
#endif
|
||||
return _zend_hash_init(TS_HASH(ht), nSize, pHashFunction, pDestructor, persistent ZEND_FILE_LINE_RELAY_CC);
|
||||
return _zend_hash_init(TS_HASH(ht), nSize, pDestructor, persistent ZEND_FILE_LINE_RELAY_CC);
|
||||
}
|
||||
|
||||
ZEND_API int _zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC)
|
||||
ZEND_API int _zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC)
|
||||
{
|
||||
#ifdef ZTS
|
||||
ht->mx_reader = tsrm_mutex_alloc();
|
||||
ht->mx_writer = tsrm_mutex_alloc();
|
||||
ht->reader = 0;
|
||||
#endif
|
||||
return _zend_hash_init_ex(TS_HASH(ht), nSize, pHashFunction, pDestructor, persistent, bApplyProtection ZEND_FILE_LINE_RELAY_CC);
|
||||
return _zend_hash_init_ex(TS_HASH(ht), nSize, pDestructor, persistent, bApplyProtection ZEND_FILE_LINE_RELAY_CC);
|
||||
}
|
||||
|
||||
ZEND_API void zend_ts_hash_destroy(TsHashTable *ht)
|
||||
|
||||
@@ -37,15 +37,15 @@ BEGIN_EXTERN_C()
|
||||
#define TS_HASH(table) (&(table->hash))
|
||||
|
||||
/* startup/shutdown */
|
||||
ZEND_API int _zend_ts_hash_init(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC);
|
||||
ZEND_API int _zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, hash_func_t pHashFunction, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC);
|
||||
ZEND_API int _zend_ts_hash_init(TsHashTable *ht, uint nSize, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC);
|
||||
ZEND_API int _zend_ts_hash_init_ex(TsHashTable *ht, uint nSize, dtor_func_t pDestructor, zend_bool persistent, zend_bool bApplyProtection ZEND_FILE_LINE_DC);
|
||||
ZEND_API void zend_ts_hash_destroy(TsHashTable *ht);
|
||||
ZEND_API void zend_ts_hash_clean(TsHashTable *ht);
|
||||
|
||||
#define zend_ts_hash_init(ht, nSize, pHashFunction, pDestructor, persistent) \
|
||||
_zend_ts_hash_init(ht, nSize, pHashFunction, pDestructor, persistent ZEND_FILE_LINE_CC)
|
||||
_zend_ts_hash_init(ht, nSize, pDestructor, persistent ZEND_FILE_LINE_CC)
|
||||
#define zend_ts_hash_init_ex(ht, nSize, pHashFunction, pDestructor, persistent, bApplyProtection) \
|
||||
_zend_ts_hash_init_ex(ht, nSize, pHashFunction, pDestructor, persistent, bApplyProtection ZEND_FILE_LINE_CC)
|
||||
_zend_ts_hash_init_ex(ht, nSize, pDestructor, persistent, bApplyProtection ZEND_FILE_LINE_CC)
|
||||
|
||||
|
||||
/* additions/updates/changes */
|
||||
|
||||
Reference in New Issue
Block a user