]> granicus.if.org Git - php/commitdiff
Some tweaks.
authorAndrei Zmievski <andrei@php.net>
Thu, 1 Jun 2000 14:18:45 +0000 (14:18 +0000)
committerAndrei Zmievski <andrei@php.net>
Thu, 1 Jun 2000 14:18:45 +0000 (14:18 +0000)
ext/standard/string.c

index 77b0a3949b8c48a64935ca6210c977c3aea61443..9b6b4e921c02c5f07c105de51a28a1551c9b7b86 100644 (file)
@@ -1138,14 +1138,14 @@ PHP_FUNCTION(ucfirst)
 PHP_FUNCTION(ucwords)
 {
        zval **str;
-       register char *r,*r_end;
+       register char *r, *r_end;
        
        if (ARG_COUNT(ht) != 1 || zend_get_parameters_ex(1, &str) == FAILURE) {
                WRONG_PARAM_COUNT;
        }
        convert_to_string_ex(str);
 
-       if (!(*str)->value.str.len) {
+       if (!Z_STRLEN_PP(str)) {
                RETURN_FALSE;
        }
        *return_value=**str;
@@ -1153,8 +1153,8 @@ PHP_FUNCTION(ucwords)
 
        r=return_value->value.str.val;
        *r=toupper((unsigned char)*r);
-       for(r_end = r + return_value->value.str.len -1 ; r < r_end ; ) {
-               if(isspace(*r)) {
+       for(r_end = r + return_value->value.str.len - 1 ; r < r_end ; ) {
+               if(isspace((int)*r)) {
                        *r=toupper((unsigned char)*++r);
                } else {
                        r++;