Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zend/hash: Add yet more const qualifiers #18084

Merged
merged 1 commit into from
Mar 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Zend/zend_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_end_ex(const HashTable *
static zend_always_inline zend_result zend_hash_has_more_elements_ex(const HashTable *ht, const HashPosition *pos) {
return (zend_hash_get_current_key_type_ex(ht, pos) == HASH_KEY_NON_EXISTENT ? FAILURE : SUCCESS);
}
static zend_always_inline zend_result zend_hash_has_more_elements(HashTable *ht) {
static zend_always_inline zend_result zend_hash_has_more_elements(const HashTable *ht) {
return zend_hash_has_more_elements_ex(ht, &ht->nInternalPointer);
}
static zend_always_inline zend_result zend_hash_move_forward(HashTable *ht) {
Expand Down Expand Up @@ -554,7 +554,7 @@ static zend_always_inline zval *zend_symtable_find_ind(const HashTable *ht, zend
}


static zend_always_inline bool zend_symtable_exists(HashTable *ht, zend_string *key)
static zend_always_inline bool zend_symtable_exists(const HashTable *ht, zend_string *key)
{
zend_ulong idx;

Expand All @@ -566,7 +566,7 @@ static zend_always_inline bool zend_symtable_exists(HashTable *ht, zend_string *
}


static zend_always_inline bool zend_symtable_exists_ind(HashTable *ht, zend_string *key)
static zend_always_inline bool zend_symtable_exists_ind(const HashTable *ht, zend_string *key)
{
zend_ulong idx;

Expand Down Expand Up @@ -937,7 +937,7 @@ static zend_always_inline void *zend_hash_index_find_ptr(const HashTable *ht, ze
}
}

static zend_always_inline zval *zend_hash_index_find_deref(HashTable *ht, zend_ulong h)
static zend_always_inline zval *zend_hash_index_find_deref(const HashTable *ht, zend_ulong h)
{
zval *zv = zend_hash_index_find(ht, h);
if (zv) {
Expand All @@ -946,7 +946,7 @@ static zend_always_inline zval *zend_hash_index_find_deref(HashTable *ht, zend_u
return zv;
}

static zend_always_inline zval *zend_hash_find_deref(HashTable *ht, zend_string *str)
static zend_always_inline zval *zend_hash_find_deref(const HashTable *ht, zend_string *str)
{
zval *zv = zend_hash_find(ht, str);
if (zv) {
Expand All @@ -955,7 +955,7 @@ static zend_always_inline zval *zend_hash_find_deref(HashTable *ht, zend_string
return zv;
}

static zend_always_inline zval *zend_hash_str_find_deref(HashTable *ht, const char *str, size_t len)
static zend_always_inline zval *zend_hash_str_find_deref(const HashTable *ht, const char *str, size_t len)
{
zval *zv = zend_hash_str_find(ht, str, len);
if (zv) {
Expand All @@ -964,7 +964,7 @@ static zend_always_inline zval *zend_hash_str_find_deref(HashTable *ht, const ch
return zv;
}

static zend_always_inline void *zend_symtable_str_find_ptr(HashTable *ht, const char *str, size_t len)
static zend_always_inline void *zend_symtable_str_find_ptr(const HashTable *ht, const char *str, size_t len)
{
zend_ulong idx;

Expand All @@ -975,7 +975,7 @@ static zend_always_inline void *zend_symtable_str_find_ptr(HashTable *ht, const
}
}

static zend_always_inline void *zend_hash_get_current_data_ptr_ex(HashTable *ht, HashPosition *pos)
static zend_always_inline void *zend_hash_get_current_data_ptr_ex(const HashTable *ht, const HashPosition *pos)
{
zval *zv;

Expand Down
Loading