com php-src: Merge branch 'PHP-7.0' into PHP-7.1: Zend/zend_t ypes.h

[email protected] (Dmitry Stogov)
Newsgroups php.cvs
Message-ID <[email protected]>
Commit:    8f7f8d3f9b551c64d029c0df7217f2b168a1201e
Author:    Dmitry Stogov <[email protected]>         Wed, 1 Feb 2017 16:05:57 +0300
Parents:   ba358c56956f9c8cb400dcdaf952fb9435caef21 15e9aa1706533cba39a165f78806400cc913e906
Branches:  PHP-7.1 master

Link:       http://git.php.net/?p=php-src.git;a=commitdiff;h=8f7f8d3f9b551c64d029c0df7217f2b168a1201e

Log:
Merge branch 'PHP-7.0' into PHP-7.1

* PHP-7.0:
  fixed macro

Changed paths:
  MM  Zend/zend_types.h


Diff:
diff --cc Zend/zend_types.h
index fbf9908,7230066..a733177
--- a/Zend/zend_types.h
+++ b/Zend/zend_types.h
@@@ -921,28 -910,12 +921,29 @@@ static zend_always_inline uint32_t zval
  		efree_size(ref, sizeof(zend_reference));		\
  	} while (0)
  
 +#define ZVAL_COPY_UNREF(z, v) do {						\
 +		zval *_z3 = (v);								\
 +		if (Z_REFCOUNTED_P(_z3)) {						\
 +			if (UNEXPECTED(Z_ISREF_P(_z3))				\
 +			 && UNEXPECTED(Z_REFCOUNT_P(_z3) == 1)) {	\
 +				ZVAL_UNREF(_z3);						\
 +				if (Z_REFCOUNTED_P(_z3)) {				\
 +					Z_ADDREF_P(_z3);					\
 +				}										\
 +			} else {									\
 +				Z_ADDREF_P(_z3);						\
 +			}											\
 +		}												\
 +		ZVAL_COPY_VALUE(z, _z3);						\
 +	} while (0)
 +
 +
  #define SEPARATE_STRING(zv) do {						\
  		zval *_zv = (zv);								\
- 		if (Z_REFCOUNTED_P(_zv) &&						\
- 		    Z_REFCOUNT_P(_zv) > 1) {					\
- 			Z_DELREF_P(_zv);							\
+ 		if (Z_REFCOUNT_P(_zv) > 1) {					\
+ 			if (Z_REFCOUNTED_P(_zv));					\
+ 				Z_DELREF_P(_zv);						\
+ 			}											\
  			zval_copy_ctor_func(_zv);					\
  		}												\
  	} while (0)
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.