summaryrefslogtreecommitdiff
path: root/Zend/zend_variables.c
diff options
context:
space:
mode:
authorJoe Watkins <krakjoe@php.net>2016-04-30 06:49:25 +0100
committerJoe Watkins <krakjoe@php.net>2016-04-30 06:49:25 +0100
commit436b26c70bfe44aff6367d85e1a50e497e58dc05 (patch)
treeb65650934c86f1be8f9ea6ec87bc85cf693f29f4 /Zend/zend_variables.c
parent9ad40d8d36b3a481ab20f793e34d0d35148c07f5 (diff)
parent01df044fd54ee6728ef3b10dd073ca6c2750fd77 (diff)
downloadphp-git-436b26c70bfe44aff6367d85e1a50e497e58dc05.tar.gz
Merge branch 'master' of https://github.com/php/php-src
Diffstat (limited to 'Zend/zend_variables.c')
-rw-r--r--Zend/zend_variables.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/Zend/zend_variables.c b/Zend/zend_variables.c
index 6f2dd0421c..01b68c25a4 100644
--- a/Zend/zend_variables.c
+++ b/Zend/zend_variables.c
@@ -224,12 +224,8 @@ ZEND_API void ZEND_FASTCALL _zval_copy_ctor_func(zval *zvalue ZEND_FILE_LINE_DC)
CHECK_ZVAL_STRING_REL(Z_STR_P(zvalue));
Z_STR_P(zvalue) = zend_string_dup(Z_STR_P(zvalue), 0);
} else if (EXPECTED(Z_TYPE_P(zvalue) == IS_CONSTANT_AST)) {
- zend_ast_ref *ast = emalloc(sizeof(zend_ast_ref));
-
- GC_REFCOUNT(ast) = 1;
- GC_TYPE_INFO(ast) = IS_CONSTANT_AST;
- ast->ast = zend_ast_copy(Z_ASTVAL_P(zvalue));
- Z_AST_P(zvalue) = ast;
+ zend_ast *copy = zend_ast_copy(Z_ASTVAL_P(zvalue));
+ ZVAL_NEW_AST(zvalue, copy);
}
}