com php-src: GC cleanup: Zend/zend_gc.c
| From: | Dmitry Stogov | Date: | Wed, 19 Mar 2014 14:11:46 +0000 |
| Subject: | com php-src: GC cleanup: Zend/zend_gc.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-77591@lists.php.net to get a copy of this message | ||
Commit: cb411f024d94b92487b06db3ecbcaea3b7c07fff
Author: Dmitry Stogov <dmitry@zend.com> Wed, 19 Mar 2014 18:11:46 +0400
Parents: 120dfd1e0423eda8e5efecfc71c347783a8d9b8b
Branches: phpng
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cb411f024d94b92487b06db3ecbcaea3b7c07fff
Log:
GC cleanup
Changed paths:
M Zend/zend_gc.c
Diff:
diff --git a/Zend/zend_gc.c b/Zend/zend_gc.c
index bcca092..00e50e1 100644
--- a/Zend/zend_gc.c
+++ b/Zend/zend_gc.c
@@ -585,16 +585,10 @@ static int gc_collect_roots(TSRMLS_D)
GC_G(to_free).prev->next = &GC_G(to_free);
} else {
/* add roots into list to free */
-//???
- gc_root_buffer *p1 = GC_G(to_free).next;
- gc_root_buffer *p2 = GC_G(to_free).prev;
- gc_root_buffer *p3 = GC_G(roots).next;
- gc_root_buffer *p4 = GC_G(roots).prev;
-
- p2->next = p3;
- p3->prev = p2;
- p4->next = &GC_G(to_free);
- GC_G(to_free).prev = p4;
+ GC_G(to_free).prev->next = GC_G(roots).next;
+ GC_G(roots).next->prev = GC_G(to_free).prev;
+ GC_G(roots).prev->next = &GC_G(to_free);
+ GC_G(to_free).prev = GC_G(roots).prev;
}
GC_G(roots).next = &GC_G(roots);