Refactor zval cleanup into single function

Also use zval_ptr_dtor_nogc() everywhere in Zend in favor of zval_dtor()
This commit is contained in:
Bob Weinand 2016-05-05 23:31:57 +02:00
parent 59f35c0ca9
commit bac6fdb0c5
21 changed files with 484 additions and 534 deletions

View file

@ -660,7 +660,7 @@ static void do_inherit_property(zend_property_info *parent_info, zend_string *ke
int parent_num = OBJ_PROP_TO_NUM(parent_info->offset);
int child_num = OBJ_PROP_TO_NUM(child_info->offset);
/* Don't keep default properties in GC (thry may be freed by opcache) */
/* Don't keep default properties in GC (they may be freed by opcache) */
zval_ptr_dtor_nogc(&(ce->default_properties_table[parent_num]));
ce->default_properties_table[parent_num] = ce->default_properties_table[child_num];
ZVAL_UNDEF(&ce->default_properties_table[child_num]);