Skip to content

Commit 06e0281

Browse files
committed
ext/standard/array.c: add some const qualifiers
1 parent 63ea7e4 commit 06e0281

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

ext/standard/array.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3730,7 +3730,7 @@ PHP_FUNCTION(array_splice)
37303730

37313731
/* {{{ find_bucket_at_offset(HashTable* ht, zend_long offset)
37323732
Finds the bucket at the given valid offset */
3733-
static inline Bucket* find_bucket_at_offset(HashTable* ht, zend_long offset)
3733+
static inline Bucket* find_bucket_at_offset(const HashTable* ht, zend_long offset)
37343734
{
37353735
zend_long pos;
37363736
Bucket *bucket;
@@ -3756,7 +3756,7 @@ static inline Bucket* find_bucket_at_offset(HashTable* ht, zend_long offset)
37563756

37573757
/* {{{ find_bucket_at_offset(HashTable* ht, zend_long offset)
37583758
Finds the bucket at the given valid offset */
3759-
static inline zval* find_packed_val_at_offset(HashTable* ht, zend_long offset)
3759+
static inline zval* find_packed_val_at_offset(const HashTable* ht, zend_long offset)
37603760
{
37613761
zend_long pos;
37623762
zval *zv;
@@ -3908,7 +3908,7 @@ PHP_FUNCTION(array_slice)
39083908
}
39093909
/* }}} */
39103910

3911-
PHPAPI bool php_array_merge_recursive(HashTable *dest, HashTable *src) /* {{{ */
3911+
PHPAPI bool php_array_merge_recursive(HashTable *dest, const HashTable *src) /* {{{ */
39123912
{
39133913
zval *src_entry, *dest_entry;
39143914
zend_string *string_key;
@@ -3984,7 +3984,7 @@ PHPAPI bool php_array_merge_recursive(HashTable *dest, HashTable *src) /* {{{ */
39843984
}
39853985
/* }}} */
39863986

3987-
PHPAPI int php_array_merge(HashTable *dest, HashTable *src) /* {{{ */
3987+
PHPAPI int php_array_merge(HashTable *dest, const HashTable *src) /* {{{ */
39883988
{
39893989
zval *src_entry;
39903990
zend_string *string_key;
@@ -4019,7 +4019,7 @@ PHPAPI int php_array_merge(HashTable *dest, HashTable *src) /* {{{ */
40194019
}
40204020
/* }}} */
40214021

4022-
PHPAPI bool php_array_replace_recursive(HashTable *dest, HashTable *src) /* {{{ */
4022+
PHPAPI bool php_array_replace_recursive(HashTable *dest, const HashTable *src) /* {{{ */
40234023
{
40244024
zval *src_entry, *dest_entry, *src_zval, *dest_zval;
40254025
zend_string *string_key;
@@ -4497,7 +4497,7 @@ PHP_FUNCTION(array_count_values)
44974497
}
44984498
/* }}} */
44994499

4500-
static inline zval *array_column_fetch_prop(zval *data, zend_string *name_str, zend_long name_long, void **cache_slot, zval *rv) /* {{{ */
4500+
static inline zval *array_column_fetch_prop(const zval *data, zend_string *name_str, zend_long name_long, void **cache_slot, zval *rv) /* {{{ */
45014501
{
45024502
zval *prop = NULL;
45034503

ext/standard/php_array.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
PHP_MINIT_FUNCTION(array);
2626
PHP_MSHUTDOWN_FUNCTION(array);
2727

28-
PHPAPI int php_array_merge(HashTable *dest, HashTable *src);
29-
PHPAPI bool php_array_merge_recursive(HashTable *dest, HashTable *src);
30-
PHPAPI bool php_array_replace_recursive(HashTable *dest, HashTable *src);
28+
PHPAPI int php_array_merge(HashTable *dest, const HashTable *src);
29+
PHPAPI bool php_array_merge_recursive(HashTable *dest, const HashTable *src);
30+
PHPAPI bool php_array_replace_recursive(HashTable *dest, const HashTable *src);
3131
PHPAPI int php_multisort_compare(const void *a, const void *b);
3232
PHPAPI zend_long php_count_recursive(HashTable *ht);
3333

0 commit comments

Comments
 (0)