dmitry Thu, 26 Aug 2010 12:21:06 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=302797
Log: Removed useless copying Changed paths: U php/php-src/trunk/ext/filter/filter.c Modified: php/php-src/trunk/ext/filter/filter.c =================================================================== --- php/php-src/trunk/ext/filter/filter.c 2010-08-26 12:20:35 UTC (rev 302796) +++ php/php-src/trunk/ext/filter/filter.c 2010-08-26 12:21:06 UTC (rev 302797) @@ -404,7 +404,6 @@ { zval new_var, raw_var; zval *array_ptr = NULL, *orig_array_ptr = NULL; - char *orig_var = NULL; int retval = 0; assert(*val != NULL); @@ -445,10 +444,6 @@ } if (array_ptr) { - /* Make a copy of the variable name, as php_register_variable_ex seems to - * modify it */ - orig_var = estrdup(var); - /* Store the RAW variable internally */ Z_STRLEN(raw_var) = val_len; Z_STRVAL(raw_var) = estrndup(*val, val_len); @@ -477,11 +472,8 @@ } if (orig_array_ptr) { - php_register_variable_ex(orig_var, &new_var, orig_array_ptr TSRMLS_CC); + php_register_variable_ex(var, &new_var, orig_array_ptr TSRMLS_CC); } - if (array_ptr) { - efree(orig_var); - } if (retval) { if (new_val_len) {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php