From: Jakub Zelenka Date: Sun, 4 Jun 2017 18:29:19 +0000 (+0100) Subject: Constify str in add_assoc_string_ex and add_assoc_stringl_ex X-Git-Tag: php-7.2.0alpha2~59 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb6614e4583343b9ae4cad13da815404c18cb943;p=php Constify str in add_assoc_string_ex and add_assoc_stringl_ex --- diff --git a/Zend/zend_API.c b/Zend/zend_API.c index b7cc405a05..fef56750a2 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -1407,7 +1407,7 @@ ZEND_API int add_assoc_str_ex(zval *arg, const char *key, size_t key_len, zend_s } /* }}} */ -ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, char *str) /* {{{ */ +ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, const char *str) /* {{{ */ { zval *ret, tmp; @@ -1417,7 +1417,7 @@ ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, cha } /* }}} */ -ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, char *str, size_t length) /* {{{ */ +ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length) /* {{{ */ { zval *ret, tmp; diff --git a/Zend/zend_API.h b/Zend/zend_API.h index c685ae9a48..fe6e1481ef 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -409,8 +409,8 @@ ZEND_API int add_assoc_bool_ex(zval *arg, const char *key, size_t key_len, int b ZEND_API int add_assoc_resource_ex(zval *arg, const char *key, size_t key_len, zend_resource *r); ZEND_API int add_assoc_double_ex(zval *arg, const char *key, size_t key_len, double d); ZEND_API int add_assoc_str_ex(zval *arg, const char *key, size_t key_len, zend_string *str); -ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, char *str); -ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, char *str, size_t length); +ZEND_API int add_assoc_string_ex(zval *arg, const char *key, size_t key_len, const char *str); +ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, size_t key_len, const char *str, size_t length); ZEND_API int add_assoc_zval_ex(zval *arg, const char *key, size_t key_len, zval *value); #define add_assoc_long(__arg, __key, __n) add_assoc_long_ex(__arg, __key, strlen(__key), __n)