Re: cvs: php4 /main main.c
| From: | Zeev Suraski | Date: | Fri, 01 Sep 2000 11:22:22 +0000 |
| Subject: | Re: cvs: php4 /main main.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-1486@lists.php.net to get a copy of this message | ||
On Fri, 1 Sep 2000, Sascha Schumann wrote:
> On Fri, 1 Sep 2000, Zeev Suraski wrote:
>
> >
> > Why do you have a va_end() in there?
>
> You might want to read footnote 1 in my last email on that
> subject.
That footnote is not related to adding va_end(). Adding va_end() where
you added it is at best useless (if va_end() does nothing, as it does
under many platforms), and at worst - misleading, as if it 'rewinds' the
va_list in some way. At any rate, in my opinion (which is consistent with
your quote), the responsibility to call va_end() is of the calling
function, where va_start() was called, and not the called function, which
won't refer to that va_list anymore anyway.
What you're saying is that a function that receives a va_list, cannot use
it multiple times in a portable way. If we accept this, we shouldn't
write the code in a way that suggest otherwise.
Zeev
--
Zeev Suraski <zeev@zend.com>
http://www.zend.com/