From 8e10e8f921101e0787c8228d257107a204de3e36 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Fri, 12 Jun 2015 12:33:23 +0300 Subject: 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) --- ext/tokenizer/tokenizer.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ext/tokenizer/tokenizer.c') 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)); -- cgit v1.2.1