Skip to content

Commit eb6614e

Browse files
bukkanikic
authored andcommitted
Constify str in add_assoc_string_ex and add_assoc_stringl_ex
1 parent 7cce220 commit eb6614e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Zend/zend_API.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,7 +1407,7 @@ ZEND_API int add_assoc_str_ex(zval *arg, const char *key, size_t key_len, zend_s
14071407
}
14081408
/* }}} */
14091409

1410-
ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, char *str) /* {{{ */
1410+
ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, const char *str) /* {{{ */
14111411
{
14121412
zval *ret, tmp;
14131413

@@ -1417,7 +1417,7 @@ ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, cha
14171417
}
14181418
/* }}} */
14191419

1420-
ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, char *str, size_t length) /* {{{ */
1420+
ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length) /* {{{ */
14211421
{
14221422
zval *ret, tmp;
14231423

Zend/zend_API.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,8 +409,8 @@ ZEND_API int add_assoc_bool_ex(zval *arg, const char *key, size_t key_len, int b
409409
ZEND_API int add_assoc_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r);
410410
ZEND_API int add_assoc_double_ex(zval *arg, const char *key, size_t key_len, double d);
411411
ZEND_API int add_assoc_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str);
412-
ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, char *str);
413-
ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, char *str, size_t length);
412+
ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, const char *str);
413+
ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length);
414414
ZEND_API int add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval *value);
415415

416416
#define add_assoc_long(__arg, __key, __n) add_assoc_long_ex(__arg, __key, strlen(__key), __n)

0 commit comments

Comments
 (0)