1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Remove custom free_obj handler in xmlwriter

At one point this served a purpose as it contained the cleanup code that
now lives in dtor, but now it just calls the standard handler so we can
just get rid of it.
This commit is contained in:
Niels Dossche
2025-01-05 13:04:39 +01:00
parent a3ef48c265
commit 73f52dc729

View File

@@ -66,16 +66,6 @@ static void xmlwriter_object_dtor(zend_object *object)
}
/* }}} */
/* {{{ xmlwriter_object_free_storage */
static void xmlwriter_object_free_storage(zend_object *object)
{
ze_xmlwriter_object *intern = php_xmlwriter_fetch_object(object);
zend_object_std_dtor(&intern->std);
}
/* }}} */
/* {{{ xmlwriter_object_new */
static zend_object *xmlwriter_object_new(zend_class_entry *class_type)
{
@@ -1064,7 +1054,6 @@ static PHP_MINIT_FUNCTION(xmlwriter)
memcpy(&xmlwriter_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
xmlwriter_object_handlers.offset = XtOffsetOf(ze_xmlwriter_object, std);
xmlwriter_object_handlers.dtor_obj = xmlwriter_object_dtor;
xmlwriter_object_handlers.free_obj = xmlwriter_object_free_storage;
xmlwriter_object_handlers.clone_obj = NULL;
xmlwriter_class_entry_ce = register_class_XMLWriter();
xmlwriter_class_entry_ce->create_object = xmlwriter_object_new;