Re: cvs: php4 /ext/standard array.c

From: Date: Sat, 03 Aug 2002 16:00:55 +0000
Subject: Re: cvs: php4 /ext/standard array.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13107@lists.php.net to get a copy of this message
Hey, Yeah I already thought of that.... I was even going to create a new PHP_FUNCTION outta the same code. But oddly enough that exact same code is used all over array.c. I also didn't know if i had commit access to zend. - brad --- Andi Gutmans <andi@zend.com> wrote: > At 01:48 PM 8/3/2002 +0200, Thies C. Arntzen wrote: > >On Sat, Aug 03, 2002 at 12:19:32PM +0300, Andi Gutmans wrote: > > > At 04:38 AM 8/1/2002 +0000, Brad LaFountain wrote: > > > >snipp > > > > > >+ // If we did a shift... re-index like it did before > > > >+ if(!off_the_end) { > > > >+ HANDLE_BLOCK_INTERRUPTIONS(); > > > >+ { > > > >+ int k = 0; > > > >+ Bucket *p = Z_ARRVAL_PP(stack)->pListHead; > > > >+ while (p != NULL) { > > > >+ if (p->nKeyLength == 0) > > > >+ p->h = k++; > > > >+ p = p->pListNext; > > > >+ } > > > >+ Z_ARRVAL_PP(stack)->nNextFreeElement = k+1; > > > >+ zend_hash_rehash(Z_ARRVAL_PP(stack)); > > > >+ } > > > >+ HANDLE_UNBLOCK_INTERRUPTIONS(); > > > >+ } > > > > > > Brad, > > > > > > I think it kind of sucks to have code which manipulates the hash directly > > > in PHP. If this is really needed then it should be made a function in > > > zend_hash.* > > > > i kinda agree with andi, but i also know that we can certain > > function _much_ faster by knowing the internals. so -andi- > > what kind of an API could be exposed to make things > > leaner/faster? > > We could add something like zend_hash_renumber_indeces(). > > Andi > __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com

« previous php.cvs (#13107) next »