summaryrefslogtreecommitdiff
path: root/Zend/zend_operators.c
diff options
context:
space:
mode:
authorSterling Hughes <sterling@php.net>2003-05-20 20:39:58 +0000
committerSterling Hughes <sterling@php.net>2003-05-20 20:39:58 +0000
commit7c7d14a413ecff4ca2d9b72e64e6347ace2e60c9 (patch)
tree9bf5f02bf8f080115325c5662fb2f6eaac733803 /Zend/zend_operators.c
parent851bd22f821cc384573fe812625ce4bc85f2892a (diff)
downloadphp-git-7c7d14a413ecff4ca2d9b72e64e6347ace2e60c9.tar.gz
use pointer arithmetic for the normal zend_str_tolower()
Diffstat (limited to 'Zend/zend_operators.c')
-rw-r--r--Zend/zend_operators.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/Zend/zend_operators.c b/Zend/zend_operators.c
index fe20ab9c09..4df314226f 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -1596,10 +1596,12 @@ ZEND_API char *zend_str_tolower_copy(char *str, unsigned int length)
ZEND_API void zend_str_tolower(char *str, unsigned int length)
{
register char *p=str;
-
- do {
- p[length] = tolower(p[length]);
- } while (length--);
+ register char *end = str + length;
+
+ while (p < end) {
+ *p = tolower(*p);
+ p++;
+ }
}
ZEND_API int zend_binary_strcmp(char *s1, uint len1, char *s2, uint len2)