mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Step 1 in nuking the garbage collector:
- Change the hash destructor to return int - Don't kill the bucket on hash_destroy if the destructor returns 0
This commit is contained in:
parent
db1e0bc820
commit
81d901b14d
15 changed files with 50 additions and 31 deletions
|
@ -195,7 +195,7 @@ ZEND_API inline void safe_free_zval_ptr(zval *p)
|
|||
}
|
||||
|
||||
|
||||
ZEND_API void zval_ptr_dtor(zval **zval_ptr)
|
||||
ZEND_API int zval_ptr_dtor(zval **zval_ptr)
|
||||
{
|
||||
#if DEBUG_ZEND>=2
|
||||
printf("Reducing refcount for %x (%x): %d->%d\n", *zval_ptr, zval_ptr, (*zval_ptr)->refcount, (*zval_ptr)->refcount-1);
|
||||
|
@ -205,6 +205,7 @@ ZEND_API void zval_ptr_dtor(zval **zval_ptr)
|
|||
zval_dtor(*zval_ptr);
|
||||
safe_free_zval_ptr(*zval_ptr);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue