cvs: ZendEngine2(PHP_5_3) / zend_gc.c zend_gc.h

[email protected] ("Dmitry Stogov")
Newsgroups php.zend-engine.cvs
Message-ID <cvsdmitry1205501740@cvsserver>
dmitry		Fri Mar 14 13:35:40 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /ZendEngine2	zend_gc.c zend_gc.h 
  Log:
  Removed commented code and unnecessary inline function
  
  
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_gc.c?r1=1.1.2.7&r2=1.1.2.8&diff_format=u
Index: ZendEngine2/zend_gc.c
diff -u ZendEngine2/zend_gc.c:1.1.2.7 ZendEngine2/zend_gc.c:1.1.2.8
--- ZendEngine2/zend_gc.c:1.1.2.7	Fri Mar 14 13:21:04 2008
+++ ZendEngine2/zend_gc.c	Fri Mar 14 13:35:40 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_gc.c,v 1.1.2.7 2008/03/14 13:21:04 dmitry Exp $ */
+/* $Id: zend_gc.c,v 1.1.2.8 2008/03/14 13:35:40 dmitry Exp $ */
 
 #include "zend.h"
 #include "zend_API.h"
@@ -249,7 +249,7 @@
 	}
 }
 
-ZEND_API void _gc_remove_zval_from_buffer(zval *zv)
+ZEND_API void gc_remove_zval_from_buffer(zval *zv)
 {
 	gc_root_buffer* root_buffer = GC_ADDRESS(((zval_gc_info*)zv)->u.buffered);
 	TSRMLS_FETCH();
@@ -476,9 +476,6 @@
 			}
 		} else {
 			if (Z_TYPE_P(pz) == IS_ARRAY) {
-//				if (Z_ARRVAL_P(pz) == &EG(symbol_table)) {
-//					return;
-//				}
 				zend_hash_apply(Z_ARRVAL_P(pz), (apply_func_t) children_collect_white TSRMLS_CC);
 				Z_ARRVAL_P(pz)->pDestructor = NULL;
 			}
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_gc.h?r1=1.1.2.4&r2=1.1.2.5&diff_format=u
Index: ZendEngine2/zend_gc.h
diff -u ZendEngine2/zend_gc.h:1.1.2.4 ZendEngine2/zend_gc.h:1.1.2.5
--- ZendEngine2/zend_gc.h:1.1.2.4	Fri Mar 14 13:21:04 2008
+++ ZendEngine2/zend_gc.h	Fri Mar 14 13:35:40 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: zend_gc.h,v 1.1.2.4 2008/03/14 13:21:04 dmitry Exp $ */
+/* $Id: zend_gc.h,v 1.1.2.5 2008/03/14 13:35:40 dmitry Exp $ */
 
 #ifndef ZEND_GC_H
 #define ZEND_GC_H
@@ -139,7 +139,7 @@
 ZEND_API int  gc_collect_cycles(TSRMLS_D);
 ZEND_API void gc_zval_possible_root(zval *zv TSRMLS_DC);
 ZEND_API void gc_zobj_possible_root(zval *zv TSRMLS_DC);
-ZEND_API void _gc_remove_zval_from_buffer(zval *zv);
+ZEND_API void gc_remove_zval_from_buffer(zval *zv);
 ZEND_API void gc_globals_ctor(TSRMLS_D);
 ZEND_API void gc_globals_dtor(TSRMLS_D);
 ZEND_API void gc_init(TSRMLS_D);
@@ -152,8 +152,10 @@
 #define GC_REMOVE_FROM_BUFFER(current) \
 	gc_remove_from_buffer((current) TSRMLS_CC)
 
-#define GC_REMOVE_ZVAL_FROM_BUFFER(z) \
-	gc_remove_zval_from_buffer(z)
+#define GC_REMOVE_ZVAL_FROM_BUFFER(z)					\
+	if (GC_ADDRESS(((zval_gc_info*)z)->u.buffered)) {	\
+		gc_remove_zval_from_buffer(z);					\
+	}
 
 #define GC_ZOBJ_CHECK_POSSIBLE_ROOT(zobject)									\
 	do {																		\
@@ -188,13 +190,6 @@
 	GC_BENCH_DEC(root_buf_length);
 }
 
-static zend_always_inline void gc_remove_zval_from_buffer(zval* z)
-{
-	if (GC_ADDRESS(((zval_gc_info*)z)->u.buffered)) {
-		_gc_remove_zval_from_buffer(z);
-	}
-}
-
 #define ALLOC_PERMANENT_ZVAL(z)							\
 	do {												\
 		(z) = (zval*)malloc(sizeof(zval_gc_info));		\
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.