From: Etienne Kneuss Date: Sat, 24 May 2008 14:38:04 +0000 (+0000) Subject: MFH: Also register the get_iterator handler for Max/Min Heap X-Git-Tag: BEFORE_NEW_PARAMETER_PARSE~153 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d4aa83d2737d3d800be7f1d55b2fb8666e996090;p=php MFH: 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 994f4b6130..c810b15411 100644 --- a/ext/spl/spl_heap.c +++ b/ext/spl/spl_heap.c @@ -1166,6 +1166,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));