See http://www.opengroup.org/onlinepubs/007908799/xsh/stdarg.h.html This appears to imply that va_start() can be used more than twice.
And I don't think va_start() always has to be invoked. Moriyoshi [EMAIL PROTECTED] (Marcus Börger) wrote: > I am not sure if va_start can be called twice in a row (rekursive). > Manual does not say anything about that. > > How about: > > cvs -z3 -q diff zend_hash.c (in directory S:\php4-HEAD\Zend) > Index: zend_hash.c > =================================================================== > RCS file: /repository/ZendEngine2/zend_hash.c,v > retrieving revision 1.93 > diff -u -r1.93 zend_hash.c > --- zend_hash.c 5 Nov 2002 18:22:02 -0000 1.93 > +++ zend_hash.c 8 Nov 2002 09:32:48 -0000 > @@ -722,9 +722,13 @@ > > HASH_PROTECT_RECURSION(ht); > > - va_start(args, num_args); > p = ht->pListHead; > + if (p == NULL) { > + va_start(args, num_args); > + va_end(args); > + } > while (p != NULL) { > + va_start(args, num_args); > hash_key.arKey = p->arKey; > hash_key.nKeyLength = p->nKeyLength; > hash_key.h = p->h; > @@ -733,8 +737,8 @@ > } else { > p = p->pListNext; > } > + va_end(args); > } > - va_end(args); > > HASH_UNPROTECT_RECURSION(ht); > } > > > marcus > > At 09:52 08.11.2002, Moriyoshi Koizumi wrote: > >Hi, > > > >The attached patch is a probable fix for bug #19566. I guess the bug > >is that va_list is not properly initialized before each callback function > >call. I've tested it in PPC linux, and it works fine. > > > >Regards, > >Moriyoshi > > > > > >-- > >PHP Development Mailing List <http://www.php.net/> > >To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php