summaryrefslogtreecommitdiff
path: root/Zend/zend_ast.c
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2014-09-03 15:16:32 +0200
committerNikita Popov <nikic@php.net>2014-09-03 15:18:06 +0200
commit9e753531842f524a1a147ca0244c041e59ecd117 (patch)
tree77f1dbf101b5012bb986f178cdd5379f67b84ec0 /Zend/zend_ast.c
parentc52511c30703d2921f813ccf1557bc042a7cd9d2 (diff)
downloadphp-git-9e753531842f524a1a147ca0244c041e59ecd117.tar.gz
Use zval_ptr_dtor_nogc to destroy literals
Also move the definition of zval_ptr_dtor_nogc to zend_variables.h (from zend_execute.h/.c) as it's used in a few places.
Diffstat (limited to 'Zend/zend_ast.c')
-rw-r--r--Zend/zend_ast.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/Zend/zend_ast.c b/Zend/zend_ast.c
index 2f7c9fd87d..8c9607fcff 100644
--- a/Zend/zend_ast.c
+++ b/Zend/zend_ast.c
@@ -382,16 +382,11 @@ static void zend_ast_destroy_ex(zend_ast *ast, zend_bool free) {
switch (ast->kind) {
case ZEND_AST_ZVAL:
- {
/* Destroy value without using GC: When opcache moves arrays into SHM it will
* free the zend_array structure, so references to it from outside the op array
* become invalid. GC would cause such a reference in the root buffer. */
- zval *zv = zend_ast_get_zval(ast);
- if (Z_REFCOUNTED_P(zv) && !Z_DELREF_P(zv)) {
- _zval_dtor_func_for_ptr(Z_COUNTED_P(zv) ZEND_FILE_LINE_CC);
- }
+ zval_ptr_dtor_nogc(zend_ast_get_zval(ast));
break;
- }
case ZEND_AST_FUNC_DECL:
case ZEND_AST_CLOSURE:
case ZEND_AST_METHOD: