Re: By refernce in fsockopen()
| From: | Andrei Zmievski | Date: | Wed, 18 Oct 2000 13:06:14 +0000 |
| Subject: | Re: By refernce in fsockopen() | ||
| References: | 1 2 3 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-35418@lists.php.net to get a copy of this message | ||
On Wed, 18 Oct 2000, Stig Venaas wrote:
> if (arg_count>2) {
> zval_dtor(*args[2]);
> ZVAL_LONG(*args[2],errno);
> }
> if (arg_count>3) {
> zval_dtor(*args[3]);
> ZVAL_STRING(*args[3],strerror(errno),1);
> }
> RETURN_FALSE;
>
> while in the AF_UNIX case:
>
> if(arg_count>2) (*args[2])->value.lval = errno;
> if(arg_count>3) {
> (*args[3])->value.str.val = estrdup(strerror(err
> no));
> (*args[3])->value.str.len = strlen((*args[3])->v
> alue.str.val);
> }
> RETURN_FALSE;
I guess AF_UNIX case was written by a different person. for arg_count >
3 case it should definitely call zval_dtor() first and then assign new
values.
-Andrei
Windows 2000 is certified not to crash more than
once a day, so what is the bootup time, 24 hours?
-- Sam Liddicott