cvs: ZendEngine2(PHP_5_3) / zend_gc.c

From: Date: Wed, 19 Mar 2008 11:46:10 +0000
Subject: cvs: ZendEngine2(PHP_5_3) / zend_gc.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-6543@lists.php.net to get a copy of this message
dmitry Wed Mar 19 11:46:10 2008 UTC Modified files: (Branch: PHP_5_3) /ZendEngine2 zend_gc.c Log: Disabled $GLOBALS' refcount modification http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_gc.c?r1=1.1.2.9&r2=1.1.2.10&diff_format=u Index: ZendEngine2/zend_gc.c diff -u ZendEngine2/zend_gc.c:1.1.2.9 ZendEngine2/zend_gc.c:1.1.2.10 --- ZendEngine2/zend_gc.c:1.1.2.9 Fri Mar 14 18:36:34 2008 +++ ZendEngine2/zend_gc.c Wed Mar 19 11:46:10 2008 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_gc.c,v 1.1.2.9 2008/03/14 18:36:34 dmitry Exp $ */ +/* $Id: zend_gc.c,v 1.1.2.10 2008/03/19 11:46:10 dmitry Exp $ */ #include "zend.h" #include "zend_API.h" @@ -305,7 +305,9 @@ static int children_scan_black(zval **pz TSRMLS_DC) { - (*pz)->refcount__gc++; + if (Z_TYPE_PP(pz) != IS_ARRAY || Z_ARRVAL_PP(pz) != &EG(symbol_table)) { + (*pz)->refcount__gc++; + } if (GC_ZVAL_GET_COLOR(*pz) != GC_BLACK) { zval_scan_black(*pz TSRMLS_CC); @@ -349,7 +351,9 @@ static int children_mark_grey(zval **pz TSRMLS_DC) { - (*pz)->refcount__gc--; + if (Z_TYPE_PP(pz) != IS_ARRAY || Z_ARRVAL_PP(pz) != &EG(symbol_table)) { + (*pz)->refcount__gc--; + } zval_mark_grey(*pz TSRMLS_CC); return 0; }

« previous php.zend-engine.cvs (#6543) next »