Re: [PHP4BETA] Re: min/max oddities
| From: | Thies C. Arntzen | Date: | Mon, 08 Nov 1999 14:37:57 +0000 |
| Subject: | Re: [PHP4BETA] Re: min/max oddities | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-5960@lists.php.net to get a copy of this message | ||
On Mon, 8 Nov 1999, Andrei Zmievski wrote:
> On Sun, 07 Nov 1999, Thies C . Arntzen wrote:
> > hi andi,
> > i've enclosed a patch that makes min()/max() use compare_function() from
> > libzend - i'm too tired to commit something like this without at least two
> > more eyes on it.
> >
> > maybe you could check & apply it?
>
> + if (compare_function(&result, first, second) == FAILURE) {
> + return 0;
> + }
> +
> + convert_to_long(&result);
>
> I don't think convert_to_long() is necessary, since compare_function()
> sets the type of the result.
the result could be either IS_LONG or IS_DOUBLE
see is_smaller_function in zend_operators.c ( i think )
tc
>
> -Andrei
> * Ethernet n.: something used to catch the etherbunny. *
>
>
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany