com php-src: Use ZVAL_COPY_VALUE for copying parser result to return_value: ext/json/json_parser.y
| From: | Jakub Zelenka | Date: | Thu, 01 Jan 2015 19:19:31 +0000 |
| Subject: | com php-src: Use ZVAL_COPY_VALUE for copying parser result to return_value: ext/json/json_parser.y | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-84716@lists.php.net to get a copy of this message | ||
Commit: 8e102504494d49a9218d0948dc8a7de36753ebe5
Author: Jakub Zelenka <bukka@php.net> Thu, 1 Jan 2015 19:19:31 +0000
Parents: 8c4c16d1c2cb983d7982409bf604ed1432aa96ac
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=8e102504494d49a9218d0948dc8a7de36753ebe5
Log:
Use ZVAL_COPY_VALUE for copying parser result to return_value
Changed paths:
M ext/json/json_parser.y
Diff:
diff --git a/ext/json/json_parser.y b/ext/json/json_parser.y
index 4af46ec..1de6d6c 100644
--- a/ext/json/json_parser.y
+++ b/ext/json/json_parser.y
@@ -85,7 +85,7 @@ void php_json_parser_array_append(zval *array, zval *zvalue);
%% /* Rules */
start:
- value PHP_JSON_T_EOI { $$ = $1; *parser->return_value = $1; PHP_JSON_USE($2); YYACCEPT; }
+ value PHP_JSON_T_EOI { $$ = $1; ZVAL_COPY_VALUE(parser->return_value, &$1);
PHP_JSON_USE($2); YYACCEPT; }
| value errlex { PHP_JSON_USE_2($$, $1, $2); }
;