RE: [PHP-DEV] usort won't work anymore on 408dev -> zend_hash.c b ug?
| From: | Zeev Suraski | Date: | Thu, 04 Oct 2001 12:48:03 +0000 |
| Subject: | RE: [PHP-DEV] usort won't work anymore on 408dev -> zend_hash.c b ug? | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-67257@lists.php.net to get a copy of this message | ||
Fixed - thanks!
At 14:17 04-10-01, Marc Boeren wrote:
So it seems the results are sorted, but the keys aren't reassigned... If I track the source, I find the zend_hash_sort function in zend_hash.c has changed between 407 and 408: 407:if (renumber) { p = ht->pListHead; i=0; while (p != NULL) { p->nKeyLength = 0; p->h = i++; p = p->pListNext; } ht->nNextFreeElement = i; zend_hash_rehash(ht); }408:if (renumber) { p = ht->pListHead; i=0; while (p != NULL) { p->nKeyLength = 0; ; p = p->pListNext; } ht->nNextFreeElement = i; zend_hash_rehash(ht); }If I restore thep->h = i++;line, everything works again... Cheerio, Marc. -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net