Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2

This commit is contained in:
Xinchen Hui committed 2014-03-06 16:44:11 +08:00
commit bc18a22e44
2 files changed
+14 -3

No files matched your search

+6 -1
View File
@@ -188,7 +188,12 @@ ZEND_API void _zval_internal_dtor_for_ptr(zval *zvalue ZEND_FILE_LINE_DC)
ZEND_API void zval_add_ref(zval *p)
{
if (Z_REFCOUNTED_P(p)) {
Z_ADDREF_P(p);
//???: autoconversion from reverence to ordinal value
if (Z_ISREF_P(p) && Z_REFCOUNT_P(p) == 1) {
ZVAL_DUP(p, Z_REFVAL_P(p));
} else {
Z_ADDREF_P(p);
}
}
}
+8 -2
View File
@@ -97,7 +97,10 @@ PHPAPI void php_var_dump(zval *struc, int level TSRMLS_DC) /* {{{ */
}
if (Z_TYPE_P(struc) == IS_REFERENCE) {
is_ref = 1;
//??? hide references with refcount==1 (for compatibility)
if (Z_REFCOUNT_P(struc) > 1) {
is_ref = 1;
}
struc = Z_REFVAL_P(struc);
}
@@ -256,7 +259,10 @@ PHPAPI void php_debug_zval_dump(zval *struc, int level TSRMLS_DC) /* {{{ */
}
if (Z_TYPE_P(struc) == IS_REFERENCE) {
is_ref = 1;
//??? hide references with refcount==1 (for compatibility)
if (Z_REFCOUNT_P(struc) > 1) {
is_ref = 1;
}
struc = Z_REFVAL_P(struc);
}