From: Etienne Kneuss Date: Sat, 24 May 2008 14:37:53 +0000 (+0000) Subject: Also register the get_iterator handler for Max/Min Heap X-Git-Tag: BEFORE_HEAD_NS_CHANGE~1680 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=72f61bfc4fa86af922804b3d5d3a8009fb0816c5;p=php Also register the get_iterator handler for Max/Min Heap --- diff --git a/ext/spl/spl_heap.c b/ext/spl/spl_heap.c index 90ac99bc32..0b84242147 100644 --- a/ext/spl/spl_heap.c +++ b/ext/spl/spl_heap.c @@ -1183,6 +1183,9 @@ PHP_MINIT_FUNCTION(spl_heap) /* {{{ */ REGISTER_SPL_SUB_CLASS_EX(SplMinHeap, SplHeap, spl_heap_object_new, spl_funcs_SplMinHeap); REGISTER_SPL_SUB_CLASS_EX(SplMaxHeap, SplHeap, spl_heap_object_new, spl_funcs_SplMaxHeap); + spl_ce_SplMaxHeap->get_iterator = spl_heap_get_iterator; + spl_ce_SplMinHeap->get_iterator = spl_heap_get_iterator; + REGISTER_SPL_STD_CLASS_EX(SplPriorityQueue, spl_heap_object_new, spl_funcs_SplPriorityQueue); memcpy(&spl_handler_SplPriorityQueue, zend_get_std_object_handlers(), sizeof(zend_object_handlers));