mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-28 11:25:44 +00:00
Merge branch 'refactoring2' of github.com:zendtech/php into refactoring2
This commit is contained in:
commit
bc18a22e44
2 files changed
+14
-3
No files matched your search
@@ -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
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user