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:
Zeev Suraski 1999-07-09 17:24:47 +00:00
parent db1e0bc820
commit 81d901b14d
15 changed files with 50 additions and 31 deletions

View file

@ -99,7 +99,7 @@ void init_op_array(zend_op_array *op_array, int initial_ops_size)
}
ZEND_API void destroy_zend_function(zend_function *function)
ZEND_API int destroy_zend_function(zend_function *function)
{
switch (function->type) {
case ZEND_USER_FUNCTION:
@ -109,13 +109,14 @@ ZEND_API void destroy_zend_function(zend_function *function)
/* do nothing */
break;
}
return 1;
}
ZEND_API void destroy_zend_class(zend_class_entry *ce)
ZEND_API int destroy_zend_class(zend_class_entry *ce)
{
if (--(*ce->refcount)>0) {
return;
return 1;
}
switch (ce->type) {
case ZEND_USER_CLASS:
@ -131,6 +132,7 @@ ZEND_API void destroy_zend_class(zend_class_entry *ce)
zend_hash_destroy(&ce->default_properties);
break;
}
return 1;
}