I made the changes so that FALSE is returned :
http://si.kz/~six/stream_socket_pair.noassume.diff

regards,
Vincent
----- Original Message -----
From: "Andrey Hristov" <[EMAIL PROTECTED]>
Newsgroups: php.internals
To: "Vincent NEGRIER" <[EMAIL PROTECTED]>
Cc: "Wez Furlong" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, October 13, 2004 4:05 PM
Subject: Re: [PHP-DEV] Re: [PATCH] new function stream_socket_create_pair


>   Hi,
> at least my experience is that when a parameter's value is bad, FALSE
> is returned. In this case the code throws E_WARNING but continues
exectuion
> assuming something. IMO it is better not to assume but to return FALSE.
>
> Thanks,
> Andrey
>
> Vincent NEGRIER wrote:
> > Here is an updated version of the patch :
> > http://si.kz/~six/stream_socket_pair.diff
> >
> > It now registers STREAM_AF_* and STREAM_SOCK_* long constants, checks
the
> > domain and type against known types and passes the array of created
streams
> > as return value instead of a byref param... and the diff is against
today's
> > CVS this time :)
> >
> > regards,
> > Vincent
> >
> > ----- Original Message -----
> > From: "Vincent Negrier" <[EMAIL PROTECTED]>
> > Newsgroups: php.internals
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, October 13, 2004 11:52 AM
> > Subject: Re: [PATCH] new function stream_socket_create_pair
> >
> >
> >
> >>>>the patch is here :
> >>
> >>http://si.kz/~six/stream_socket_create_pair_patch.tgz
> >>
> >>>To add to Wez's comments, I'd rather see it return an array of socket
> >>>streams (or FALSE on failure), rather than return true and tuck the
> >>
> >>streams
> >>
> >>>into a by-ref parameter.
> >>
> >>It would look simpler, but on the other hand it would break consistency
> >
> > with
> >
> >>the behavior of socket_create_pair() and the sockpair() syscall ...
> >>
> >>If the above is not a problem for anyone i can rewrite it to return a
> >>streams array (or FALSE), without the byref param.
> >>
> >>regards,
> >>Vincent
> >
> >

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to