On Fri, 02 Feb 2001, Colin Viebrock wrote:
> cmv Fri Feb 2 12:55:27 2001 EDT
>
> Modified files:
> /php4/ext/sockets sockets.c
> Log:
> Fix for http://bugs.php.net/bugs.php?id=9082
>
> I know switch() is expensive, so someone rewrite this "properly" if you
> want.
What do you mean, switch() is expensive?
> + switch (ZEND_NUM_ARGS()) {
> + case 3:
> + if (zend_get_parameters_ex(ZEND_NUM_ARGS(), &fd, &addr, &port)
>== FAILURE)
> + WRONG_PARAM_COUNT;
> + break;
> + case 2:
> + if (zend_get_parameters_ex(ZEND_NUM_ARGS(), &fd, &addr) ==
>FAILURE)
> + WRONG_PARAM_COUNT;
> + break;
> + MAKE_STD_ZVAL((*port));
Uh-uh - can't do that. What is your goal here, if port is not passed, it
defaults to 0?
-Andrei
'Any given program, when running correctly, is obsolete.'
- First Law of Computer Programming
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]