diff options
author | Hartmut Holzgraefe <hholzgra@php.net> | 2010-10-14 21:33:10 +0000 |
---|---|---|
committer | Hartmut Holzgraefe <hholzgra@php.net> | 2010-10-14 21:33:10 +0000 |
commit | aaa2f1c30b3ba3da3e0030804054ee9c70e80bc7 (patch) | |
tree | 384852c9b955d1fea39e52a1a2fcf7cfd57e657f /Zend/zend_constants.c | |
parent | 738be1a0030ae67b19095391e0ee508284a5ab41 (diff) | |
download | php-git-aaa2f1c30b3ba3da3e0030804054ee9c70e80bc7.tar.gz |
marked char pointer arguments as const in lots of
places where strings pointed to are not modified
to prevent compiler warnings about discarded qualifiers ...
Diffstat (limited to 'Zend/zend_constants.c')
-rw-r--r-- | Zend/zend_constants.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Zend/zend_constants.c b/Zend/zend_constants.c index ed00b99349..04452e40dd 100644 --- a/Zend/zend_constants.c +++ b/Zend/zend_constants.c @@ -281,7 +281,7 @@ ZEND_API int zend_get_constant_ex(const char *name, uint name_len, zval *result, { zend_constant *c; int retval = 1; - char *colon; + const char *colon; zend_class_entry *ce = NULL; char *class_name; zval **ret_constant; @@ -297,7 +297,7 @@ ZEND_API int zend_get_constant_ex(const char *name, uint name_len, zval *result, colon > name && (*(colon - 1) == ':')) { int class_name_len = colon - name - 1; int const_name_len = name_len - class_name_len - 2; - char *constant_name = colon + 1; + const char *constant_name = colon + 1; char *lcname; class_name = estrndup(name, class_name_len); @@ -360,7 +360,7 @@ ZEND_API int zend_get_constant_ex(const char *name, uint name_len, zval *result, /* compound constant name */ int prefix_len = colon - name; int const_name_len = name_len - prefix_len - 1; - char *constant_name = colon + 1; + const char *constant_name = colon + 1; char *lcname; int found_const = 0; |