summaryrefslogtreecommitdiff
path: root/ext/tokenizer
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-06-12 12:33:23 +0300
committerDmitry Stogov <dmitry@zend.com>2015-06-12 12:33:23 +0300
commit8e10e8f921101e0787c8228d257107a204de3e36 (patch)
tree35bad438a9a49a94a7f0b1e061538e03a49e2b78 /ext/tokenizer
parent730d7b8fcad30addc80d685e046b5f05bb3d0190 (diff)
downloadphp-git-8e10e8f921101e0787c8228d257107a204de3e36.tar.gz
Avoid zval duplication in ZVAL_ZVAL() macro (it was necessary only in few places).
Switch from ZVAL_ZVAL() to simpler macros where possible (it makes sense to review remaining places)
Diffstat (limited to 'ext/tokenizer')
-rw-r--r--ext/tokenizer/tokenizer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c
index 2a4fa90ca2..63405ea6cd 100644
--- a/ext/tokenizer/tokenizer.c
+++ b/ext/tokenizer/tokenizer.c
@@ -257,9 +257,10 @@ static zend_bool tokenize_parse(zval *return_value, zend_string *source)
array_init(&token_stream);
if((success = (zendparse() == SUCCESS))) {
- ZVAL_ZVAL(return_value, &token_stream, 1, 0);
+ ZVAL_COPY_VALUE(return_value, &token_stream);
+ } else {
+ zval_ptr_dtor(&token_stream);
}
- zval_dtor(&token_stream);
zend_ast_destroy(CG(ast));
zend_arena_destroy(CG(ast_arena));