[PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl spl_heap.c /ext/spl/tests heap_007.phpt pqueue_003.phpt
davidc Sat Nov 22 14:19:47 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/splspl_heap.c /php-src/ext/spl/tests heap_007.phpt pqueue_003.phpt Log: - MFH - Bug #46615 - Return the count - 1 when invoking SplHeap-key() - Adjusted the tests http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_heap.c?r1=1.1.2.11r2=1.1.2.12diff_format=u Index: php-src/ext/spl/spl_heap.c diff -u php-src/ext/spl/spl_heap.c:1.1.2.11 php-src/ext/spl/spl_heap.c:1.1.2.12 --- php-src/ext/spl/spl_heap.c:1.1.2.11 Mon Nov 17 11:27:59 2008 +++ php-src/ext/spl/spl_heap.c Sat Nov 22 14:19:47 2008 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: spl_heap.c,v 1.1.2.11 2008/11/17 11:27:59 felipe Exp $ */ +/* $Id: spl_heap.c,v 1.1.2.12 2008/11/22 14:19:47 davidc Exp $ */ #ifdef HAVE_CONFIG_H # include config.h @@ -970,8 +970,8 @@ SPL_METHOD(SplHeap, key) { spl_heap_object *intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - - RETURN_LONG(intern-heap-count); + + RETURN_LONG(intern-heap-count - 1); } /* }}} */ http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/heap_007.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u Index: php-src/ext/spl/tests/heap_007.phpt diff -u php-src/ext/spl/tests/heap_007.phpt:1.1.2.3 php-src/ext/spl/tests/heap_007.phpt:1.1.2.4 --- php-src/ext/spl/tests/heap_007.phpt:1.1.2.3 Sat May 24 14:10:44 2008 +++ php-src/ext/spl/tests/heap_007.phpt Sat Nov 22 14:19:47 2008 @@ -12,6 +12,7 @@ $h-rewind(); echo count(\$h) = .count($h).\n; echo \$h-count() = .$h-count().\n; + while ($h-valid()) { $k = $h-key(); $v = $h-current(); @@ -24,8 +25,8 @@ --EXPECTF-- count($h) = 4 $h-count() = 4 -4=5 -3=4 -2=1 -1=0 +3=5 +2=4 +1=1 +0=0 ===DONE=== http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/pqueue_003.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u Index: php-src/ext/spl/tests/pqueue_003.phpt diff -u php-src/ext/spl/tests/pqueue_003.phpt:1.1.2.3 php-src/ext/spl/tests/pqueue_003.phpt:1.1.2.4 --- php-src/ext/spl/tests/pqueue_003.phpt:1.1.2.3 Sat May 24 14:10:44 2008 +++ php-src/ext/spl/tests/pqueue_003.phpt Sat Nov 22 14:19:47 2008 @@ -24,8 +24,8 @@ --EXPECTF-- count($h) = 4 $h-count() = 4 -4=5 -3=4 -2=1 -1=0 +3=5 +2=4 +1=1 +0=0 ===DONE=== -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl spl_heap.c /ext/spl/tests heap_007.phpt pqueue_003.phpt
2008/11/22 David Coallier [EMAIL PROTECTED]: davidc Sat Nov 22 14:19:47 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/splspl_heap.c /php-src/ext/spl/tests heap_007.phpt pqueue_003.phpt Log: - MFH - Bug #46615 - Return the count - 1 when invoking SplHeap-key() - Adjusted the tests Hmm, shouldn't this have a NEWS entry? -- Kalle Sommer Nielsen -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl spl_heap.c /ext/spl/tests heap_007.phpt pqueue_003.phpt
2008/11/22 Kalle Sommer Nielsen [EMAIL PROTECTED]: 2008/11/22 David Coallier [EMAIL PROTECTED]: davidc Sat Nov 22 14:19:47 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/splspl_heap.c /php-src/ext/spl/tests heap_007.phpt pqueue_003.phpt Log: - MFH - Bug #46615 - Return the count - 1 when invoking SplHeap-key() - Adjusted the tests Hmm, shouldn't this have a NEWS entry? Jaysus give me a second I had to go to the toilet (did you really need to know this?) :D Hehe yes it belongs in the news -- Slan, David -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl spl_heap.c /ext/spl/tests heap_007.phpt pqueue_003.phpt
2008/11/22 David Coallier [EMAIL PROTECTED]: 2008/11/22 Kalle Sommer Nielsen [EMAIL PROTECTED]: 2008/11/22 David Coallier [EMAIL PROTECTED]: davidc Sat Nov 22 14:19:47 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/splspl_heap.c /php-src/ext/spl/tests heap_007.phpt pqueue_003.phpt Log: - MFH - Bug #46615 - Return the count - 1 when invoking SplHeap-key() - Adjusted the tests Hmm, shouldn't this have a NEWS entry? Jaysus give me a second I had to go to the toilet (did you really need to know this?) :D hehe Hehe yes it belongs in the news Just so it doesn't be forgotten :) -- Kalle Sommer Nielsen -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl spl_heap.c /ext/spl/tests heap_007.phpt pqueue_003.phpt
Hello Kalle, Saturday, November 22, 2008, 3:25:05 PM, you wrote: 2008/11/22 David Coallier [EMAIL PROTECTED]: davidc Sat Nov 22 14:19:47 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/splspl_heap.c /php-src/ext/spl/tests heap_007.phpt pqueue_003.phpt Log: - MFH - Bug #46615 - Return the count - 1 when invoking SplHeap-key() - Adjusted the tests Hmm, shouldn't this have a NEWS entry? Since when do we add NEWS entries that fix stuff that was never released? David, please revert that entry. Otherwise it is hard to drop those entries prior to releasing. Best regards, Marcus -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl spl_heap.c /ext/spl/tests heap_007.phpt pqueue_003.phpt
Hmm, shouldn't this have a NEWS entry? Since when do we add NEWS entries that fix stuff that was never released? David, please revert that entry. Otherwise it is hard to drop those entries prior to releasing. Done. -- Slan, David -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/spl spl_heap.c /ext/spl/tests heap_007.phpt pqueue_003.phpt
On Sat, Nov 22, 2008 at 11:48 PM, Marcus Boerger [EMAIL PROTECTED] wrote: Hello Kalle, Saturday, November 22, 2008, 3:25:05 PM, you wrote: 2008/11/22 David Coallier [EMAIL PROTECTED]: davidc Sat Nov 22 14:19:47 2008 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/splspl_heap.c /php-src/ext/spl/tests heap_007.phpt pqueue_003.phpt Log: - MFH - Bug #46615 - Return the count - 1 when invoking SplHeap-key() - Adjusted the tests Hmm, shouldn't this have a NEWS entry? Since when do we add NEWS entries that fix stuff that was never released? We do add stuff that has been fixed between two releases, even RC or alpha. These entries are then merged into a single one before the final release. See the release howto in the wiki. Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php