From: Moriyoshi Koizumi Date: Thu, 24 Jul 2008 20:38:43 +0000 (+0000) Subject: * Constify read-only arguments. X-Git-Tag: BEFORE_HEAD_NS_CHANGE~1069 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eaeb1f7ee3705c4c5ec1d3bf3a9d95ebfe8cd550;p=php * Constify read-only arguments. --- diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c index f2d1562ee8..c40549a83b 100644 --- a/Zend/zend_operators.c +++ b/Zend/zend_operators.c @@ -2750,7 +2750,7 @@ ZEND_API zstr zend_u_str_case_fold(zend_uchar type, zstr source, unsigned int le } /* }}} */ -ZEND_API int zend_binary_strcmp(char *s1, uint len1, char *s2, uint len2) /* {{{ */ +ZEND_API int zend_binary_strcmp(const char *s1, uint len1, const char *s2, uint len2) /* {{{ */ { int retval; @@ -2770,7 +2770,7 @@ ZEND_API int zend_u_binary_strcmp(UChar *s1, int len1, UChar *s2, int len2) /* { } /* }}} */ -ZEND_API int zend_binary_strncmp(char *s1, uint len1, char *s2, uint len2, uint length) /* {{{ */ +ZEND_API int zend_binary_strncmp(const char *s1, uint len1, const char *s2, uint len2, uint length) /* {{{ */ { int retval; @@ -2806,7 +2806,7 @@ ZEND_API int zend_u_binary_strncmp(UChar *s1, int len1, UChar *s2, int len2, uin } /* }}} */ -ZEND_API int zend_binary_strcasecmp(char *s1, uint len1, char *s2, uint len2) /* {{{ */ +ZEND_API int zend_binary_strcasecmp(const char *s1, uint len1, const char *s2, uint len2) /* {{{ */ { int len; int c1, c2; @@ -2833,7 +2833,7 @@ ZEND_API int zend_u_binary_strcasecmp(UChar *s1, int len1, UChar *s2, int len2) } /* }}} */ -ZEND_API int zend_binary_strncasecmp(char *s1, uint len1, char *s2, uint len2, uint length) /* {{{ */ +ZEND_API int zend_binary_strncasecmp(const char *s1, uint len1, const char *s2, uint len2, uint length) /* {{{ */ { int len; int c1, c2; diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 40ea6ea532..d23e0f342c 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -322,10 +322,10 @@ ZEND_API int zend_binary_zval_strcmp(zval *s1, zval *s2); ZEND_API int zend_binary_zval_strncmp(zval *s1, zval *s2, zval *s3); ZEND_API int zend_binary_zval_strcasecmp(zval *s1, zval *s2); ZEND_API int zend_binary_zval_strncasecmp(zval *s1, zval *s2, zval *s3); -ZEND_API int zend_binary_strcmp(char *s1, uint len1, char *s2, uint len2); -ZEND_API int zend_binary_strncmp(char *s1, uint len1, char *s2, uint len2, uint length); -ZEND_API int zend_binary_strcasecmp(char *s1, uint len1, char *s2, uint len2); -ZEND_API int zend_binary_strncasecmp(char *s1, uint len1, char *s2, uint len2, uint length); +ZEND_API int zend_binary_strcmp(const char *s1, uint len1, const char *s2, uint len2); +ZEND_API int zend_binary_strncmp(const char *s1, uint len1, const char *s2, uint len2, uint length); +ZEND_API int zend_binary_strcasecmp(const char *s1, uint len1, const char *s2, uint len2); +ZEND_API int zend_binary_strncasecmp(const char *s1, uint len1, const char *s2, uint len2, uint length); ZEND_API int zend_u_binary_zval_strcmp(zval *s1, zval *s2); ZEND_API int zend_u_binary_strcmp(UChar *s1, int len1, UChar *s2, int len2);