Skip to content

Commit 9d2a466

Browse files
committed
Remove explicit assignments of zend_objects_destroy_object
This is the default handler, no need to set it explicitly. This makes it easier to see which objects really have a custom dtor_obj.
1 parent 9c18138 commit 9d2a466

File tree

9 files changed

+0
-10
lines changed

9 files changed

+0
-10
lines changed

ext/intl/common/common_enum.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,6 @@ U_CFUNC void intl_register_IntlIterator_class(void)
295295
sizeof IntlIterator_handlers);
296296
IntlIterator_handlers.offset = XtOffsetOf(IntlIterator_object, zo);
297297
IntlIterator_handlers.clone_obj = NULL;
298-
IntlIterator_handlers.dtor_obj = zend_objects_destroy_object;
299298
IntlIterator_handlers.free_obj = IntlIterator_objects_free;
300299

301300
}

ext/pdo/pdo_dbh.c

-1
Original file line numberDiff line numberDiff line change
@@ -1331,7 +1331,6 @@ void pdo_dbh_init(void)
13311331

13321332
memcpy(&pdo_dbh_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
13331333
pdo_dbh_object_handlers.offset = XtOffsetOf(pdo_dbh_object_t, std);
1334-
pdo_dbh_object_handlers.dtor_obj = zend_objects_destroy_object;
13351334
pdo_dbh_object_handlers.free_obj = pdo_dbh_free_storage;
13361335
pdo_dbh_object_handlers.clone_obj = NULL;
13371336
pdo_dbh_object_handlers.get_method = dbh_method_get;

ext/pdo/pdo_stmt.c

-1
Original file line numberDiff line numberDiff line change
@@ -2501,7 +2501,6 @@ void pdo_stmt_init(void)
25012501

25022502
memcpy(&pdo_dbstmt_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
25032503
pdo_dbstmt_object_handlers.offset = XtOffsetOf(pdo_stmt_t, std);
2504-
pdo_dbstmt_object_handlers.dtor_obj = zend_objects_destroy_object;
25052504
pdo_dbstmt_object_handlers.free_obj = pdo_dbstmt_free_storage;
25062505
pdo_dbstmt_object_handlers.write_property = dbstmt_prop_write;
25072506
pdo_dbstmt_object_handlers.unset_property = dbstmt_prop_delete;

ext/spl/spl_array.c

-1
Original file line numberDiff line numberDiff line change
@@ -1871,7 +1871,6 @@ PHP_MINIT_FUNCTION(spl_array)
18711871
spl_handler_ArrayObject.unset_property = spl_array_unset_property;
18721872

18731873
spl_handler_ArrayObject.compare = spl_array_compare_objects;
1874-
spl_handler_ArrayObject.dtor_obj = zend_objects_destroy_object;
18751874
spl_handler_ArrayObject.free_obj = spl_array_object_free_storage;
18761875

18771876
spl_ce_ArrayIterator = register_class_ArrayIterator(spl_ce_SeekableIterator, zend_ce_arrayaccess, zend_ce_serializable, zend_ce_countable);

ext/spl/spl_dllist.c

-1
Original file line numberDiff line numberDiff line change
@@ -1277,7 +1277,6 @@ PHP_MINIT_FUNCTION(spl_dllist) /* {{{ */
12771277
spl_handler_SplDoublyLinkedList.clone_obj = spl_dllist_object_clone;
12781278
spl_handler_SplDoublyLinkedList.count_elements = spl_dllist_object_count_elements;
12791279
spl_handler_SplDoublyLinkedList.get_gc = spl_dllist_object_get_gc;
1280-
spl_handler_SplDoublyLinkedList.dtor_obj = zend_objects_destroy_object;
12811280
spl_handler_SplDoublyLinkedList.free_obj = spl_dllist_object_free_storage;
12821281

12831282
REGISTER_SPL_CLASS_CONST_LONG(SplDoublyLinkedList, "IT_MODE_LIFO", SPL_DLLIST_IT_LIFO);

ext/spl/spl_fixedarray.c

-1
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,6 @@ PHP_MINIT_FUNCTION(spl_fixedarray)
854854
spl_handler_SplFixedArray.count_elements = spl_fixedarray_object_count_elements;
855855
spl_handler_SplFixedArray.get_properties = spl_fixedarray_object_get_properties;
856856
spl_handler_SplFixedArray.get_gc = spl_fixedarray_object_get_gc;
857-
spl_handler_SplFixedArray.dtor_obj = zend_objects_destroy_object;
858857
spl_handler_SplFixedArray.free_obj = spl_fixedarray_object_free_storage;
859858

860859
return SUCCESS;

ext/spl/spl_heap.c

-2
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,6 @@ PHP_MINIT_FUNCTION(spl_heap) /* {{{ */
11631163
spl_handler_SplHeap.clone_obj = spl_heap_object_clone;
11641164
spl_handler_SplHeap.count_elements = spl_heap_object_count_elements;
11651165
spl_handler_SplHeap.get_gc = spl_heap_object_get_gc;
1166-
spl_handler_SplHeap.dtor_obj = zend_objects_destroy_object;
11671166
spl_handler_SplHeap.free_obj = spl_heap_object_free_storage;
11681167

11691168
spl_ce_SplMinHeap = register_class_SplMinHeap(spl_ce_SplHeap);
@@ -1184,7 +1183,6 @@ PHP_MINIT_FUNCTION(spl_heap) /* {{{ */
11841183
spl_handler_SplPriorityQueue.clone_obj = spl_heap_object_clone;
11851184
spl_handler_SplPriorityQueue.count_elements = spl_heap_object_count_elements;
11861185
spl_handler_SplPriorityQueue.get_gc = spl_pqueue_object_get_gc;
1187-
spl_handler_SplPriorityQueue.dtor_obj = zend_objects_destroy_object;
11881186
spl_handler_SplPriorityQueue.free_obj = spl_heap_object_free_storage;
11891187

11901188
REGISTER_SPL_CLASS_CONST_LONG(SplPriorityQueue, "EXTR_BOTH", SPL_PQUEUE_EXTR_BOTH);

ext/spl/spl_observer.c

-1
Original file line numberDiff line numberDiff line change
@@ -1199,7 +1199,6 @@ PHP_MINIT_FUNCTION(spl_observer)
11991199
spl_handler_SplObjectStorage.compare = spl_object_storage_compare_objects;
12001200
spl_handler_SplObjectStorage.clone_obj = spl_object_storage_clone;
12011201
spl_handler_SplObjectStorage.get_gc = spl_object_storage_get_gc;
1202-
spl_handler_SplObjectStorage.dtor_obj = zend_objects_destroy_object;
12031202
spl_handler_SplObjectStorage.free_obj = spl_SplObjectStorage_free_storage;
12041203

12051204
spl_ce_MultipleIterator = register_class_MultipleIterator(zend_ce_iterator);

ext/xmlreader/php_xmlreader.c

-1
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,6 @@ PHP_MINIT_FUNCTION(xmlreader)
11501150

11511151
memcpy(&xmlreader_object_handlers, &std_object_handlers, sizeof(zend_object_handlers));
11521152
xmlreader_object_handlers.offset = XtOffsetOf(xmlreader_object, std);
1153-
xmlreader_object_handlers.dtor_obj = zend_objects_destroy_object;
11541153
xmlreader_object_handlers.free_obj = xmlreader_objects_free_storage;
11551154
xmlreader_object_handlers.read_property = xmlreader_read_property;
11561155
xmlreader_object_handlers.write_property = xmlreader_write_property;

0 commit comments

Comments
 (0)