Merge branch 'PHP-8.1'

This commit is contained in:
Bob Weinand 2022-03-07 22:17:35 +01:00
commit 185a14685d
8 changed files with 482 additions and 7 deletions

View file

@ -205,6 +205,7 @@ ZEND_API bool zend_is_attribute_repeated(HashTable *attributes, zend_attribute *
static void attr_free(zval *v)
{
zend_attribute *attr = Z_PTR_P(v);
bool persistent = attr->flags & ZEND_ATTRIBUTE_PERSISTENT;
zend_string_release(attr->name);
zend_string_release(attr->lcname);
@ -213,10 +214,14 @@ static void attr_free(zval *v)
if (attr->args[i].name) {
zend_string_release(attr->args[i].name);
}
zval_ptr_dtor(&attr->args[i].value);
if (persistent) {
zval_internal_ptr_dtor(&attr->args[i].value);
} else {
zval_ptr_dtor(&attr->args[i].value);
}
}
pefree(attr, attr->flags & ZEND_ATTRIBUTE_PERSISTENT);
pefree(attr, persistent);
}
ZEND_API zend_attribute *zend_add_attribute(HashTable **attributes, zend_string *name, uint32_t argc, uint32_t flags, uint32_t offset, uint32_t lineno)