cvs: /php4/ext/standard string.c

From: Date: Sun, 14 Nov 1999 17:20:59 +0000
Subject: cvs: /php4/ext/standard string.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-6218@lists.php.net to get a copy of this message
thies Sun Nov 14 12:20:59 1999 EDT Modified files: /php4/ext/standard string.c Log: (PHP ucfirst,ucwords) no longer modify arg1 Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.54 php4/ext/standard/string.c:1.55 --- php4/ext/standard/string.c:1.54 Sun Nov 14 10:34:50 1999 +++ php4/ext/standard/string.c Sun Nov 14 12:20:56 1999 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.54 1999/11/14 15:34:50 thies Exp $ */ +/* $Id: string.c,v 1.55 1999/11/14 17:20:56 thies Exp $ */ /* Synced with php3 revision 1.193 1999-06-16 [ssb] */ @@ -937,8 +937,10 @@ if (!*(*arg)->value.str.val) { RETURN_FALSE; } - *(*arg)->value.str.val = toupper((unsigned char)*(*arg)->value.str.val); - RETVAL_STRING((*arg)->value.str.val,1); + + *return_value=**arg; + zval_copy_ctor(return_value); + *return_value->value.str.val = toupper((unsigned char)*return_value->value.str.val); } /* }}} */ @@ -957,8 +959,11 @@ if (!*(*arg)->value.str.val) { RETURN_FALSE; } - *(*arg)->value.str.val = toupper((unsigned char)*(*arg)->value.str.val); - r=(*arg)->value.str.val; + *return_value=**arg; + zval_copy_ctor(return_value); + *return_value->value.str.val = toupper((unsigned char)*return_value->value.str.val); + + r=return_value->value.str.val; while((r=strstr(r," "))){ if(*(r+1)){ r++; @@ -967,7 +972,6 @@ break; } } - RETVAL_STRING((*arg)->value.str.val,1); } /* }}} */

« previous php.version4 (#6218) next »