cvs: /php4/ext/standard string.c

From: Date: Mon, 27 Sep 1999 18:00:31 +0000
Subject: cvs: /php4/ext/standard string.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-4966@lists.php.net to get a copy of this message
sas Mon Sep 27 14:00:31 1999 EDT Modified files: /php4/ext/standard string.c Log: Make an extra copy of input parameter. Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.44 php4/ext/standard/string.c:1.45 --- php4/ext/standard/string.c:1.44 Sat Sep 25 07:55:42 1999 +++ php4/ext/standard/string.c Mon Sep 27 14:00:30 1999 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.44 1999/09/25 11:55:42 sas Exp $ */ +/* $Id: string.c,v 1.45 1999/09/27 18:00:30 sas Exp $ */ /* Synced with php3 revision 1.193 1999-06-16 [ssb] */ @@ -410,8 +410,9 @@ } convert_to_string_ex(arg); - ret = _php3_strtoupper((*arg)->value.str.val); - RETVAL_STRING(ret,1); + *return_value = **arg; + zval_copy_ctor(return_value); + _php3_strtoupper(return_value->value.str.val); } /* }}} */ @@ -441,8 +442,9 @@ } convert_to_string_ex(str); - ret = _php3_strtolower((*str)->value.str.val); - RETVAL_STRING(ret,1); + *return_value = **str; + zval_copy_ctor(return_value); + ret = _php3_strtolower(return_value->value.str.val); } /* }}} */ @@ -1214,8 +1216,8 @@ } convert_to_string_ex(str); - /* let RETVAL do the estrdup() */ - RETVAL_STRING((*str)->value.str.val,1); + *return_value = **str; + zval_copy_ctor(return_value); php_stripcslashes(return_value->value.str.val,&return_value->value.str.len); } /* }}} */ @@ -1231,8 +1233,8 @@ } convert_to_string_ex(str); - /* let RETVAL do the estrdup() */ - RETVAL_STRING((*str)->value.str.val,1); + *return_value = **str; + zval_copy_ctor(return_value); php_stripslashes(return_value->value.str.val,&return_value->value.str.len); } /* }}} */

« previous php.version4 (#4966) next »