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
|
@ -767,7 +767,7 @@ ZEND_API zend_class_entry *register_internal_class(zend_class_entry *class_entry
|
|||
class_entry->refcount = (int *) malloc(sizeof(int));
|
||||
*class_entry->refcount = 1;
|
||||
zend_hash_init(&class_entry->default_properties, 0, NULL, PVAL_PTR_DTOR, 1);
|
||||
zend_hash_init(&class_entry->function_table, 0, NULL, (void (*)(void *)) destroy_zend_function, 1);
|
||||
zend_hash_init(&class_entry->function_table, 0, NULL, ZEND_FUNCTION_DTOR, 1);
|
||||
|
||||
zend_hash_update(CG(class_table), lowercase_name, class_entry->name_length+1, class_entry, sizeof(zend_class_entry), (void **) ®ister_class);
|
||||
free(lowercase_name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue