Skip to content

Commit 6329248

Browse files
authored
Zend/hash: Add yet more const qualifiers (#18084)
1 parent 57efcb9 commit 6329248

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Zend/zend_hash.h

+8-8
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ ZEND_API void ZEND_FASTCALL zend_hash_internal_pointer_end_ex(const HashTable *
261261
static zend_always_inline zend_result zend_hash_has_more_elements_ex(const HashTable *ht, const HashPosition *pos) {
262262
return (zend_hash_get_current_key_type_ex(ht, pos) == HASH_KEY_NON_EXISTENT ? FAILURE : SUCCESS);
263263
}
264-
static zend_always_inline zend_result zend_hash_has_more_elements(HashTable *ht) {
264+
static zend_always_inline zend_result zend_hash_has_more_elements(const HashTable *ht) {
265265
return zend_hash_has_more_elements_ex(ht, &ht->nInternalPointer);
266266
}
267267
static zend_always_inline zend_result zend_hash_move_forward(HashTable *ht) {
@@ -554,7 +554,7 @@ static zend_always_inline zval *zend_symtable_find_ind(const HashTable *ht, zend
554554
}
555555

556556

557-
static zend_always_inline bool zend_symtable_exists(HashTable *ht, zend_string *key)
557+
static zend_always_inline bool zend_symtable_exists(const HashTable *ht, zend_string *key)
558558
{
559559
zend_ulong idx;
560560

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

568568

569-
static zend_always_inline bool zend_symtable_exists_ind(HashTable *ht, zend_string *key)
569+
static zend_always_inline bool zend_symtable_exists_ind(const HashTable *ht, zend_string *key)
570570
{
571571
zend_ulong idx;
572572

@@ -937,7 +937,7 @@ static zend_always_inline void *zend_hash_index_find_ptr(const HashTable *ht, ze
937937
}
938938
}
939939

940-
static zend_always_inline zval *zend_hash_index_find_deref(HashTable *ht, zend_ulong h)
940+
static zend_always_inline zval *zend_hash_index_find_deref(const HashTable *ht, zend_ulong h)
941941
{
942942
zval *zv = zend_hash_index_find(ht, h);
943943
if (zv) {
@@ -946,7 +946,7 @@ static zend_always_inline zval *zend_hash_index_find_deref(HashTable *ht, zend_u
946946
return zv;
947947
}
948948

949-
static zend_always_inline zval *zend_hash_find_deref(HashTable *ht, zend_string *str)
949+
static zend_always_inline zval *zend_hash_find_deref(const HashTable *ht, zend_string *str)
950950
{
951951
zval *zv = zend_hash_find(ht, str);
952952
if (zv) {
@@ -955,7 +955,7 @@ static zend_always_inline zval *zend_hash_find_deref(HashTable *ht, zend_string
955955
return zv;
956956
}
957957

958-
static zend_always_inline zval *zend_hash_str_find_deref(HashTable *ht, const char *str, size_t len)
958+
static zend_always_inline zval *zend_hash_str_find_deref(const HashTable *ht, const char *str, size_t len)
959959
{
960960
zval *zv = zend_hash_str_find(ht, str, len);
961961
if (zv) {
@@ -964,7 +964,7 @@ static zend_always_inline zval *zend_hash_str_find_deref(HashTable *ht, const ch
964964
return zv;
965965
}
966966

967-
static zend_always_inline void *zend_symtable_str_find_ptr(HashTable *ht, const char *str, size_t len)
967+
static zend_always_inline void *zend_symtable_str_find_ptr(const HashTable *ht, const char *str, size_t len)
968968
{
969969
zend_ulong idx;
970970

@@ -975,7 +975,7 @@ static zend_always_inline void *zend_symtable_str_find_ptr(HashTable *ht, const
975975
}
976976
}
977977

978-
static zend_always_inline void *zend_hash_get_current_data_ptr_ex(HashTable *ht, HashPosition *pos)
978+
static zend_always_inline void *zend_hash_get_current_data_ptr_ex(const HashTable *ht, const HashPosition *pos)
979979
{
980980
zval *zv;
981981

0 commit comments

Comments
 (0)