summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authortwosee <twose@qq.com>2019-05-26 13:53:26 +0800
committerNikita Popov <nikita.ppv@gmail.com>2019-06-12 16:49:32 +0200
commit61f78de4860b951b8548b745f40caef3b5369528 (patch)
tree37f2ba92c4f37d630e0312cf238e94587f25c1cf /ext/reflection/php_reflection.c
parentff8002fc7c3cbf9ee01d6d68cccbbd9460314ce4 (diff)
downloadphp-git-61f78de4860b951b8548b745f40caef3b5369528.tar.gz
Constify some char* arguments or return values of ZEND_API
Closes GH-4247.
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index ee5f5d82b8..c91d1e199e 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -512,7 +512,7 @@ static void _class_string(smart_str *str, zend_class_entry *ce, zval *obj, char
/* {{{ _const_string */
static void _const_string(smart_str *str, char *name, zval *value, char *indent)
{
- char *type = zend_zval_type_name(value);
+ const char *type = zend_zval_type_name(value);
if (Z_TYPE_P(value) == IS_ARRAY) {
smart_str_append_printf(str, "%s Constant [ %s %s ] { Array }\n",
@@ -534,7 +534,7 @@ static void _const_string(smart_str *str, char *name, zval *value, char *indent)
static void _class_const_string(smart_str *str, char *name, zend_class_constant *c, char *indent)
{
char *visibility = zend_visibility_string(Z_ACCESS_FLAGS(c->value));
- char *type;
+ const char *type;
zval_update_constant_ex(&c->value, c->ce);
type = zend_zval_type_name(&c->value);
@@ -2860,7 +2860,7 @@ static zend_string *reflection_type_name(type_reference *param) {
} else if (ZEND_TYPE_IS_CE(param->type)) {
return zend_string_copy(ZEND_TYPE_CE(param->type)->name);
} else {
- char *name = zend_get_type_by_const(ZEND_TYPE_CODE(param->type));
+ const char *name = zend_get_type_by_const(ZEND_TYPE_CODE(param->type));
return zend_string_init(name, strlen(name), 0);
}
}