Skip to content

Commit 0ce2359

Browse files
committed
Remove dom_nnodemap dtor_obj handler
Don't see any obvious reason why this would have to happen in a dtor_obj handler. If there is a reason, we're lacking test coverage for it.
1 parent bc8aa7d commit 0ce2359

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

ext/dom/php_dom.c

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,6 @@ void dom_nnodemap_objects_free_storage(zend_object *object);
548548
static zval *dom_nodelist_read_dimension(zend_object *object, zval *offset, int type, zval *rv);
549549
static int dom_nodelist_has_dimension(zend_object *object, zval *member, int check_empty);
550550
static zend_object *dom_objects_store_clone_obj(zend_object *zobject);
551-
static void dom_nnodemap_object_dtor(zend_object *object);
552551
#ifdef LIBXML_XPATH_ENABLED
553552
void dom_xpath_objects_free_storage(zend_object *object);
554553
#endif
@@ -568,7 +567,6 @@ PHP_MINIT_FUNCTION(dom)
568567

569568
memcpy(&dom_nnodemap_object_handlers, &dom_object_handlers, sizeof(zend_object_handlers));
570569
dom_nnodemap_object_handlers.free_obj = dom_nnodemap_objects_free_storage;
571-
dom_nnodemap_object_handlers.dtor_obj = dom_nnodemap_object_dtor;
572570
dom_nnodemap_object_handlers.read_dimension = dom_nodelist_read_dimension;
573571
dom_nnodemap_object_handlers.has_dimension = dom_nodelist_has_dimension;
574572

@@ -1050,13 +1048,10 @@ zend_object *dom_xpath_objects_new(zend_class_entry *class_type)
10501048
/* }}} */
10511049
#endif
10521050

1053-
static void dom_nnodemap_object_dtor(zend_object *object) /* {{{ */
1051+
void dom_nnodemap_objects_free_storage(zend_object *object) /* {{{ */
10541052
{
1055-
dom_object *intern;
1056-
dom_nnodemap_object *objmap;
1057-
1058-
intern = php_dom_obj_from_obj(object);
1059-
objmap = (dom_nnodemap_object *)intern->ptr;
1053+
dom_object *intern = php_dom_obj_from_obj(object);
1054+
dom_nnodemap_object *objmap = (dom_nnodemap_object *)intern->ptr;
10601055

10611056
if (objmap) {
10621057
if (objmap->local) {
@@ -1071,12 +1066,6 @@ static void dom_nnodemap_object_dtor(zend_object *object) /* {{{ */
10711066
efree(objmap);
10721067
intern->ptr = NULL;
10731068
}
1074-
}
1075-
/* }}} */
1076-
1077-
void dom_nnodemap_objects_free_storage(zend_object *object) /* {{{ */
1078-
{
1079-
dom_object *intern = php_dom_obj_from_obj(object);
10801069

10811070
php_libxml_decrement_doc_ref((php_libxml_node_object *)intern);
10821071

0 commit comments

Comments
 (0)