summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2008-07-24 20:39:48 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2008-07-24 20:39:48 +0000
commit023211d8d25f042e7676c527d19ee4e9236590c5 (patch)
tree7411ca0af1f5f375595ab8c6533509b90882c45d
parent0fbe6a0c14a7f8bc664484c33615d48a213ab662 (diff)
downloadphp-git-023211d8d25f042e7676c527d19ee4e9236590c5.tar.gz
- MFH: Constify read-only arguments
-rw-r--r--Zend/zend_operators.c8
-rw-r--r--Zend/zend_operators.h8
2 files changed, 8 insertions, 8 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index 08ea3b0df8..1eca6aa3ee 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -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;
diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h
index 658e16c71d..536d27689e 100644
--- a/Zend/zend_operators.h
+++ b/Zend/zend_operators.h
@@ -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);