]> granicus.if.org Git - php/commitdiff
Constify str in add_assoc_string_ex and add_assoc_stringl_ex
authorJakub Zelenka <bukka@php.net>
Sun, 4 Jun 2017 18:29:19 +0000 (19:29 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 7 Jun 2017 21:44:23 +0000 (23:44 +0200)
Zend/zend_API.c
Zend/zend_API.h

index b7cc405a0548dcb9123436ecf97d15c1f691ec35..fef56750a21cc8f5f2cfe38691b200ab7653f966 100644 (file)
@@ -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;
 
index c685ae9a48919dfe88f6c6bd27fa9af5dd8a0617..fe6e1481eff237a04ef259766f9594eb7062ff63 100644 (file)
@@ -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)