]> granicus.if.org Git - php/commitdiff
- MFH: Constify read-only arguments
authorMoriyoshi Koizumi <moriyoshi@php.net>
Thu, 24 Jul 2008 20:39:48 +0000 (20:39 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Thu, 24 Jul 2008 20:39:48 +0000 (20:39 +0000)
Zend/zend_operators.c
Zend/zend_operators.h

index 08ea3b0df8356b3e2650d41d01d0ab1194831ddc..1eca6aa3ee356f7373ecbad692ef200b478af099 100644 (file)
@@ -1882,7 +1882,7 @@ ZEND_API void zend_str_tolower(char *str, unsigned int length)
        }
 }
 
-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;
 
@@ -1894,7 +1894,7 @@ 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_strncmp(const char *s1, uint len1, const char *s2, uint len2, uint length)
 {
        int retval;
 
@@ -1907,7 +1907,7 @@ ZEND_API int zend_binary_strncmp(char *s1, uint len1, char *s2, uint len2, uint
 }
 
 
-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;
@@ -1926,7 +1926,7 @@ 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_strncasecmp(const char *s1, uint len1, const char *s2, uint len2, uint length)
 {
        int len;
        int c1, c2;
index 658e16c71dcf4d6e3103201690c863c937cd6ad6..536d27689e475807dd9ea1d50259e91c13f28103 100644 (file)
@@ -305,10 +305,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 void zendi_smart_strcmp(zval *result, zval *s1, zval *s2);
 ZEND_API void zend_compare_symbol_tables(zval *result, HashTable *ht1, HashTable *ht2 TSRMLS_DC);