com php-src: Removed legacy zval_dtor() usage. It doesn't work with zvals with refcount == 0, anyway.: Zend/zend_operators.c
| From: | Dmitry Stogov | Date: | Wed, 04 Jul 2018 23:28:00 +0000 |
| Subject: | com php-src: Removed legacy zval_dtor() usage. It doesn't work with zvals with refcount == 0, anyway.: Zend/zend_operators.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-102407@lists.php.net to get a copy of this message | ||
Commit: 6c0ddcda47732f559eac270daafbef94562db6b9
Author: Dmitry Stogov <dmitry@zend.com> Thu, 5 Jul 2018 02:28:00 +0300
Parents: 5898583e94462a6808b981b06dece2316979c8c1
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6c0ddcda47732f559eac270daafbef94562db6b9
Log:
Removed legacy zval_dtor() usage. It doesn't work with zvals with refcount == 0, anyway.
Changed paths:
M Zend/zend_operators.c
Diff:
diff --git a/Zend/zend_operators..c b/Zend/zend_operators.c
index 1cf1e7f..9208a88 100644
--- a/Zend/zend_operators.c
+++ b/Zend/zend_operators.c
@@ -1933,15 +1933,10 @@ ZEND_API int ZEND_FASTCALL numeric_compare_function(zval *op1, zval *op2) /*
{{{
}
/* }}} */
-static inline void zend_free_obj_get_result(zval *op) /* {{{ */
+static zend_always_inline void zend_free_obj_get_result(zval *op) /* {{{ */
{
- if (Z_REFCOUNTED_P(op)) {
- if (Z_REFCOUNT_P(op) == 0) {
- zval_dtor(op);
- } else {
- zval_ptr_dtor(op);
- }
- }
+ ZEND_ASSERT(!Z_REFCOUNTED_P(op) || Z_REFCOUNT_P(op) != 0);
+ zval_ptr_dtor(op);
}
/* }}} */